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))
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))