Skip to content

UVM field macros

Handy list of field macros that you use between

`uvm_*_utils_begin(<class_name>)
`uvm_*_utils_end

Flags can be something like this:
UVM_ALL_ON + UVM_NOPACK + UVM_NOPRINT + UVM_NOCOMPARE + UVM_NOCOPY

Field Macros

`uvm_field_int (fieldname, UVM_ALL_ON)
`uvm_field_object (fieldname, UVM_ALL_ON)
`uvm_field_string (fieldname, UVM_ALL_ON)
`uvm_field_enum (<enum_name>, fieldname, UVM_ALL_ON)
`uvm_field_real (fieldname, UVM_ALL_ON)
`uvm_field_event (fieldname, UVM_ALL_ON)

1-D Fixed Arrays

`uvm_field_sarray_int (fieldname, UVM_ALL_ON)
`uvm_field_sarray_object (fieldname, UVM_ALL_ON)
`uvm_field_sarray_string (fieldname, UVM_ALL_ON)
`uvm_field_sarray_enum (<enum_name>, fieldname, UVM_ALL_ON)

1-D Dynamic Arrays

`uvm_field_array_int (fieldname, UVM_ALL_ON)
`uvm_field_array_object (fieldname, UVM_ALL_ON)
`uvm_field_array_string (fieldname, UVM_ALL_ON)
`uvm_field_array_enum (<enum_name>, fieldname, UVM_ALL_ON)

Queues

`uvm_field_queue_int (fieldname, UVM_ALL_ON)
`uvm_field_queue_object (fieldname, UVM_ALL_ON)
`uvm_field_queue_string (fieldname, UVM_ALL_ON)
`uvm_field_queue_enum (<enum_name>, fieldname, UVM_ALL_ON)

Associative Arrays Indexed by string Type

`uvm_field_aa_int_string (fieldname, UVM_ALL_ON)
`uvm_field_aa_object_string (fieldname, UVM_ALL_ON)
`uvm_field_aa_string_string (fieldname, UVM_ALL_ON)

Associative Arrays Indexed by int Type

`uvm_field_aa_object_int (fieldname, UVM_ALL_ON)
`uvm_field_aa_int_int (fieldname, UVM_ALL_ON)
`uvm_field_aa_int_int_unsigned (fieldname, UVM_ALL_ON)
`uvm_field_aa_int_integer (fieldname, UVM_ALL_ON)
`uvm_field_aa_int_integer_unsigned (fieldname, UVM_ALL_ON)
`uvm_field_aa_int_byte (fieldname, UVM_ALL_ON)
`uvm_field_aa_int_byte_unsigned (fieldname, UVM_ALL_ON)
`uvm_field_aa_int_shortint (fieldname, UVM_ALL_ON)
`uvm_field_aa_int_shortint_unsigned (fieldname, UVM_ALL_ON)
`uvm_field_aa_int_longint (fieldname, UVM_ALL_ON)
`uvm_field_aa_int_longint_unsigned (fieldname, UVM_ALL_ON)
`uvm_field_aa_int_key (long unsigned, fieldname, UVM_ALL_ON)
`uvm_field_aa_int_enumkey (fieldname, UVM_ALL_ON)