Add regression test for unpacked array output port expressions

Check that assignment patterns cannot be connected directly to unpacked
array output ports.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2026-05-02 16:58:33 -07:00
parent d39e81e1d1
commit 8519a30354
3 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,17 @@
// Check that an output array port expression must be assignable.
module M (
output int out [0:1]
);
initial begin
out = '{3, 4};
end
endmodule
module test;
M i_m('{1, 2}); // Error: output expression is not assignable
endmodule

View File

@ -152,6 +152,7 @@ mix_reset-synth vvp_tests/mix_reset-synth.json
module_ordered_list1 vvp_tests/module_ordered_list1.json
module_ordered_list2 vvp_tests/module_ordered_list2.json
module_port_array1 vvp_tests/module_port_array1.json
module_port_array_fail1 vvp_tests/module_port_array_fail1.json
module_port_array_init1 vvp_tests/module_port_array_init1.json
monitor4 vvp_tests/monitor4.json
non-polymorphic-abs vvp_tests/non-polymorphic-abs.json

View File

@ -0,0 +1,5 @@
{
"type" : "CE",
"source" : "module_port_array_fail1.v",
"iverilog-args" : [ "-g2009" ]
}