mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-06 09:07:15 +02:00
Check that struct assignment patterns with only positional arguments are supported. Also check that invalid assignment patterns for structs report an error. Signed-off-by: Lars-Peter Clausen <[email protected]>
23 lines
384 B
Verilog
23 lines
384 B
Verilog
// Check that positional assigment patterns are supported for structs are
|
|
// supported for parameters.
|
|
|
|
module test;
|
|
|
|
typedef struct packed {
|
|
int x;
|
|
shortint y;
|
|
byte z;
|
|
} T;
|
|
|
|
localparam T x = '{1'b1, 2.0, 2 + 1};
|
|
|
|
initial begin
|
|
if (x === 56'h00000001000203) begin
|
|
$display("PASSED");
|
|
end else begin
|
|
$display("FAILED");
|
|
end
|
|
end
|
|
|
|
endmodule
|