Sign in to follow this  
Followers 0
Logger

Is this UVM register model bug being address? UVM/RSRC/NOREGEX

5 posts in this topic

Seen quite a few posts on various forums like this. Moving your register model to UVM-1.2 yields a bunch of warnings like this.

 

 [uVM/RSRC/NOREGEX] a resource with meta characters in the field name has been created 

 

As far as I can tell this is a bug in uvm_reg_block::configure(). If special regex characters are not allowed in the call to uvm_resource_db#(uvm_reg_block)::set(), then this function needs to sanitize the return value from get_full_name before passing it to set.

 

get_full_name() is return hierarchical paths with dots in them, as it is supposed to, but those are regex characters with ::set() complains about.

function void uvm_reg_block::configure(uvm_reg_block parent=null, string hdl_path="");  this.parent = parent; 
  if (parent != null)
    this.parent.add_block(this);
  add_hdl_path(hdl_path);


  uvm_resource_db#(uvm_reg_block)::set("uvm_reg::*", get_full_name(), this);
endfunction
 
I am not alone: https://goo.gl/REafnv
-Ryan

Share this post


Link to post
Share on other sites

At Cavium, we hand edited our version of UVM (egads!) to explicitly allow periods. Although, we felt that asterisks and a few others were probably a bad idea.

 

I know I'll probably get hate mail for abusing the standard like that, but we've got chips to make.  :)

 

Here is a patch that you can apply:

 

Index: 1_2/src/base/uvm_resource.svh

===================================================================
--- 1_2/src/base/uvm_resource.svh       (revision 329382)
+++ 1_2/src/base/uvm_resource.svh       (working copy)
@@ -1412,7 +1412,8 @@
 `ifndef UVM_NO_DEPRECATED
 begin
        for(int i=0;i<name.len();i++) begin
-               if(name.getc(i) inside {".","/","[","*","{"}) begin
+      // CAVM: Permit periods inside instance names
+               if(name.getc(i) inside {"/","[","*","{"}) begin
                        `uvm_warning("UVM/RSRC/NOREGEX", $sformatf("a resource with meta characters in the field name has been created \"%s\"",name))
                        break;
                end

Share this post


Link to post
Share on other sites

hi,

 

actually the 'bad' guy here is the line

 

uvm_resource_db#(uvm_reg_block)::set("uvm_reg::*", get_full_name(), this);

 

 

it simply doesnt make sense that every block stores itself in the config-db as part of the uvm library. see https://accellera.mantishub.com/view.php?id=5040

 

 

So, it was fixed? Was a new version of UVM 1.2 released? Or is it part of UVM 1.3?

Share this post


Link to post
Share on other sites

hi,

 

the fix will be in the next version of uvm. this will be most likely the version matching the upcoming uvm-ieee release.

 

 

/uwe

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0