This set of macros provides wrappers around the uvm_report_* Reporting functions. The macros serve two essential purposes:
The macros also enforce a verbosity setting of UVM_NONE for warnings, errors and fatals so that they cannot be mistakingly turned off by setting the verbosity level too low (warning and errors can still be turned off by setting the actions appropriately).
To use the macros, replace the previous call to uvm_report_* with the corresponding macro.
//Previous calls to uvm_report_* uvm_report_info("MYINFO1", $sformatf("val: %0d", val), UVM_LOW); uvm_report_warning("MYWARN1", "This is a warning"); uvm_report_error("MYERR", "This is an error"); uvm_report_fatal("MYFATAL", "A fatal error has occurred");
The above code is replaced by
//New calls to `uvm_* `uvm_info("MYINFO1", $sformatf("val: %0d", val), UVM_LOW) `uvm_warning("MYWARN1", "This is a warning") `uvm_error("MYERR", "This is an error") `uvm_fatal("MYFATAL", "A fatal error has occurred")
Macros represent text substitutions, not statements, so they should not be terminated with semi-colons.
Report Macros | |
This set of macros provides wrappers around the uvm_report_* Reporting functions. | |
Macros | |
`uvm_info | |
`uvm_warning | |
`uvm_error | |
`uvm_fatal | |
`uvm_info_context | |
`uvm_warning_context | |
`uvm_error_context | |
`uvm_fatal_context |
`uvm_info(ID,MSG,VERBOSITY)
Calls uvm_report_info if VERBOSITY is lower than the configured verbosity of the associated reporter. ID is given as the message tag and MSG is given as the message text. The file and line are also sent to the uvm_report_info call.
`uvm_warning(ID,MSG)
Calls uvm_report_warning with a verbosity of UVM_NONE. The message can not be turned off using the reporter’s verbosity setting, but can be turned off by setting the action for the message. ID is given as the message tag and MSG is given as the message text. The file and line are also sent to the uvm_report_warning call.
`uvm_error(ID,MSG)
Calls uvm_report_error with a verbosity of UVM_NONE. The message can not be turned off using the reporter’s verbosity setting, but can be turned off by setting the action for the message. ID is given as the message tag and MSG is given as the message text. The file and line are also sent to the uvm_report_error call.
`uvm_fatal(ID,MSG)
Calls uvm_report_fatal with a verbosity of UVM_NONE. The message can not be turned off using the reporter’s verbosity setting, but can be turned off by setting the action for the message. ID is given as the message tag and MSG is given as the message text. The file and line are also sent to the uvm_report_fatal call.
`uvm_info_context(ID,MSG,VERBOSITY,CNTXT)
Operates identically to `uvm_info but requires that the context in which the message is printed be explicitly supplied as a macro argument.
`uvm_warning_context(ID,MSG,CNTXT)
Operates identically to `uvm_warning but requires that the context in which the message is printed be explicitly supplied as a macro argument.
`uvm_error_context(ID,MSG,CNTXT)
Operates identically to `uvm_error but requires that the context in which the message is printed be explicitly supplied as a macro argument.
`uvm_fatal_context(ID,MSG,CNTXT)
Operates identically to `uvm_fatal but requires that the context in which the message is printed be explicitly supplied as a macro argument.