UVM 1.2 new warning - a resource with meta characters in the field name has been created

Hi ,
I recently move from UVM-1.1 to UVM-1.2, I got to say that the shifting wasn’t as hard as I though it will.
As for my question, UVM-1.2 has new checker in resource_db which verify that the name of the resource fields doesn’t have meta characters (“.”,“/”,“[”,“*”,“{”}), the check is implemented inside uvm_resource new function. When the checker detect a field with meta data it trigger warning message.
In order to avoid this warning I removed all meta data from mt resource fields names but the problem is that uvm_reg_block add fields name to resource_db with “.” when it has holds instance of another block (block inside block). These type of register model usually exits in top level environment.
Any idea why this checker was added?
In order to avoid this warning I extends uvm_report_catcher and demoted the message. Is there another way to avoid it?

In reply to Eranr:

uvm-1.1 and uvm-1.2 both are supporting globbing and regular expressions.
globbing constructs are internally converted into reg expressions. For more Details see

function string uvm_glob_to_re(string glob);

In reply to chr_sue:

Hi,
Thank you for taking time to read and responding my question.
I probably was not clear in my question, uvm_glob_to_re is used for the resource scoop.
I’m talking about the resource field name.
UVM-1.2 has new checker that verify that the field name doesn’t contain meta data see code below:

begin
	for(int i=0;i<name.len();i++) begin
		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	
	end	
end

As you can see, when using one of the meta characters a warning message is trigger.
The problem is that uvm_reg_block add field with “.” in the field name to resource db. This causes the checker mention above to trigger.
see configure and get_full_name functions in uvm_reg_block.svh.

In reply to Eranr:

For me it is not clear what you mean with ‘meta data’.
The resource or config db are storing values with respect to names. The scope/context fields helps us to consiider the hierarchy or a certain scope.
The values can have any data type (built-in/user-defined, including classes, virtual Interfaces, etc.)

In reply to chr_sue:

Meta character are one of the following “.”,“/”,“[”,“*”,“{”}.
There is a new checker in UVM-1.2, which checks that the fields name in resource don’t contain one of the above character.
See resource_db new function.

In reply to Eranr:

OK, I understand.
Your value is in something like this val[1] etc.
You can still use this Syntax, but you have to escape each of these special characters.

In reply to chr_sue:

It’s not my value, it’s the value that the uvm_reg_block puts in the db.
The name looks this way:
“block1.subblock”

I asked if anyone knows what’s the purpose of the new checker, and if there is a way to prevent from uvm_reg_model to add fields with names that contain meta characters?

In reply to Eranr:

But you have written the code, I guess. The dot(‘.’) is an Expression for globbing/regexp.
To overcome this issue you have to escape this special character by preceding a .
This results in

block\.subblock

But I’m surprized you are putting a Register sub-block into the config_db.

In reply to chr_sue:

uvm_reg_block adds each block to the resource db automatically in configure function see code below:

// configure

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

When block is placed inside another block, get_full_name() function returns “block.subblock” without preceding .
This causes the checker in resource_db to trigger, the checker that verify that field name doesn’t contain meta character.

Any idea how to overcome this? in the register block.
Any idea why UVM-1.2 has this checker?

In reply to Eranr:
I believe the checker is very useful.
What you can do is to modify what get_full_name() is returning.

In reply to chr_sue:

I will modify get_full_name() function.
Thank you for responding

Hi Eranr,

I’m too getting a large number of these errors i have gone through your post.
Can you please let me know how did you fix this.

Regards,
krs