packed vs unpacked vectors in system verilog

后端 未结 6 618
野性不改
野性不改 2020-12-02 23:06

Looking at some code I\'m maintaining in System Verilog I see some signals that are defined like this:

node [range_hi:range_lo]x;

and other

6条回答
  •  北海茫月
    2020-12-02 23:48

    This article gives more details about this issue: http://electrosofts.com/systemverilog/arrays.html, especially section 5.2.

    A packed array is a mechanism for subdividing a vector into subfields which can be conveniently accessed as array elements. Consequently, a packed array is guaranteed to be represented as a contiguous set of bits. An unpacked array may or may not be so represented. A packed array differs from an unpacked array in that, when a packed array appears as a primary, it is treated as a single vector.

提交回复
热议问题