Jump to content

uvm_resource_db::write_by_name()


Recommended Posts

I am trying to use the write_by_name() method in the resource db. According to the class reference manual, if the resource does not exist, it is created. This does not seem to be the case. Instead if you try to do a write_by_name() on a non-existent resource a bizarre error message is emitted (which does not use the report server) and the resource is not created at all. Looking at the uvm 1.1a source code I see that the function simply returns if it cannot find the resource.

It seems the error message is coming from a $display in the spell checker. Should this not be using the proper UVM reporting mechanisms?

Link to comment
Share on other sites

This was a Mantis Bug :

3757

Fixed issue where uvm_component::check_config_usage did not use

uvm reporting facilities to report, but used $display.

This is fixed in 1.1a (you will not see the bizarre regular expression message). I haven't run the 1.1a code, but if it prints a message -- it should be done through the reporting facility. There still may be an issue with it not printing anything. I'd check the Mantis database.

Link to comment
Share on other sites

I am using 1.1a. This still seems to be an issue. For the moment I am working around the issue by checking for existence of the resource before doing a write_by_name().

e.g.

rsrc = uvm_resource_db#(int)::get_by_name(rsrc_scope, "RSRC_NAME", 0);

if (rsrc == null) //Workaround write_by_name() bug when resource does not exist.

uvm_resource_db#(int)::set(rsrc_scope, "RSRC_NAME", value, this);

else

uvm_resource_db#(int)::write_by_name(rsrc_scope, "RSRC_NAME", value, this);

Link to comment
Share on other sites

  • 3 months later...

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.

 Share

×
×
  • Create New...