Error Demotion in OVM?

Hi All,

Is it possible to have error demotion in OVM?
If I want to demote some of the checkers from ERROR to WARNING in negative testing. Is it possible in OVM?

if yes then pls paste the function to use.

Dhaval

In the OVM, you change the actions associated with a severity, an ID, or a severity/id pair; you don’t change the severity. Typically, you change the actions for a pair with this method:

set_report_severity_id_action(OVM_ERROR,"myID",OVM_DISPLAY|OVM_LOG);

This removes OVM_COUNT from the default action that counts messages to exit the simulation.

Well, there is a way, if you want to dig a little deeper into the reporting system.

The ovm_report_* functions delegate to a function called report() in the report handler. The severity level is an argument to report(). So, you could write your own delegation function where severity is a variable and change the value of that variable depending on your application.

For example

class my_report_component extends ovm_component;
 
  function new(string name, ovm_component parent);
    super.new(name, parent);
  endfunction
 
  virtual function void report(ovm_severity severity, string id, string msg, 
                               int verbosity=OVM_MEDIUM,
                               string filename="", int lineno=0);
    m_rh.report(severity, get_full_name(), id, msg, verbosity, 
                filename, lineno, this);
  endfunction
 
endclass

Now when you derive your components from my_report_component you can call report() and pass in the severity level as an argument. I’ve shown a default value for the verbosity argument, when you call report() you may want to supply an explicit verbosity argument that is consistent with the severity level argument.

– Mark

In reply to dave_59:

Hi Dave,
could you please elaborate this w/ an example? (I gather I am using older version of OVM).

In reply to m_r_m:

https://verificationacademy.com/forums/ovm/how-change-severity-message-ovm#reply-58879