mirror of
https://github.com/verilator/verilator.git
synced 2025-01-06 06:37:45 +00:00
Fix $urandom_range with no second argument
This commit is contained in:
parent
ce9293fcb3
commit
6adda241c9
@ -3786,6 +3786,7 @@ system_f_call_or_t<nodep>: // IEEE: part of system_tf_call (can be task or func)
|
||||
| yD_UNSIGNED '(' expr ')' { $$ = new AstUnsigned($1, $3); }
|
||||
| yD_URANDOM '(' expr ')' { $$ = new AstRand($1, $3, true); }
|
||||
| yD_URANDOM parenE { $$ = new AstRand($1, nullptr, true); }
|
||||
| yD_URANDOM_RANGE '(' expr ')' { $$ = new AstURandomRange($1, $3, new AstConst($1, 0)); }
|
||||
| yD_URANDOM_RANGE '(' expr ',' expr ')' { $$ = new AstURandomRange($1, $3, $5); }
|
||||
| yD_VALUEPLUSARGS '(' expr ',' expr ')' { $$ = new AstValuePlusArgs($1, $3, $5); }
|
||||
;
|
||||
|
@ -40,6 +40,8 @@ module t(/*AUTOARG*/);
|
||||
if (v1 != 0 && v1 != 1) $stop;
|
||||
v1 = $urandom_range(2, 0);
|
||||
if (v1 != 0 && v1 != 1) $stop;
|
||||
v1 = $urandom_range(3);
|
||||
if (v1 != 0 && v1 != 1 && v1 != 2) $stop;
|
||||
end
|
||||
|
||||
// Seed stability
|
||||
|
Loading…
Reference in New Issue
Block a user