Hi all,
I define two ovm transaction items, one inherits from the other, like the following:
class PARENT extends ovm_sequence_item;
int data_0;
int data_1;
ovm_object_utils_begin(PARENT )
ovm_field_int(data_0, OVM_ALL_ON)
ovm_field_int(data_1, OVM_ALL_ON)
`ovm_object_utils_end
…
endclass
class CHILD extends PARENT;
int data_3;
ovm_object_utils_begin(CHILED)
ovm_field_int(data_0, OVM_ALL_ON+OVM_NOPACK) //DOES NOT OVERRIDE
ovm_field_int(data_1, OVM_ALL_ON+OVM_NOPACK)//DOES NOT OVERRIDE
ovm_field_int(data_3, OVM_ALL_ON+OVM_NOPACK) //THIS WORKS
`ovm_object_utils_end
…
endclass
My intention is to exclude the auto pack from the data_0, data_1 which were originally defined in the PARENT class. I tried to do it as that in the CHILD class. But it doesn’t work as expected, which means data_0 and data_1 are still automatically packed/unpacked.
Is there anyone who knows the solution for this?
Thanks in advance !
Xinwei