Files
verilator/test_regress/t/t_simulate_array.v
T
Geza Lore 010ae580b1 Fix V3Simulate constant reuse (#5709)
Use a generational allocator for reusing AstConst across
V3Simulate::clear(), instead of using user1 (which is also used
to store values of nodes).

Also fix invalid lookup on array initializer
2025-01-03 05:33:29 -05:00

25 lines
504 B
Systemverilog

// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2025 by Wilson Snyder.
// SPDX-License-Identifier: CC0-1.0
function integer fun;
integer array[0:0];
begin
array[0] = 10;
fun = array[0];
end
endfunction
module test ();
begin
localparam something = fun();
initial begin
if (something !== 10) $stop;
$write("*-* All Finished *-*\n");
$finish;
end
end
endmodule