mirror of
https://github.com/verilator/verilator.git
synced 2024-12-29 10:47:34 +00:00
Tests: Don't use indices in check_rand (#5561)
Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
This commit is contained in:
parent
81ee89de15
commit
87ac61140d
@ -8,12 +8,15 @@
|
||||
begin \
|
||||
longint prev_result; \
|
||||
int ok = 0; \
|
||||
for (int i = 0; i < 10; i++) begin \
|
||||
if (!bit'(cl.randomize())) $stop; \
|
||||
prev_result = longint'(field); \
|
||||
if (!(cond)) $stop; \
|
||||
repeat(9) begin \
|
||||
longint result; \
|
||||
if (!bit'(cl.randomize())) $stop; \
|
||||
result = longint'(field); \
|
||||
if (!(cond)) $stop; \
|
||||
if (i > 0 && result != prev_result) ok = 1; \
|
||||
if (result != prev_result) ok = 1; \
|
||||
prev_result = result; \
|
||||
end \
|
||||
if (ok != 1) $stop; \
|
||||
|
@ -8,12 +8,15 @@
|
||||
begin \
|
||||
longint prev_result; \
|
||||
int ok = 0; \
|
||||
for (int i = 0; i < 10; i++) begin \
|
||||
if (!bit'(cl.randomize())) $stop; \
|
||||
prev_result = longint'(field); \
|
||||
if (!(cond)) $stop; \
|
||||
repeat(9) begin \
|
||||
longint result; \
|
||||
if (!bit'(cl.randomize())) $stop; \
|
||||
result = longint'(field); \
|
||||
if (!(cond)) $stop; \
|
||||
if (i > 0 && result != prev_result) ok = 1; \
|
||||
if (result != prev_result) ok = 1; \
|
||||
prev_result = result; \
|
||||
end \
|
||||
if (ok != 1) $stop; \
|
||||
|
@ -8,12 +8,15 @@
|
||||
begin \
|
||||
longint prev_result; \
|
||||
int ok = 0; \
|
||||
for (int i = 0; i < 10; i++) begin \
|
||||
if (!bit'(cl.randomize())) $stop; \
|
||||
prev_result = longint'(field); \
|
||||
if (!(cond)) $stop; \
|
||||
repeat(9) begin \
|
||||
longint result; \
|
||||
if (!bit'(cl.randomize())) $stop; \
|
||||
result = longint'(field); \
|
||||
if (!(cond)) $stop; \
|
||||
if (i > 0 && result != prev_result) ok = 1; \
|
||||
if (result != prev_result) ok = 1; \
|
||||
prev_result = result; \
|
||||
end \
|
||||
if (ok != 1) $stop; \
|
||||
|
@ -8,12 +8,15 @@
|
||||
begin \
|
||||
longint prev_result; \
|
||||
int ok = 0; \
|
||||
for (int i = 0; i < 10; i++) begin \
|
||||
if (!bit'(cl.randomize() with { constr; })) $stop; \
|
||||
prev_result = longint'(field); \
|
||||
if (!(cond)) $stop; \
|
||||
repeat(9) begin \
|
||||
longint result; \
|
||||
if (!bit'(cl.randomize() with { constr; })) $stop; \
|
||||
result = longint'(field); \
|
||||
if (!(cond)) $stop; \
|
||||
if (i > 0 && result != prev_result) ok = 1; \
|
||||
if (result != prev_result) ok = 1; \
|
||||
prev_result = result; \
|
||||
end \
|
||||
if (ok != 1) $stop; \
|
||||
|
@ -8,11 +8,13 @@
|
||||
begin \
|
||||
longint prev_result; \
|
||||
int ok = 0; \
|
||||
for (int i = 0; i < 10; i++) begin \
|
||||
void'(cl.randomize()); \
|
||||
prev_result = longint'(field); \
|
||||
repeat(9) begin \
|
||||
longint result; \
|
||||
void'(cl.randomize()); \
|
||||
result = longint'(field); \
|
||||
if (i > 0 && result != prev_result) ok = 1; \
|
||||
if (result != prev_result) ok = 1; \
|
||||
prev_result = result; \
|
||||
end \
|
||||
if (ok != 1) $stop; \
|
||||
|
@ -8,11 +8,13 @@
|
||||
begin \
|
||||
longint prev_result; \
|
||||
int ok = 0; \
|
||||
for (int i = 0; i < 10; i++) begin \
|
||||
void'(cl.randomize()); \
|
||||
prev_result = longint'(field); \
|
||||
repeat(9) begin \
|
||||
longint result; \
|
||||
void'(cl.randomize()); \
|
||||
result = longint'(field); \
|
||||
if (i > 0 && result != prev_result) ok = 1; \
|
||||
if (result != prev_result) ok = 1; \
|
||||
prev_result = result; \
|
||||
end \
|
||||
if (ok != 1) $stop; \
|
||||
|
@ -8,11 +8,13 @@
|
||||
begin \
|
||||
longint prev_result; \
|
||||
int ok = 0; \
|
||||
for (int i = 0; i < 10; i++) begin \
|
||||
void'(cl.randomize()); \
|
||||
prev_result = longint'(field); \
|
||||
repeat(9) begin \
|
||||
longint result; \
|
||||
void'(cl.randomize()); \
|
||||
result = longint'(field); \
|
||||
if (i > 0 && result != prev_result) ok = 1; \
|
||||
if (result != prev_result) ok = 1; \
|
||||
prev_result = result; \
|
||||
end \
|
||||
if (ok != 1) $stop; \
|
||||
|
@ -8,11 +8,13 @@
|
||||
begin \
|
||||
longint prev_result; \
|
||||
int ok = 0; \
|
||||
for (int i = 0; i < 10; i++) begin \
|
||||
void'(cl.randomize()); \
|
||||
prev_result = longint'(field); \
|
||||
repeat(9) begin \
|
||||
longint result; \
|
||||
void'(cl.randomize()); \
|
||||
result = longint'(field); \
|
||||
if (i > 0 && result != prev_result) ok = 1; \
|
||||
if (result != prev_result) ok = 1; \
|
||||
prev_result = result; \
|
||||
end \
|
||||
if (ok != 1) $stop; \
|
||||
|
@ -8,12 +8,15 @@
|
||||
begin \
|
||||
longint prev_result; \
|
||||
int ok = 0; \
|
||||
for (int i = 0; i < 10; i++) begin \
|
||||
if (!bit'(cl.randomize())) $stop; \
|
||||
prev_result = longint'(field); \
|
||||
if (!(cond)) $stop; \
|
||||
repeat(9) begin \
|
||||
longint result; \
|
||||
if (!bit'(cl.randomize())) $stop; \
|
||||
result = longint'(field); \
|
||||
if (!(cond)) $stop; \
|
||||
if (i > 0 && result != prev_result) ok = 1; \
|
||||
if (result != prev_result) ok = 1; \
|
||||
prev_result = result; \
|
||||
end \
|
||||
if (ok != 1) $stop; \
|
||||
|
Loading…
Reference in New Issue
Block a user