I am using a 3rd party verification IP in my TB. It has a class, say,
class vip_class extends ovm_component;
`ovm_component_utils(vip_class)
…
endclass
Now, I extend this class as,
class my_class extends vip_class;
`ovm_component_utils(my_class) // ← I get error here
…
endclass
But I am getting an error on line with ovm_component_utils in my code which says,
Error : Type of argument ‘tmp_data__’ of virtual method ‘m_field_automation’ in class ‘my_class’ does not match with type of argument in abstract superclass ‘ovm_object’
Can anyone explain why am I seeing this error and how can I resolve it?
Yes, vip_class uses ovm_component_utils and not ovm_object_utils.
And vip_class is extended from ovm_threaded_component, and not ovm_component. This should not affect as ovm_threaded_component points to ovm_component, right?
ovm_threaded_component is just a typedef to ovm_component (legacy from AVM)
`ovm_component_utils does not generate any of the code you mentioned in error. I assume tou are not using the field automation macros later.
That macro should have generated
After replacing the code, I get following warning during compilation on line " virtual function ovm_object_wrapper get_object_type();"
** Warning: <fileName>(<lineNumber>): (vlog-LRM-7047) Return type of virtual method ‘get_object_type’ in class ‘my_class’ is a subtype of the method return type in the superclass. For strict LRM compliance the return types must match.
But when i execute vsim, i get errors like:
** Error: (vsim-3978) /projects/pnq/sangam/released/ovm/latest/ovm/src/base/ovm_registry.svh(54): Illegal assignment to class work.top/ovm_component from class work.top/my_class
It’s possible you are including the OVM library instead of importing it, thus winding up with two different instances of the OVM library.
You should contact Mentor support directly as you are not showing enough information here for me to help you further.
Thanks Dave.
The problem was same as you mentioned. One of our scripts included ovm library and so was getting those errors. Now that I modified the script, I see no error.
Great. The thing that clued me in was the actual error message
** Error: (vsim-3978) /projects/pnq/sangam/released/ovm/latest/ovm/src/base/ovm_registry.svh(54): Illegal assignment to class work.top/ovm_component from class work.top/my_class
class work.top/ovm_component means the class was defined inside the module top, not inside the ovm_pkg. This is why it is very import to look carefully at the error message.
Hi all,
other than the above possibilities(as dave suggested:It’s possible you are including the OVM library instead of importing ) ,Are there any possibilities to get the following error .here i shown my makefile and register_pkg.sv as below to get an ideal over the problem.i am importing ovm pkg and uvm register package and included the macros of ovm and uvm register in this register_pkg.sv file. which is in my environment.
can any body tell me what will be the problem.
thanks,
kk
------ Compile the REGISTER PKG ----------------------------------
vlog -work /home/Desktop/sRegister/data/trunk/work/sRegister /home/Desktop/sRegister/data_from/trunk/dv/env/registers/register_pkg.sv +incdir+/home/Desktop/sRegister/data_from/trunk/dv/env/registers +incdir+/home/Desktop/sRegister/data_from/trunk/dv/verif/common/ovm/ovm-2.1.1/src +incdir+/home/Desktop/sRegister/data_from_/trunk/dv/env +incdir+/home/Desktop/sRegister/data_from/trunk/dv/verif/common/ovc/ovm_register-2.1/src +incdir+/tools/mentor/questa10.1b/questa_sim/verilog_src/uvm_reg-1.1/src +incdir+/tools/mentor/questa10.1b/questa_sim/verilog_src/uvm_reg-1.1/src/dpi
QuestaSim vlog 10.1b Compiler 2012.04 Apr 26 2012
– Compiling package register_pkg
– Importing package ovm_pkg
– Importing package mtiUvmReg.uvm_reg_pkg (uvm_reg-1.1 Built-in)
– Importing package mtiOvm.ovm_pkg (ovm-2.1.2 Built-in)
– Importing package axi_pkg
** Warning: /home/Desktop/sREgister/data_from/trunk/dv/env/registers/reg_model.sv(50): (vlog-LRM-7047) Return type of virtual method ‘get_object_type’ in class ‘car_register_Device_Identity_CAR_reg’ is a subtype of the method return type in the superclass. For strict LRM compliance the return types must match.
** Warning: /home/Desktop/sRIO/data_from/trunk/dv/env/registers/reg_model.sv(50): (vlog-LRM-7047) Return type of virtual method ‘create’ in class ‘car_register_Device_Identity_CAR_reg’ is a subtype of the method return type in the superclass. For strict LRM compliance the return types must match.
** Error: /home/Desktop/sRegister/data_from/trunk/dv/env/registers/reg_model.sv(50): Type of argument ‘tmp_data__’ of virtual method ‘m_field_automation’ in class ‘car_register_Device_Identity_CAR_reg’ does not match with type of argument in abstract superclass ‘ovm_object’.