Files
iverilog/ivtest/ivltests/array_dump.v
T
Stephen Williams cea237b407 Add ivtest to the iverilog source tree
By adding ivtest to the iverilog source tree, it is easier to keep
the regression test synchronized with the source that is being tested.
This should be especially helpful for PRs that add a new feature, and
have a matching ivtest PR with the regression test for that feature.
2022-01-15 10:18:50 -08:00

20 lines
580 B
Verilog

module top;
integer lp;
reg [7:0] array [2:0];
initial begin
// We can use the following to dump arrays. We can not dump
// a whole array with this statment "$dumpvars(0, array);".
//
// $dumpvars is special in that it converts a variable array
// select &A<array, index> into a constant array select.
// This is needed to make the following work as expected.
$dumpfile("work/array_dump.vcd");
for (lp = 0; lp < 3; lp = lp+1) $dumpvars(0, array[lp]);
#1;
array[0] = 8'hff;
array[1] = 8'h00;
array[2] = 8'h55;
end
endmodule