Facebook/LinkedIn login is now deprecated, please disconnect our access to your social profile.
User dashboard under chipverify.com/connect will be deprecated from Oct 1, 2020, Read More.
Let us contribute to a cleaner Earth, Go Green Updated: May 31, 2020
1 minute reading time (257 words)

how to disable file name and line numbers in reports

how to disable file name and line numbers in reports

UVM has this nice feature of being able to print the line number and file name from where a reporting task is called. This is very helpful during the early days of testbench debug, but it can soon clutter the log reports. Just imagine having the file name occupy most of the screen space, true in most projects because of the long path to a file, only to make it difficult for you to find the actual report message. Good News ! There's a way to disable this.

There are two ways to print a message.

Using report functions

uvm_report_info  ("MYINFO", "Informational Message", UVM_HIGH);
uvm_report_error ("MYERR", $sformatf ("Oops, Our rabbit was never designed to jump rbt=%0h", rbt));

This will not print the FILE and LINE information.

Using report macros

`uvm_info  ("MYINFO", "Informational Message", UVM_HIGH)
`uvm_error ("MYERR", $sformatf ("Oops, Our rabbit was never designed to jump rbt=%0h", rbt))    

This will print FILE and LINE information.

The report macros `uvm_* eventually call uvm_report_* functions, and provide the FILE and LINE information to them. You can disable it by using the compile time option +define+UVM_REPORT_DISABLE_FILE_LINE.

  `define uvm_line 0
  `define uvm_line `__LINE__
  `define uvm_file ""
  `define uvm_file `__FILE__
`define uvm_info(ID, MSG, VERBOSITY) \
   begin \
     if (uvm_report_enabled(VERBOSITY,UVM_INFO,ID)) \
       uvm_report_info (ID, MSG, VERBOSITY, `uvm_file, `uvm_line, "", 1); \

You can also disable them individually by providing the compiler with +define+UVM_REPORT_DISABLE_LINE or +define+UVM_REPORT_DISABLE_FILE to disable reporting of line and file respectively.

what is the m_sequencer ?
what happens when you register a component with fa...

By accepting you will be accessing a service provided by a third-party external to https://www.chipverify.com/

You consent to our cookies if you continue to use our website. To know more about cookies, see our privacy policy. I accept cookies from this site.