mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-29 01:03:29 +02:00
By adding ivtest to the iverilog source tree, it is easier to keep the regression test synchronized with the source that is being tested. This should be especially helpful for PRs that add a new feature, and have a matching ivtest PR with the regression test for that feature.
22 lines
454 B
Verilog
22 lines
454 B
Verilog
// Test behaviour when a multi-bit expression is used as the input of
|
|
// a singleton array of a primitive gate. The standard is explicit
|
|
// that this should be treated as an error.
|
|
|
|
module top;
|
|
|
|
reg [1:0] in;
|
|
wire [2:0] out;
|
|
|
|
buf buf1[0:0](out[0], 1);
|
|
buf buf2[0:0](out[1], 2'b01);
|
|
buf buf3[0:0](out[2], in[1:0]);
|
|
|
|
initial begin
|
|
in = 1;
|
|
#1 $display("out = %b", out);
|
|
// this should have failed at compile time
|
|
$display("FAILED");
|
|
end
|
|
|
|
endmodule
|