typeof_alias.sv 295 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
package P;
    typedef logic [1:0][2:0] T;
endpackage

module top;
    P::T w;
    type(w[0]) x;
    type(x[0]) y;
    type(w[0][0]) z;

    type(w[1:0]) a;
    type(w[0][1:0]) b;

    initial begin
        $display("%b %b %b %b", w, x, y, z);
        $display("%b %b", a, b);
    end
endmodule