Overriding `uvm_field_int and `uvm_field_array_int values from command line

In reply to chrisspear:

Typically you give a constant for the FLAG argument:

`uvm_field_int(ARG, FLAG)

You could pass a variable, but no promises that this would work.


`uvm_field_int(my_int, (UVM_ALL_ON | ((my_data1==1'b1) ? UVM_PACK : UVM_NO_PACK)) 

It does not work. I had to do my own implementation of the pack with uvm_object_utils instead of uvm_object_utils_begin… It could be a tool issue! The do_pack function always works though but requires work. The `uvm_field_int should have worked too with just changing the flags but it did not do the job not sure why!,