Chris Burns Posted February 27, 2012 Report Share Posted February 27, 2012 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. Quote Link to comment Share on other sites More sharing options...
jadec Posted March 5, 2012 Report Share Posted March 5, 2012 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. Quote Link to comment Share on other sites More sharing options...
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.