Forum Discussion
Altera_Forum
Honored Contributor
9 years agoDynamic arrays work just fine for me in modelsim altera 10.3d (the one from Q15).
Are you compiling the code with the -sv switch, or is the file a .sv file? .v files will default to Verilog, which does not support dynamic arrays. Code I used:
module dyn_test;
initial begin
logic dyna ;
dyna = new;
dyna = {0, 1, 2, 3};
foreach(dyna) $display("%2h", dyna);
dyna = new({dyna, 4,5,6,7});
foreach(dyna) $display("%2h", dyna);
end
endmodule