Files
iverilog/ivtest/ivltests/param_tern2.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

33 lines
586 B
Verilog

/*
* This example is a distillation of the essence of PR#993.
* Or at least the essence that led to a bug report.
*/
module main;
parameter [31:0] fifo_address = 32'hc0_00_00_00;
reg [31:0] bar;
reg flag;
wire [31:0] foo = flag? fifo_address : bar;
initial begin
bar = ~fifo_address;
flag = 1;
#1 if (foo !== fifo_address) begin
$display("FAILED");
$finish;
end
flag = 0;
#1 if (foo !== bar) begin
$display("FAILED");
$finish;
end
$display("PASSED");
end // initial begin
endmodule // main