How to suppress file/line output in ovm_report_error?

Hi,

When I use ovm_report_error(get_type_name(), “My msg”), I get output that starts like this:

*** OVM: DUT error at time 139936000.0 ps
Checked at line 0 in <unknown>

I am not passing the file/line info, so I would prefer it not be print the 2nd line since it doesn’t include anything useful. The OVM reference states that “The filename and line arguments allow you to provide the location of the call to the report methods. If specified, they are displayed in the output.”

I looked where this is coming from, and it’s somewhere in the urm compatibility stuff, so I assume this is a Cadence thing. Is there a way to turn this off?

I’m running IUS8.1, haven’t tried it on 8.2.

Thanks,
Doug

Doug,

I dont think you can suppress that. It comes from the default arguments of the functions ovm_report_*(). The default value of last argument i.e. line has a value of 0. Hence it prints the same thing every time.

I think we may have to live with it.

Ashish

It’s likely that you are using `message or one of the other macros in the URM backward compatibility library. The ovm_report_* functions only print file and line if a non-empty file name is passed in.

– Mark

Hi Mark,

I guess you are mistaken.

The print statements given by Doug are printed with ovm_report_* functions as well. However, I must say that there is some difference in the behavior of these report functions. On some occassions, these statements are not printed with ovm_report_*() functions. But in some cases, it does.

I am not able to conclude why is that so…!!

But bottomline is, these print statements do get printed with ovm_report_*() functions.

Thanks,:confused:
Ashish

It’s quite possible that I am mistaken, it won’t be the first time.

The acutal message rendering is done by the report server. Each call to ovm_report_* invokes a handler in the local object which in turn delgates to the server. I believe that the use of `message anywhere in your system causes the report server to be changed to a different one – one that renders the messages in an old URM style – for ALL message reporting in the entire system, even if the call is from ovm_report_*.

– Mark

Mark,

You are correct, if I run a simple example with no uses of message(), I see output as expected based on the OVM reference. Once a single use of message() is used, the output format changes to the URM style.

Is there anyone from Cadence who can comment on this? Is there a way to have messages use the default report server unless the message comes directly from a `message macro?

-Doug

Mark,

I still doubt it.

I have still getting file and line statements using ovm_report_*() functions. Same is with warning.

But as I had quoted earlier, in some cases, I do not see that that file and line statements even with ovm_report_*() functions.

Please shed some light…

Ashish

Doug,

Can you post your experiment in the forum? That might help convince Ashish.

– Mark

Mark/Doug,

Here is what I have written.

ovm_report_error(“SAMPLE”, “Error Occurred”, OVM_LOW);

_Here is the output:

_*** OVM: DUT error at time 0
Checked at line 0 in
In ovm_test_top
Error Occurred
*** Error: A DUT error has occurred
Just to emphasize I am using ovm_report_functions. And I am still getting the line and file statements.

If you are skeptical about tools, I am using Questa 6.4c and OVM 2.0.1.

Thanks,
Ashish

The ovm_report_error syntax looks like below.

ovm_report_error ( input string id, input string mess, int verbosity_level = 100,
string filename = “”, int line = 0 );

If u call the OVM Report function with the non-empty arguments at filename and line number then those details will be printed.
For example:
ovm_report_error(“sb”,“Comparison OK”,);
will display message like below.

OVM_ERROR @ 200: t_env.sb [sb] Comparison OK

Which wont display the line number and file name.

If u call the report function with arguments for file name and line number.
ovm_report_error(“sb” , “Comparison OK” , ,__FILE__,LINE );
will display message like below.

OVM_ERROR ./alu_sb.sv(176) @ 200: t_env.sb [sb] Comparison OK

Which will display the line number and file name.

__FILE__</font>,<font color=RoyalBlue>LINEare specific to Questasim Simulator.

Ashish,

To clarify, if you have anyusages of message or dut_error, anywhere in your environment, the message will change to the URM style. Even for calls made to ovm_report_*.

Here’s an example which illustrates it. Note that the output from ovm_report_info and ovm_report_error is different before and after the usage of `message.

`include "ovm.svh"

module msg_test;

    initial begin

        ovm_report_info("msg_test", "Hello world! from ovm_report_info, before `message");
        ovm_report_error("msg_test", "Hello world! from ovm_report_error, before `message");

        `message(OVM_NONE, ("Hello world! from `message"))

        ovm_report_info("msg_test", "Hello world! from ovm_report_info, after `message");
        ovm_report_error("msg_test", "Hello world! from ovm_report_error, after `message");

    end

endmodule

This example produces the following output in IUS 8.2 and ovm-2.0.1:> OVM_INFO @ 0: reporter [msg_test] Hello world! from ovm_report_info, before message OVM_ERROR @ 0: reporter [msg_test] Hello world! from ovm_report_error, before message
[0] hier=msg_test: Hello world! from message [0] hier=__global__: Hello world! from ovm_report_info, after message
*** OVM: DUT error at time 0
Checked at line 0 in
In global
Hello world! from ovm_report_error, after `message
Will stop execution immediately (check effect is DISPLAY COUNT EXIT )
*** Error: A DUT error has occurred

In order to get the non-URM style you need to remove all uses of message and dut_error. Also if you are passing +MSG_DETAIL= to the simulator you need to remove that as well, though I think that is Cadence-specific.

-Doug


__FILE__ and LINE are part of the P1800-2009 LRM (Ballot closes next Friday!)

Hi Doug,

Thanks a lot. Your inputs really helped. In some corner of my code amongst few thousand lines, I was using `message and hence I could not even remember that. As a result, I was getting URM Style output.

Commenting that statement, displayed the statements as expected.

Thanks a lot again.

Yeah… so Dave… you were not mistaken. I was mistaken… :(

Ashish