What is `uvm_field_* macros for time datatype

1.4k Views Asked by At

Let say I have a variable of type time.

class my_class extends uvm_object;
  time my_time;
  int  my_int;
  `uvm_object_utils_begin(my_class)
    `uvm_field_int(my_int, UVM_DEFAULT)
    // ? for time
  `uvm_object_utils_end
endclass

As we know, we can use 'uvm_field_int for int data type. What is the proper macro for time datatype?

1

There are 1 best solutions below

0
On

Use uvm_field_int because as far as SystemVerilog is concerned, time is just an alias for longint

Better yet, don't use any field macros at all as they are horribly inefficient.