Jump to content

Possible minor bug in uvm_config_db


Recommended Posts

I put this, which admittedly has a mistake, in my agent (build_phase):

if (uvm_config_db #(bit)::get( this, "", "expected_read_delay", m_monitor.expected_read_delay))

$display("\n%s FOUND value %b for 'expected_read_delay' in UVM_CONFIG_DB\n",

get_full_name(), m_monitor.expected_read_delay);

MY MISTAKE was that "expected_read_delay" is an int, not a bit.

The "expected_read_delay" had a good default value, so I had not "set" anything in the uvm_config_db to try and override it. HOWEVER, the UVM system:

1) DID override my default value (to 0), and

2) Did so WITHOUT printing out my "FOUND value" message

Once I switched to properly looking in uvm_config_db#(int), the UVM system started leaving my default value alone, as it should.

This was on UVM-1.1 (11.10-p001)... not MUCH of a bug, but I thought that was kind of a mean trick to play, in response to my pilot error.

Link to comment
Share on other sites

The argument to get() is defined as an inout. Because the argument was only a bit, when it copied the value back out (unmodified by UVM), the value of your variable was lost (except the lower-order bit). If the argument had been defined as "ref" instead, then you would have seen a compile error from the type mismatch, but then only exactly matching types could be used for the argument.

Link to comment
Share on other sites

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...