packed vs unpacked vectors in system verilog

后端 未结 6 620
野性不改
野性不改 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:35

    Unpacked arrays will give you more compile time error checking than packed arrays.

    I see unpacked arrays on the port definitions of modules for this reason. The compiler will error if the dimensions of the signal are not exactly the same as the port with unpacked arrays. With packed arrays it will normally just go ahead and wire things the best it can, not issuing an error.

提交回复
热议问题