# \[UVM/REG/DUPLROOT\] There are 2 root register models named "reg\_model". The names of the root register models have to be unique

**URL:** <https://verificationacademy.com/forums/t/uvm-reg-duplroot-there-are-2-root-register-models-named-reg-model-the-names-of-the-root-register-models-have-to-be-unique/40335>\
**Category:** UVM\
**Tags:** SystemVerilog, UVM, uvm\_reg, RAL-UVM\
**Created:** [May 1, 2022, 10:25pm UTC](https://verificationacademy.com/forums/t/uvm-reg-duplroot-there-are-2-root-register-models-named-reg-model-the-names-of-the-root-register-models-have-to-be-unique/40335 "2022-05-01T22:25:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thadoe](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/t/ce7236/32.png) [@thadoe](https://verificationacademy.com/forums/u/thadoe)\
**Post date:** [May 1, 2022, 10:25pm UTC](https://verificationacademy.com/forums/t/uvm-reg-duplroot-there-are-2-root-register-models-named-reg-model-the-names-of-the-root-register-models-have-to-be-unique/40335/1 "2022-05-01T22:25:44Z")

</div>

Hello, I created a register layer within an env as below.

```verilog
  
  reg_model = `RAL_MODEL::type_id::create("reg_model");
  reg_model.build();
  reg_model.set_hdl_path_root(hdl_path);
  reg_model.set_coverage(UVM_NO_COVERAGE);
  `uvm_info("build_phase", "Reg Model created", UVM_LOW)
  reg_model.lock_model();

```

I passed “hdl\_path” (to dut) from base test which has env and, env get as below

```verilog

  if (!uvm_config_db#(string)::get(null, get_full_name(), "hdl_path", hdl_path))
    `uvm_fatal("",$sformatf("hdl_path is not set for reg_model %s",get_full_name()))

```

Due to test requirement, I need to replicate this env in the base test for a second dut. So, in the base test, I created another env with a different handle and another uvm\_config\_db set to pass hdl\_path of second dut. However, I am getting aforementioned error in the title.

Why do reg\_model name to be unique when they have different hierarchical path? Any suggestion for a workaround would be very helpful. Thank you for your time.

---

<div class="post-metadata">

**Author:** ![somanc](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/s/e47774/32.png) [@somanc](https://verificationacademy.com/forums/u/somanc)\
**Post date:** [April 16, 2024, 12:36pm UTC](https://verificationacademy.com/forums/t/uvm-reg-duplroot-there-are-2-root-register-models-named-reg-model-the-names-of-the-root-register-models-have-to-be-unique/40335/2 "2024-04-16T12:36:08Z")

</div>

Hi there!

Did you manage to resolve this issue you had or get a proper explanation?  
I’m currently experiencing the same issue
