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