Error-[NOA] Null object access

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.

In reply to chr_sue:

Here is the file Click here to access the file

In reply to Rogers:

The code structure is strange. There seems to be a file named
sdb_tb_base_test.svh.
In the EDAPlayground there is only
sdb_tb_base_test.sv.

In reply to Rogers:

Any time you uplift an existing UVM based UVC you will need to understand how the UVC is configured, how it receives the resources it needs, and how to access resources it provides. This information is provided in the UVMF’s Users Guide. I suggest reading the Users Guide section on environment and interface initialization in addition to backing out any changes to the uvmf base package and reviewing the examples provided in the UVMF installation as Jon suggested.

In reply to chr_sue:

there is that file already i have updated the structure please check here cleck here to access the files

In reply to Rogers:
Thanks, I have seen it now.
What still is missing is a couple of packages:
import uvm_pkg::;
import uvd_reg_pkg::
;
import uvd_lcm_pkg::;
import uvd_scm_pkg::
;
import vcn_mdm_pkg::;
import uvd_sre_pkg::
;
import uvd_sdb_avail_pkg::*;
I’m not sure where they are coming from.