# VHDL Slicing in RAL Backdoor Paths - Possible?

**URL:** <https://verificationacademy.com/forums/t/vhdl-slicing-in-ral-backdoor-paths-possible/39088>\
**Category:** UVM\
**Tags:** UVM, uvm-ral, Backdoor\_access-HDL-access-methods\
**Created:** [May 18, 2021, 1:25am UTC](https://verificationacademy.com/forums/t/vhdl-slicing-in-ral-backdoor-paths-possible/39088 "2021-05-18T01:25:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sierramm](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/d2c977/32.png) [@sierramm](https://verificationacademy.com/forums/u/sierramm)\
**Post date:** [May 18, 2021, 1:25am UTC](https://verificationacademy.com/forums/t/vhdl-slicing-in-ral-backdoor-paths-possible/39088/1 "2021-05-18T01:25:12Z")

</div>

Hi,

I’m going through the registers on my project and defining backdoor paths, and I’ve run into a particular issue I can’t seem to solve. I have my register block configured similar to this:

```verilog

reg_model_h.configure(.hdl_path("top.dut"));

```

For most registers, using add\_hdl\_path\_slice() works fine. However, I get errors when trying to do this:

```verilog

reg_model.example_reg.add_hdl_path_slice("registers.example_reg(10 downto 9)", .offset(9), .size(2));

```

My understanding is the cause of this failing is that Questa (what I’m using) requires brackets to evaluate correctly:

```verilog

"{top.dut.registers.example_reg(10 downto 9)}"

```

As far as I can tell, I can’t add brackets around the full path. Adding them around the slice doesn’t work as the block path is still prepended to it, and that doesn’t evaluate correctly. I’ve considered setting it directly after adding the slice, but I can only get the path, there’s no direct set method as far as I can see. Are my assumptions correct, and is this task possible?

---

<div class="post-metadata">

**Author:** ![sierramm](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/d2c977/32.png) [@sierramm](https://verificationacademy.com/forums/u/sierramm)\
**Post date:** [May 18, 2021, 6:13am UTC](https://verificationacademy.com/forums/t/vhdl-slicing-in-ral-backdoor-paths-possible/39088/2 "2021-05-18T06:13:16Z")

</div>

Hi - I found the solution - I’d assumed VHDL code meant I needed to use (M downto N) syntax, but the truth is you can just use SystemVerilog [M:N] syntax. You don’t need curly brackets, my fix was with the following method:

```verilog

reg_model.example_reg.add_hdl_path_slice("registers.example_reg[10:9]", .offset(9), .size(2));

```

My guess is this is because the backdoor access method is in SystemVerilog and maybe the way it evaluates is different to how Questa evaluates paths.
