klarson Posted May 14, 2012 Report Share Posted May 14, 2012 I'm trying to suppress the default messages that occur when you do a 'compare' of two uvm_object's that don't match. It looks like the standard way to do this would be to create a uvm_comparer object to establish a custom compare policy, but I'm running into problems. According to the documentation, there is a 'verbosity' variable within the uvm_comparer object with the purpose of setting the message filter level for such messages... perfect! Unfortunately though... it doesn't work Below is the actual code from the print_msg() routine of the uvm_comparer object. In the comments for the function, it describes the desired behavior. However, the implementation seems to be wrong, it disregards the 'verbosity' setting altogether, and hardcodes UVM_LOW as the verbosity level: // Function: print_msg // // Causes the error count to be incremented and the message, ~msg~, to be // appended to the <miscompares> string (a newline is used to separate // messages). // // If the message count is less than the <show_max> setting, then the message // is printed to standard-out using the current verbosity and severity // settings. See the <verbosity> and <sev> variables for more information. function void print_msg (string msg); result++; if(result <= show_max) begin msg = {"Miscompare for ", uvm_object::__m_uvm_status_container.scope.get(), ": ", msg}; uvm_report_info("MISCMP", msg, UVM_LOW); end miscompares = { miscompares, uvm_object::__m_uvm_status_container.scope.get(), ": ", msg, "\n" }; endfunction Has anybody else run into this? This looks like a bug in the UVM library, or am I interpretting the desired behavior incorrectly? Quote Link to comment Share on other sites More sharing options...
klarson Posted May 14, 2012 Author Report Share Posted May 14, 2012 Looks like a work around could be to set the 'show_max' variable in the uvm_comparer object to 0 (default is 1). This does have the effect of completely shutting off the messages during the compares, though it's not as flexible since the user can't get messages back by adjusting the global verbosity. Quote Link to comment Share on other sites More sharing options...
mastrick Posted May 15, 2012 Report Share Posted May 15, 2012 That does look wrong. Do you need someone else to file a Mantis? Another workaround would be to set a verbosity of UVM_NONE on the MISCMP id when you do not want to see it; that does require special attention to this message. Quote Link to comment Share on other sites More sharing options...
klarson Posted May 15, 2012 Author Report Share Posted May 15, 2012 I went ahead and filed a Mantis issue, I'm pretty sure it's a bug. 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.