A field defined as a physical field (with the â~@~\%â~@~] option) is packed when the struct is packed. Fields that represent data that is to be sent to the HDL device in the simulator or that are to be used for memories in the simulator or in Specman Elite, need to be physical fields. Nonphysical fields are called virtual fields and are not packed automatically when the struct is packed, although they can be packed individually. If no range is specified, the width of the field is determined by the fieldâ~@~Ys type. For a physical field, if the fieldâ~@~Ys type does not have a known width, you must use the (bits | bytes : num) syntax to specify the width.
Ungenerated Fields
A field defined as ungenerated (with the â~@~\!â~@~] option) is not generated automatically. This is useful for fields that are to be explicitly assigned during the test, or whose values involve computations that cannot be expressed in constraints.
Ungenerated fields get default initial values (0 for scalars, NULL for structs, empty list for lists). An ungenerated field whose value is a range (such as [0..100]) gets the first value in the range. If the field is a struct, it will not be allocated and none of the fields in it will be generated.
The â~@~\!â~@~] and â~@~\%â~@~] options can be used together, in either order.