Jump to content

uvm_comparer and message verbosity issue

Recommended Posts

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);


if(result <= show_max) begin

msg = {"Miscompare for ", uvm_object::__m_uvm_status_container.scope.get(), ": ", msg};

uvm_report_info("MISCMP", msg, UVM_LOW);


miscompares = { miscompares, uvm_object::__m_uvm_status_container.scope.get(), ": ", msg, "\n" };


Has anybody else run into this? This looks like a bug in the UVM library, or am I interpretting the desired behavior incorrectly?

Link to comment
Share on other sites

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.

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.

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