Error-[NOA] Null object access

Question: I am facing the following error and I am not quite sure why, any suggestion as to why we get such errors based on the below message? i have created a link where my code is pertaining to this error

Code is here

Error quick look:

Error-[NOA] Null object access
 simctrl: *I: Line matched standard error regex ^\tOffending|ERROR|\*E|\*FATAL|Assertion.*failed\.|Fatal error|Assertion.*error|\*\* Error|OVL_FATAL|OVL_ERROR|[UO]VM_ERROR|[UO]VM_FATAL|Error!  NULL pointer dereference|^Error-|Error\:|error\:.
 simctrl: *I: Further match messages will be suppressed.
 /local_vol1_nobackup/user/vesutrav/mdm_to_uvmf_4.0/out.er/linux_3.10.0_64/base/library/uvd-base/pub/src/verif/uvc/comp/uvmf/base/src/uvmf_driver_base.svh, 92
   The object at dereference depth 1 is being used before it was
   constructed/allocated.
   Please make sure that the object is allocated before using it.

In reply to Rogers:

Error-[NOA] Null object access.
means always an object has not been constructed.

ou should look around uvmf_driver_base.svh.

In reply to chr_sue:

Thank you for your response, but uvmf_driver_bas.svh is a base class that I can not touch or edit. Kindly please point out which part of my code missed the object creation? is as I have shared the code Click here to access code

In reply to Rogers:

I see. The code fragments do not really help to resolve this issue.

In reply to chr_sue:

Accordingly to the error report message it’s pointing at line no 92 in the file uvmf_driver_base.svh,

so that line looks like
bfm = configuration.driver_bfm;

so exactly which object is referring to be created? thank you in advance.

In reply to Rogers:

My guess is the configuration object does not exist.

In reply to chr_sue:

I did create the configuration in the build_phase of vcn_mdm_driver.svh, but following error

UVM_FATAL /local_vol1_nobackup/user/vesutrav/mdm_to_uvmf_4.0/out.er/linux_3.10.0_64/base/library/uvd-base/pub/src/verif/uvc/comp/uvmf/base/src/uvmf_driver_base.svh(95) @ 0.000 ns: sdb_tb_hevc_decoder_test.mdm_agent_h.mdm_agent_h_driver [DRV] BFM handle with interface_name  is null
 simctrl: *I: Line matched standard error regex ^\t

In reply to Rogers:

It is really difficult to provide help without looking to the full picture, but I’d say you have not set the virtual interfaces in the tb this is normally done using config_db, so when your driver tries to get them from the config object they are null.

HTH,

-R

In reply to rgarcia07:

i did set it in my tb.sv.erb line no 54 kindly please look at the code that i shared if possible click here for code access

I have no idea how your erb files work with the UVMF flow maybe you should take this directly to Siemens costumer support, as you are just providing scattered files and not a complete executable example showing your issues.
While you have the interfaces set, I wonder where the config object gets them from, maybe that’s is what you are missing.

Sorry about that.

-R

In reply to Rogers:

In reply to rgarcia07:
i did set it in my tb.sv.erb line no 54 kindly please look at the code that i shared if possible click here for code access

I had alook to your code and have a few questions or remarks:
(1) you do not start your test with the run_test task.
(2) I’m not familiar with the UVMF approach, but what is this

uvm_config_db #(virtual vcn_mdm_driver_bfm) ::set(null, UVMF_VIRTUAL_INTERFACES, VCN_MDM_BFM, mdm_drv_bfm);

especially ‘UVMF_VIRTUAL_INTERFACES’

In reply to chr_sue:

I have parameter that in file sdb_tb_hevc_decoder_test.svh line no 29

parameter string UVMF_VIRTUAL_INTERFACES = “VIRTUAL_INTERFACES”;
Click here for code access

In reply to rgarcia07:

On line no 140 in the file uvmf_parameterized_agent_configuration_base.svh base class its get is happening.

Click here to access code

In reply to chr_sue:

Can you please correct me if my set and get of config_db is done properly, I been trying since then but ending up with same error ?

In reply to Rogers:

This message:
UVM_FATAL /local_vol1_nobackup/user/vesutrav/mdm_to_uvmf_4.0/out.er/linux_3.10.0_64/base/library/uvd-base/pub/src/verif/uvc/comp/uvmf/base/src/uvmf_driver_base.svh(95) @ 0.000 ns: sdb_tb_hevc_decoder_test.mdm_agent_h.mdm_agent_h_driver [DRV] BFM handle with interface_name is null
simctrl: *I: Line matched standard error regex ^\t

Indicates that the interface_name variable inside the agent configuration is null. The interface_name variable is initialized using the initialize function of the agents configuration object. The interface_name variable is used as the field_name argument of uvm_config_db::get calls.

The interface_name variable value is automatically set and assigned if you are using the UVMF generator to create the interface, environment, and test bench. If you are using the UVMF generator to create the interface, environment, and test bench then the generated code will simulate without modification. If the generated code does not compile, optimize, and run then you have an error in the YAML used to describe the interface, environment, or bench.

In reply to bob_oden:

I did not use the code generator, for this so is there any way I could fix this issue ? or any debugging method to fix this ?

Click here to access code

In reply to Rogers:

This is the construct you are pointing to

   if( !uvm_config_db #( MONITOR_BFM_BIND_T )::get( null , UVMF_VIRTUAL_INTERFACES , interface_name , monitor_bfm ) ) begin
            $stacktrace;
            `uvm_fatal("CFG" , $sformatf("uvm_config_db #( MONITOR_BFM_BIND_T )::get cannot find monitor bfm resource with interface_name %s",interface_name) )
       end

This construct is in a function.
The get function should look like this wrt to the 1st 2 arguments:

::get(this, "", .....)

The 1st argument means ‘this is a relative path’ and the 2nd argument means: exactly in the place where you are calling the get.
I’d try

if( !uvm_config_db #( MONITOR_BFM_BIND_T )::get(this, "", interface_name, monitor_bfm ) ) begin
            $stacktrace;
            `uvm_fatal("CFG" , $sformatf("uvm_config_db #( MONITOR_BFM_BIND_T )::get cannot find monitor bfm resource with interface_name %s",interface_name) )
       end

In reply to bob_oden:

Can you please inform me how can I fix this issue, since I did not use a code generator and uplifted the existing UVM based UVC agent?

In reply to Rogers:

As Bob mentioned in an earlier reply, this sort of error will not occur if you used the generation scripts provided by the UVMF install alongside the base UVMF class definitions. If you did not use those generator scripts there are too many variables in play to effectively help you debug and resolve the fatal error you’re seeing without a full test case or a wider view into what you’re trying to do.

Making changes to the base UVMF code class definitions is definitely not _**_the right way to go here, it’ll just dig the hole deeper.

I would suggest that you back out all changes to the UVMF base class source and look at some of the examples and run the generated examples to see how these BFM interface names are supposed to be passed around a UVMF bench, then apply the same technique to however you’re implementing things on your end.

In reply to Rogers:

In reply to bob_oden:
Can you please inform me how can I fix this issue, since I did not use a code generator and uplifted the existing UVM based UVC agent?

Can you please provide the files
sdb_tb_factory.svh
sdb_tb_hevc_decoder_test.svh
Without these files I cannot run your code.