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.
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.
`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.
+define option is required to be given during compilation. As you might already know, the tool essentially needs to do three things to run a simulation - compile, elaborate and simulate. The tool may or may not call the same executable to do all the three steps. You can set this switch in the makefile if you have one, but you need to add this switch to the tool's compiler command. If you are directly calling the tool in the shell, you can simply add this to the end of the command.