[sv-bc] Fwd: RE: 6.20.2 Value parameters - partially defined type - unpacked array

From: Daniel Mlynek <danielm@aldec.com.pl>
Date: Wed Aug 31 2011 - 01:03:38 PDT

In chapter 6.20.2 LRM defines how should be the type parameter if its
type is not fully defined.
This description misses the unpacked array type parameters.
Lets assume situation where there is only unpacked dimension defined -
like below how it shuld behave. IMHO LRM should add description for such
cases and similar cases ie only singes and unpacked dim defined, only
packed range and unpacked dimension defined etc...

    typedef shortint T[2];
    module name;
       parameter p[2]=T'{1,2}; //LRM do not describe how this case
    should work while BNF allows such code.
       initial $display("%p", p);
       initial $display("%b", p[0], p[1]);
    endmodule

    module top;
       parameter int tp[2]= '{1,-1};
       name #(tp)uut2();
    endmodule

DANiel

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Aug 31 01:03:21 2011

This archive was generated by hypermail 2.1.8 : Wed Aug 31 2011 - 01:03:33 PDT