struct_default.sv 214 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
module top;
    typedef struct packed {
        logic a;
        logic b;
    } foo_t;
    foo_t foo;
    initial begin
        foo = '{a: 1'b1, default: '0};
        $display(foo, foo.a, foo.b);
    end
endmodule