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
`ifdef UVM_REPORT_DISABLE_FILE_LINE `define UVM_REPORT_DISABLE_FILE `define UVM_REPORT_DISABLE_LINE `endif `ifdef UVM_REPORT_DISABLE_LINE `define uvm_line 0 `else `define uvm_line `__LINE__ `endif `ifdef UVM_REPORT_DISABLE_FILE `define uvm_file "" `else `define uvm_file `__FILE__ `endif `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); \ end
You can also disable them individually by providing the compiler with
+define+UVM_REPORT_DISABLE_FILE to disable reporting of line and file respectively.