Skip to content

Commit

Permalink
Add regression test for connecting module output port to array variab…
Browse files Browse the repository at this point in the history
…le (issue #1001).
  • Loading branch information
martinwhitaker committed Jan 30, 2024
1 parent c9d87ab commit 5e13989
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
22 changes: 22 additions & 0 deletions ivtest/ivltests/br_gh1001.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module dut(output logic [7:0] op[1:0]);

assign op[0] = 8'd1;
assign op[1] = 8'd2;

endmodule

module test();

logic [7:0] v[1:0];

dut dut(v);

initial begin
#0 $display("%b %b", v[0], v[1]);
if ((v[0] === 8'd1) && (v[1] === 8'd2))
$display("PASSED");
else
$display("FAILED");
end

endmodule
1 change: 1 addition & 0 deletions ivtest/regress-vvp.list
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ br_gh710a vvp_tests/br_gh710a.json
br_gh710b vvp_tests/br_gh710b.json
br_gh710c vvp_tests/br_gh710c.json
br_gh939 vvp_tests/br_gh939.json
br_gh1001 vvp_tests/br_gh1001.json
br_gh1018 vvp_tests/br_gh1018.json
br_gh1029 vvp_tests/br_gh1029.json
br_gh1075a vvp_tests/br_gh1074a.json
Expand Down
5 changes: 5 additions & 0 deletions ivtest/vvp_tests/br_gh1001.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "normal",
"source" : "br_gh1001.v",
"iverilog-args" : [ "-g2009" ]
}

0 comments on commit 5e13989

Please sign in to comment.