# Backdoor acess through user defined maps

**URL:** <https://verificationacademy.com/forums/t/backdoor-acess-through-user-defined-maps/33971>\
**Category:** UVM\
**Tags:** uvm\_reg\_map, UVM, DPI-backdoor-access\
**Created:** [January 24, 2018, 6:18am UTC](https://verificationacademy.com/forums/t/backdoor-acess-through-user-defined-maps/33971 "2018-01-24T06:18:49Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [January 29, 2018, 3:53pm UTC](https://verificationacademy.com/forums/t/backdoor-acess-through-user-defined-maps/33971/17 "2018-01-29T15:53:52Z")

</div>

_In reply to [usnath](https://verificationacademy.com/forums/t/backdoor-acess-through-user-defined-maps/33971/16):_

Looks a Little bits complicated. The reg\_model needs the information about the hdl\_path\_slice this has to be defined for each register. And you have to define the the hdl\_path. This looks like this:

```verilog
class my_reg_block extends uvm_reg_block;
      `uvm_object_utils(my_reg_block)
.....
     rand my_reg0 reg0;
     rand my_reg1 reg1;
.....
     
     function new(string name = "my_reg_block");
         super.new(name, UVM_NO_COVERAGE);
     endfunction
 
     virtual function void build();
         reg0 = my_reg0::type_id::create("reg0");
         reg0.configure(this);
         reg0.build();
	 reg0.add_hdl_path_slice("mode_reg[0]", 0, 8);
..........
       // the same for all other registers
..........
         // Assign dut to the hdl path
         add_hdl_path(<name of the toplevel mod>.dut", "RTL"); // dut is the RTL. The regs are on the toplevel of the dut.
         lock_model();
      endfunction

```

---

_[View the full topic](https://verificationacademy.com/forums/t/backdoor-acess-through-user-defined-maps/33971)._
