mbowler Posted January 9, 2012 Report Posted January 9, 2012 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? Quote
lisakb1963 Posted January 11, 2012 Report Posted January 11, 2012 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. Quote
mbowler Posted January 11, 2012 Author Report Posted January 11, 2012 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); Quote
mbowler Posted May 2, 2012 Author Report Posted May 2, 2012 Ok, looks like it is a documentation error. It got submitted (finally) today. http://www.eda.org/mantis/view.php?id=4135 Also replacing the last line of the workaround with: rsrc.write(value, this); saves an additional lookup of the resource DB. Michael Quote
Recommended Posts
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.