mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 16:29:25 +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.
24 lines
426 B
Verilog
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
|