Uvm_report_error(..., UVM_ERROR) not reported in log file (UVM_VERBOSITY=UVM_NONE)

Hi,

I see a difference in the way the simulation log messages are printed when OVM test bench code was converted to UVM.

In the new UVM test bench, when simulation was run with verbosity set to UVM_NONE, the test case passed. But the same test case fails when the simulation was run with verbosity set to UVM_DEBUG.

When simulation was run with verbosity of UVM_DEBUG, test case is failing with UVM_ERROR type messages printed in the log file. Though the severity for the uvm_report_error method was UVM_MEDIUM, the message was not printed when the simulation was run with UVM_VERBOSITY set to UVM_NONE.

Please guide what could be going wrong.

Thanks!

I know this is trivial thing to ask, but are you running the test with the same seed value as you ran for UVM_NONE?

I cant think of a reason why it could fail when you change the verbosity level.

In reply to Ashith:

Test was run with the same seed.

That’s the correct behavior.

+UVM_VERBOSITY command line argument value is used to set the threshold value for UVM messages reporting. All the messages (uvm_report_info/warning etc) which has a verbosity value greater than the threshold are ignored. Only the messages which has a verbosity lesser than the threshold value are printed.

typedef enum
{
UVM_NONE = 0,
UVM_LOW = 100,
UVM_MEDIUM = 200,
UVM_HIGH = 300,
UVM_FULL = 400,
UVM_DEBUG = 500
} uvm_verbosity;

i.e., if you run with +UVM_VERBOSITY=UVM_NONE, then only UVM_NONE messages shall be printed.
If you run with +UVM_VERBOSITY=UVM_LOW, then only the UVM_NONE, UVM_LOW messages shall be printed and so on…

In your case, reporting severity is set to UVM_MEDIUM (200) where as the threshold (+UVM_VERBOSITY) is set to UVM_NONE (0) and hence the message is not printed.

Hi Raj,

 what ever you said is true for uvm_report_info, where as for ovm_report_error is has to be printed irrespective of verbosity level.

First of all we should not use reporting method instead use reporting macros.

In reply to cool_cake20:

As I understand from the first post, seems like “San” is using uvm_report_error method.
I just explained that the behavior reported is indeed expected one.

For uvm_report_error method, error will not be reported if +UVM_VERBOSITY is set to UVM_NONE, as the default verbosity for uvm_report_error is UVM_LOW.

And yes the reported issue wouldn’t have occurred, had the macro `uvm_error been used; because the macros enforce a verbosity setting of UVM_NONE for warning/error/fatal so that they won’t be mistakenly switched off.

May be, I should have added a recommendation to use `uvm_error() along with the explanation.

Hi Raj,

   there was typo in my previous mail ,i am referring to uvm only.

Currently i am working on ovm (not moved to uvm yet)

As far as i remember it was issue in earlier releases of OVM.

Where as user wrote like this "ovm_report_error(“XYZ”,“INTO THE WILD”,OVM_MEDIUM) " if you run with verbosity OVM_NONE then it will not be printed where as if you run with OVM_DEBUG it will be printed (as you explained)

But ERROR is ERROR ,based on that only we will concluded whether test passed it or not.But the above one filters it out based on verbosity which is wrong.

so later versions of OVM have corrected that (if you look the source code)

when ever some one call ovm_report(error|fatal) they gonna ignore the severity of it and it will append OVM_NONE as severity

so if you call ovm_report_error with irrespective of OVM_(NONE|MED|LOW|HIGH|DEBUG) it is going to be printed.

I am expecting the same functionality in UVM also.

In reply to S.P.Rajkumar.V:

I undestand, the behavior is expected.

But, this seem to be an area to fix, as UVM_ERROR messages, no one would want to filter in the logs. Not sure if UVM later versions have a fix for this.

The suggested coding pracise, as I understand would be:

  1. Always pass verbosity value of UMV_NONE/OVM_NONE to ovm_report_error.
    OR
  2. Use macro uvm_error/ovm_error instead, that defaults the verbosity as UVM_NONE.

-San

In reply to San:

Correct. You should always use the `uvm_error macros that only look at the verbosity of the message when the error is demoted to warning or info.

In reply to dave_59:

Can someone let me know whether this same issue exist in OVM as well ?? or its been fixed in a latest version of OVM ??

Please reply…

In reply to San:

From ovm 2.0.3 version onwards they have fixed this issue.If you look at the ovm 2.0.3 release notes.

/******************
All OVM library ovm_report_warning,ovm_report_error and ovm_report_fatal messages were changed to have OVM_NONE
verbosity to prevent user-configured verbosity settings from inadvertently suppressing them.
//**************************

In reply to cool_cake20:

Thanks!

One last follow-on question: Is this fix available in any UVM release ?? If so in which release?

In reply to San:

The OVM/UVM documentation is incorrect, and this still has not been fixed.

See 404

In reply to cool_cake20:

The mantis you have pointed tells the signature difference between `uvm_error and uvm_report_error and also the problem mentioned by San in UVM methodology.

In reply to dave_59:

Dave,

you mean't say that this problem is still persist in ovm-2.1.2(the last release), I don't think so.

i have checked with two releases i.e ovm-2.1.2 and ovm-2.0.2

ovm-2.0.2 has suppressed the ovm_repor_error if message verbosity greater than configured verbosity,but ovm-2.1.2 did not.

If you look at ovm_report_server::report function in src/base/ovm_extern_report_server.svh



In ovm-2.1.2 src/base/ovm_extern_report_server.svh // 

if(severity == ovm_severity'(OVM_INFO) && verbosity_level > rh.m_max_verbosity_level)
 begin 
return; 
end

In ovm-2.0.2 src/base/ovm_extern_report_server.svh
// filter based on verbosity level
if(verbosity_level > rh.m_max_verbosity_level)
 begin
 return;
 end

If you look at the code of ovm-2.1.2, the function will return empty without printing the message, only if it is ovm_report_info and the message verbosity level is greater than the configured verbosity. Whereas for ovm_report_(warning|error|fatal), the messages will be printed irrespective of the message verbosity level.

If you look at the code of ovm-2.0.2, the function will return empty without printing the message for all ovm_report_(info|warning|error|fatal) if message verbosity level is greater than the configured verbosity.