# Error Demotion in OVM?

**URL:** <https://verificationacademy.com/forums/t/error-demotion-in-ovm/25817>\
**Category:** OVM\
**Tags:** OVM\
**Created:** [October 2, 2008, 12:34pm UTC](https://verificationacademy.com/forums/t/error-demotion-in-ovm/25817 "2008-10-02T12:34:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhaval\_Shah](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/d/54ee81/32.png) [@Dhaval\_Shah](https://verificationacademy.com/forums/u/Dhaval_Shah)\
**Post date:** [October 2, 2008, 12:34pm UTC](https://verificationacademy.com/forums/t/error-demotion-in-ovm/25817/1 "2008-10-02T12:34:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [October 2, 2008, 3:01pm UTC](https://verificationacademy.com/forums/t/error-demotion-in-ovm/25817/2 "2008-10-02T15:01:31Z")

</div>

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:

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

---

<div class="post-metadata">

**Author:** ![mglasser](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@mglasser](https://verificationacademy.com/forums/u/mglasser)\
**Post date:** [October 5, 2008, 3:54am UTC](https://verificationacademy.com/forums/t/error-demotion-in-ovm/25817/3 "2008-10-05T03:54:25Z")

</div>

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

```auto
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

---

<div class="post-metadata">

**Author:** ![m\_r\_m](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/5daacb/32.png) [@m\_r\_m](https://verificationacademy.com/forums/u/m_r_m)\
**Post date:** [April 7, 2023, 7:18am UTC](https://verificationacademy.com/forums/t/error-demotion-in-ovm/25817/4 "2023-04-07T07:18:51Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/error-demotion-in-ovm/25817/3):_

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

---

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [April 7, 2023, 3:04pm UTC](https://verificationacademy.com/forums/t/error-demotion-in-ovm/25817/5 "2023-04-07T15:04:19Z")

</div>

_In reply to [m\_r\_m](https://verificationacademy.com/forums/t/error-demotion-in-ovm/25817/4):_

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