mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-22 13:57:18 +02:00
Add regression test for single element module port array
Check that connections to a module port array with a single element are supported. Signed-off-by: Lars-Peter Clausen <[email protected]>
This commit is contained in:
@@ -0,0 +1,32 @@
|
|||||||
|
// Check that connecting a module port array with a single element is supported
|
||||||
|
|
||||||
|
module M (
|
||||||
|
input [7:0] in[0:0],
|
||||||
|
output [7:0] out[0:0]
|
||||||
|
);
|
||||||
|
|
||||||
|
assign out[0] = in[0];
|
||||||
|
|
||||||
|
endmodule
|
||||||
|
|
||||||
|
module test;
|
||||||
|
|
||||||
|
reg [7:0] A[0:0];
|
||||||
|
wire [7:0] B[0:0];
|
||||||
|
|
||||||
|
M i_m (
|
||||||
|
.in(A),
|
||||||
|
.out(B)
|
||||||
|
);
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
A[0] = 10;
|
||||||
|
#1
|
||||||
|
if (B[0] === 10) begin
|
||||||
|
$display("PASSED");
|
||||||
|
end else begin
|
||||||
|
$display("FAILED");
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
endmodule
|
||||||
@@ -25,6 +25,7 @@ dffsynth11 vvp_tests/dffsynth11.json
|
|||||||
dumpfile vvp_tests/dumpfile.json
|
dumpfile vvp_tests/dumpfile.json
|
||||||
macro_str_esc vvp_tests/macro_str_esc.json
|
macro_str_esc vvp_tests/macro_str_esc.json
|
||||||
memsynth1 vvp_tests/memsynth1.json
|
memsynth1 vvp_tests/memsynth1.json
|
||||||
|
module_port_array1 vvp_tests/module_port_array1.json
|
||||||
param-width vvp_tests/param-width.json
|
param-width vvp_tests/param-width.json
|
||||||
param-width-vlog95 vvp_tests/param-width-vlog95.json
|
param-width-vlog95 vvp_tests/param-width-vlog95.json
|
||||||
pr1388974 vvp_tests/pr1388974.json
|
pr1388974 vvp_tests/pr1388974.json
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"type" : "normal",
|
||||||
|
"source" : "module_port_array1.v",
|
||||||
|
"iverilog-args" : [ "-g2009" ]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user