mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07: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 \
|
begin \
|
||||||
longint prev_result; \
|
longint prev_result; \
|
||||||
int ok = 0; \
|
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; \
|
longint result; \
|
||||||
if (!bit'(cl.randomize())) $stop; \
|
if (!bit'(cl.randomize())) $stop; \
|
||||||
result = longint'(field); \
|
result = longint'(field); \
|
||||||
if (!(cond)) $stop; \
|
if (!(cond)) $stop; \
|
||||||
if (i > 0 && result != prev_result) ok = 1; \
|
if (result != prev_result) ok = 1; \
|
||||||
prev_result = result; \
|
prev_result = result; \
|
||||||
end \
|
end \
|
||||||
if (ok != 1) $stop; \
|
if (ok != 1) $stop; \
|
||||||
|
@ -8,12 +8,15 @@
|
|||||||
begin \
|
begin \
|
||||||
longint prev_result; \
|
longint prev_result; \
|
||||||
int ok = 0; \
|
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; \
|
longint result; \
|
||||||
if (!bit'(cl.randomize())) $stop; \
|
if (!bit'(cl.randomize())) $stop; \
|
||||||
result = longint'(field); \
|
result = longint'(field); \
|
||||||
if (!(cond)) $stop; \
|
if (!(cond)) $stop; \
|
||||||
if (i > 0 && result != prev_result) ok = 1; \
|
if (result != prev_result) ok = 1; \
|
||||||
prev_result = result; \
|
prev_result = result; \
|
||||||
end \
|
end \
|
||||||
if (ok != 1) $stop; \
|
if (ok != 1) $stop; \
|
||||||
|
@ -8,12 +8,15 @@
|
|||||||
begin \
|
begin \
|
||||||
longint prev_result; \
|
longint prev_result; \
|
||||||
int ok = 0; \
|
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; \
|
longint result; \
|
||||||
if (!bit'(cl.randomize())) $stop; \
|
if (!bit'(cl.randomize())) $stop; \
|
||||||
result = longint'(field); \
|
result = longint'(field); \
|
||||||
if (!(cond)) $stop; \
|
if (!(cond)) $stop; \
|
||||||
if (i > 0 && result != prev_result) ok = 1; \
|
if (result != prev_result) ok = 1; \
|
||||||
prev_result = result; \
|
prev_result = result; \
|
||||||
end \
|
end \
|
||||||
if (ok != 1) $stop; \
|
if (ok != 1) $stop; \
|
||||||
|
@ -8,12 +8,15 @@
|
|||||||
begin \
|
begin \
|
||||||
longint prev_result; \
|
longint prev_result; \
|
||||||
int ok = 0; \
|
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; \
|
longint result; \
|
||||||
if (!bit'(cl.randomize() with { constr; })) $stop; \
|
if (!bit'(cl.randomize() with { constr; })) $stop; \
|
||||||
result = longint'(field); \
|
result = longint'(field); \
|
||||||
if (!(cond)) $stop; \
|
if (!(cond)) $stop; \
|
||||||
if (i > 0 && result != prev_result) ok = 1; \
|
if (result != prev_result) ok = 1; \
|
||||||
prev_result = result; \
|
prev_result = result; \
|
||||||
end \
|
end \
|
||||||
if (ok != 1) $stop; \
|
if (ok != 1) $stop; \
|
||||||
|
@ -8,11 +8,13 @@
|
|||||||
begin \
|
begin \
|
||||||
longint prev_result; \
|
longint prev_result; \
|
||||||
int ok = 0; \
|
int ok = 0; \
|
||||||
for (int i = 0; i < 10; i++) begin \
|
void'(cl.randomize()); \
|
||||||
|
prev_result = longint'(field); \
|
||||||
|
repeat(9) begin \
|
||||||
longint result; \
|
longint result; \
|
||||||
void'(cl.randomize()); \
|
void'(cl.randomize()); \
|
||||||
result = longint'(field); \
|
result = longint'(field); \
|
||||||
if (i > 0 && result != prev_result) ok = 1; \
|
if (result != prev_result) ok = 1; \
|
||||||
prev_result = result; \
|
prev_result = result; \
|
||||||
end \
|
end \
|
||||||
if (ok != 1) $stop; \
|
if (ok != 1) $stop; \
|
||||||
|
@ -8,11 +8,13 @@
|
|||||||
begin \
|
begin \
|
||||||
longint prev_result; \
|
longint prev_result; \
|
||||||
int ok = 0; \
|
int ok = 0; \
|
||||||
for (int i = 0; i < 10; i++) begin \
|
void'(cl.randomize()); \
|
||||||
|
prev_result = longint'(field); \
|
||||||
|
repeat(9) begin \
|
||||||
longint result; \
|
longint result; \
|
||||||
void'(cl.randomize()); \
|
void'(cl.randomize()); \
|
||||||
result = longint'(field); \
|
result = longint'(field); \
|
||||||
if (i > 0 && result != prev_result) ok = 1; \
|
if (result != prev_result) ok = 1; \
|
||||||
prev_result = result; \
|
prev_result = result; \
|
||||||
end \
|
end \
|
||||||
if (ok != 1) $stop; \
|
if (ok != 1) $stop; \
|
||||||
|
@ -8,11 +8,13 @@
|
|||||||
begin \
|
begin \
|
||||||
longint prev_result; \
|
longint prev_result; \
|
||||||
int ok = 0; \
|
int ok = 0; \
|
||||||
for (int i = 0; i < 10; i++) begin \
|
void'(cl.randomize()); \
|
||||||
|
prev_result = longint'(field); \
|
||||||
|
repeat(9) begin \
|
||||||
longint result; \
|
longint result; \
|
||||||
void'(cl.randomize()); \
|
void'(cl.randomize()); \
|
||||||
result = longint'(field); \
|
result = longint'(field); \
|
||||||
if (i > 0 && result != prev_result) ok = 1; \
|
if (result != prev_result) ok = 1; \
|
||||||
prev_result = result; \
|
prev_result = result; \
|
||||||
end \
|
end \
|
||||||
if (ok != 1) $stop; \
|
if (ok != 1) $stop; \
|
||||||
|
@ -8,11 +8,13 @@
|
|||||||
begin \
|
begin \
|
||||||
longint prev_result; \
|
longint prev_result; \
|
||||||
int ok = 0; \
|
int ok = 0; \
|
||||||
for (int i = 0; i < 10; i++) begin \
|
void'(cl.randomize()); \
|
||||||
|
prev_result = longint'(field); \
|
||||||
|
repeat(9) begin \
|
||||||
longint result; \
|
longint result; \
|
||||||
void'(cl.randomize()); \
|
void'(cl.randomize()); \
|
||||||
result = longint'(field); \
|
result = longint'(field); \
|
||||||
if (i > 0 && result != prev_result) ok = 1; \
|
if (result != prev_result) ok = 1; \
|
||||||
prev_result = result; \
|
prev_result = result; \
|
||||||
end \
|
end \
|
||||||
if (ok != 1) $stop; \
|
if (ok != 1) $stop; \
|
||||||
|
@ -8,12 +8,15 @@
|
|||||||
begin \
|
begin \
|
||||||
longint prev_result; \
|
longint prev_result; \
|
||||||
int ok = 0; \
|
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; \
|
longint result; \
|
||||||
if (!bit'(cl.randomize())) $stop; \
|
if (!bit'(cl.randomize())) $stop; \
|
||||||
result = longint'(field); \
|
result = longint'(field); \
|
||||||
if (!(cond)) $stop; \
|
if (!(cond)) $stop; \
|
||||||
if (i > 0 && result != prev_result) ok = 1; \
|
if (result != prev_result) ok = 1; \
|
||||||
prev_result = result; \
|
prev_result = result; \
|
||||||
end \
|
end \
|
||||||
if (ok != 1) $stop; \
|
if (ok != 1) $stop; \
|
||||||
|
Loading…
Reference in New Issue
Block a user