RE: [sv-bc] reining in the sign

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Wed Mar 02 2005 - 18:07:34 PST
Signing itself is still not as clear as it could be.  For
example, consider 
  http://www.boyd.com/1364_btf/report/full_pr/463.html
  http://www.boyd.com/1364_btf/report/full_pr/489.html
  http://www.boyd.com/1364_btf/report/full_pr/506.html
  http://www.boyd.com/1364_btf/report/full_pr/624.html
 
Another approach to packed dimensions, instead of using
nested typedefs, is to explicitly name the dimensions
instead of the types.  If the names are meaningful, this
can make accesses more self-documenting.

For example, if a word is 8 signed nibbles

    typedef struct packed {logic signed [3:0] nibble;} [7:0] word;

then the most significant bit of the most-signficant nibble of

    var word w;

can be accessed by either

    w[7].nibble[3]

or
    w[31]

-- Brad
Received on Wed Mar 2 18:07:37 2005

This archive was generated by hypermail 2.1.8 : Wed Mar 02 2005 - 18:07:48 PST