Getting a fatal error when doing backdoor acces uvm reg test

When i try to access registers using backdoor access , i get a fatal error. I tried

UVM_FATAL @ 0: reporter [UVM_HDL_DEPOSIT] uvm_hdl DPI routines are compiled off. Recompile without +define+UVM_HDL_NO_DPI

In reply to vinodkumar1993:

It seems you were compiling your code with setting a specific macro (UVM_HDL_NO_DPI). But backdoor access needs the compile. Follow the instruction the compiler gave to you.

I followed the instruction but still i am getting same error.

In reply to vinodkumar1993:

Is it still the same error message?
Could you post a little bit more of the compile-log file.
What simulator are you using?

yes it gives same error.
I am using questa 10.0b with uvm 1.1d compiled library.

UVM_FATAL @ 0: reporter [UVM_HDL_READ] uvm_hdl DPI routines are compiled off. Recompile without +define+UVM_HDL_NO_DPI

— UVM Report Summary —

** Report counts by severity

UVM_INFO : 18

UVM_WARNING : 0

UVM_ERROR : 0

UVM_FATAL : 1

** Report counts

In reply to vinodkumar1993:

Based on another forum discussions on the same issue it looks like Vinod is using Questa 10.0 with custom UVM 1.1d - I guess that old Questa needs that macro to compile newer UVM, can someone from Mentor confirm please?

Srini
www.go2uvm.org

In reply to vinodkumar1993:

Could you please how to you compile the code. Please show a Makefile or a compile-script.

to compile the code i used

vlog top.sv

and to simulate the code i used

vsim top -voptargs=“+acc=rnb+/top/DUT/n_state” +UVM_TESTNAME=backdoor_test

In reply to vinodkumar1993:

You have all the UVM testbench, test and sequence code in 1 file?
I do not believe this.
Is your example a common example from the verification academy or the Questa examples or is it your individual example?

no, every block of codes are in different files. test is in different and sequences are in different file. i have included all files according to the hierarchy to compile those files.
It is my own individual example.

In reply to vinodkumar1993:

OK. I understood you are including all seperate files in top.sv. I’d expect this is not compiling because it requires the include dirs from the UVM lib to deal with the macros.
Did you check all your macros with respect to UVM_HDL_NO_DPI?

I didn’t get your point. And how would i check my macros with respect to UVM_HDL_NO_DPI.

In reply to vinodkumar1993:

Your error message from the beginning points to the UVM function uvm_hdl_deposit which is defined in the file uvm_hdl.svh in the dpi folder of the UVM library:
function int uvm_hdl_deposit(string path, uvm_hdl_data_t value);
uvm_report_fatal(“UVM_HDL_DEPOSIT”,
$sformatf(“uvm_hdl DPI routines are compiled off. Recompile without +define+UVM_HDL_NO_DPI”));
return 0;
endfunction

It seems somewhere in your environment the macro UVM_HDL_NO_DPI is define.
You have to search for this macro your environment and your testbench code.
What version of Questa you are using?

I am using questa 10.0b.

and there is no place in my testbench code where UVM_HDL_NO_DPI is defined.

In reply to vinodkumar1993:

Which UVM version are yyou using. Did you download a version from Accellera or do you use a version delivered with Questa. Lokk there for the corresponding macro.

I am using UVM-1.1d and i have downloaded it from Accellera .

In reply to vinodkumar1993:
OK. But UVM code has to use macros for factory registration etc. How do you make this available to your code?
Could you please show the include part of top.sv.

To make that happens i added uvm_macros.svh to my project so that i can use macros for factory registration. these are the include files in my top

include "uvm_macros.svh" include “backdoor_reg_test.sv”
import uvm_pkg::*;
`include “interface.sv”

module top;

In reply to vinodkumar1993:

I do not believe that this compiles. Because the backdoor_reg_test.sv requires the uvm_pkg.
What is inside backdoor_reg_test.sv. As you show me the code it has to contain all the other stuff, i.e. UVM testbench, sequences, tests etc. Right?