duplicate_cast.sv 277 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
package PKG;
    localparam P = 1'b1;
    typedef struct packed {
        logic f;
    } foo_t;
endpackage

module top;
    PKG::foo_t b;
    logic [1:0] a;
    assign b = '{default: PKG::P};
    assign a = '{default: PKG::P};
    initial #1 $display("%b %b", a, b);
endmodule