OVM null object access debugging

Hi all,

I am sure many of us had faced this most dreaded “null object access” errors. May I know do you guys know any known methods in debugging this error ? For example, if the error is :

Error-[NOA] Null object access
/p/com/eda/ovm/ovm/2.1.1//src/base/ovm_globals.svh, 168
  The object is being used before it was constructed/allocated.
  Please make sure that the object is newed before using it.

  #0 in ovm_report_warning at
  /p/com/eda/ovm/ovm/2.1.1//src/base/ovm_globals.svh:168
  #1 in \ovm_factory::register  at
  /p/com/eda/ovm/ovm/2.1.1//src/base/ovm_factory.sv:77
  #2 in \ovm_object_registry_85::get  at
  /p/com/eda/ovm/ovm/2.1.1//src/base/ovm_registry.svh:210
  #3 in \SHARED_LIB.ovm_pkg


$finish at simulation time                    0
           V C S   S i m u l a t i o n   R e p o r t

Are there any VCS or OVM functions to show which package/class/function that the above errors originated ? What I mean is anyway to know which class that use the above ovm function that have null objects. Please help.

Add if(obj != null) befeore use the obj.

Error-[NOA] Null object access
/tools/ovm/ovm-2.1.1/src/base/ovm_globals.svh, 168
The object is being used before it was constructed/allocated.
Please make sure that the object is newed before using it.

#0 in ovm_report_warning at
/tools/ovm/ovm-2.1.1/src/base/ovm_globals.svh:168
#1 in \ovm_factory::register at
/tools/ovm/ovm-2.1.1/src/base/ovm_factory.sv:77
#2 in \ovm_component_registry_5::get at
/tools/ovm/ovm-2.1.1/src/base/ovm_registry.svh:81
#3 in ovm_pkg

Hi all,
I am also facing the same problem being new to UVM.
Can anyone tell how to debug this??

Thanks

In reply to gg_fsl:

Hi, can anybody can help to debug this issue, I am also meeting this issue.
it almost blocking me one week.
Thanks in advance.

In reply to meijingguoyu:

Can you please provide the code and the error message you are seeing?

  • Ashith

In reply to Ashith:

Hi Ashith,

Many thanks for your Reply, the root cause was found.
it’s due to we declare two same named class in OVC. just removed the obsolete one, error was disappear.

Thanks again. :)