Files
iverilog/ivtest/ivltests/sv_ap_struct2.v
T
Lars-Peter Clausen 6ae085812d Add regression tests for struct assignment patterns
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]>
2023-02-04 14:32:51 -08:00

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