Jump to content

Recommended Posts

Posted

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
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...