OVM messaging utilities :
- function void ovm_report_fatal(string id, string message, int verbosity_level=100, tring filename="", int line=0);
- function void ovm_report_error(string id, string message, int verbosity_level=0, string filename="", int line=0);
- function void ovm_report_warning(string id, string message, int verbosity_level=300, string filename="", int line=0);
- function void ovm_report_info (string id, string message, int verbosity_level=200, string filename="", int line=0);
Example :
ovm_report_info("TB", "Starting out testbench \n");
Output will be :
OVM_INFO @ 0: reporter [TB] Starting out testbench
Arguments :
id - This argument is unique identifier for the message. You can assign your component name to this id. You can configure an individual report’s actions and output file descriptor using its id string.
message - Message you want to display
Verbosity - This argument specify the messges relative importance. If the verbosity argument is wrong message will be dropped. The default verbosity levels by severity are:
- OVM_FATAL=0
- OVM_ERROR=100
- OVM_WARNING =200
- OVM_INFO =300
filename and line - 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.
eg. ovm_report_info("TB", "Starting out testbench \n", , `__FILE__, `__LINE__);
Note In System Verilog:
`__FILE__ = Prints the file name from where the message got printed
`__LINE__ = Prints the line number in the file where to report function is called
output :
# OVM_INFO puneet.sv(10) @ 0: reporter [TB] Starting out testbench
|