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.
24 lines
483 B
Verilog
24 lines
483 B
Verilog
// This tests that the individual bits of a uwire are checked for
|
|
// double-driving individually. The code below uses a packed struct
|
|
// to represent individual bits.
|
|
module test;
|
|
|
|
struct packed {
|
|
logic [15:0] hig;
|
|
logic [15:0] low;
|
|
} foo;
|
|
|
|
assign foo.low = 'haaaa;
|
|
assign foo.hig = 'h5555;
|
|
|
|
initial begin
|
|
#1 if (foo !== 'h5555aaaa) begin
|
|
$display("FAILED -- foo=%h", foo);
|
|
$finish;
|
|
end
|
|
|
|
$display("PASSED");
|
|
end
|
|
|
|
endmodule // test
|