Files
iverilog/ivtest/ivltests/select4.v
T
Stephen Williams cea237b407 Add ivtest to the iverilog source tree
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.
2022-01-15 10:18:50 -08:00

24 lines
426 B
Verilog

/*
* part select in continuous assignment.
*/
`timescale 1ns/1ns
module main;
reg [3:0] src;
wire foo = src[3:1] == 3'b101;
integer idx;
initial
begin
for (idx = 0 ; idx < 16 ; idx = idx+1) begin
src = idx;
#1 if (foo !== (src[3:1] == 3'b101)) begin
$display("FAILED -- src=%b, foo=%b", src, foo);
$finish;
end
end
$display("PASSED");
end // initial begin
endmodule