Hi,
I am trying to get around this error in my environment.
The environment structure that I have with my register model look something like this (I rather want it to look like this).
- env.sub_env[0].regmodel
- env.sub_env[1].regmodel
- env.sub_env[2].regmodel
{all "regmodel"s above are instances of the same registermodel class}
I am getting this error from UVM library since the register model instance names are all similar in all of the sub-environments. I look at the code and I see this. ( see uvm_reg_block.svh )
// Check that root register models have unique names
// Has this name has been checked before?
if (m_roots[this] != 1) begin
int n = 0;
foreach (m_roots[_blk]) begin
uvm_reg_block blk = _blk;
if (blk.get_name() == get_name()) begin
m_roots[blk] = 1;
n++;
end
end
if (n > 1) begin
`uvm_error("UVM/REG/DUPLROOT",
$sformatf("There are %0d root register models named \"%s\". The names of the root register models have to be unique",
n, get_name()))
end
end
It does not make sense to me why we only look at the root name and not the full register model instance hierarchy? Can anyone pitch in here? If any of you know of a way to get around this, please let me know.
Thank you!