Source – UVM Framework Directory
The uvm_report_object
provides an interface to the UVM reporting facility. UVM reporting plays a crucial role in tracking the progress of the testbench, identifying issues, and debugging. It provies a rich set fo message display commands and methods to track and report erros, warnings and information.
The methods in uvm_report_object are delegated to the uvm_report_handler
, which manages reporting configurations such as actions, verbosity, and other settings. The report handler decides whether a message should be displayed based on these configurations. If the message is to be displayed, the report handler passes it to a central uvm_report_server
for formatting and output. The uvm_report_server is a global server that processes and displays all reports generated by the uvm_report_handler, ensuring consistent message handling across the UVM environment.
Report Messages
Reporting macros
are essential for displaying messages during simulation, helping to identify potential issues and track the status of the testbench. The most commonly used reporting macros include:
- UVM_INFO: Used to display informative messages, providing details about the simulation’s progress or the status of specific events.
- UVM_WARNING: Indicates a potential problem that may not cause an immediate failure but could lead to issues if not addressed.
- UVM_ERROR: Signals a real problem that impacts the correctness of the simulation. Although an error is reported, the simulation continues based on the configured message action.
- UVM_FATAL: Reports a critical issue from which the simulation cannot recover. After reporting the fatal error, the simulation exits with a #0 delay using $finish.
These macros make debugging and tracking issues more efficient, allowing engineers to identify errors quickly within their UVM environment.
Syntax
In UVM, the uvm_info macro is used to display informational messages during simulation.
`uvm_info(<String ID>, <String MSG>, <Verbosity>);
The syntax of this macro includes three key elements:
String ID: This tag identifies the message and specifies which component or process it is related to. By using meaningful IDs, you can categorize and quickly search for specific messages in the simulation log. For example, “UART_TX” could tag messages related to the transmit path of a design.
String MSG: This is the actual message content that gets displayed. It provides details or context about what is happening in the simulation at a given point. For instance, the message might describe the initialization of a block or the detection of a particular event.
Verbosity: The verbosity level allows you to configure how the UVM report server handles the message. With this setting, you can filter out irrelevant messages and focus on those of particular interest. Verbosity levels include UVM_LOW, UVM_MEDIUM, UVM_HIGH, etc., providing flexibility in the amount of detail displayed.
For a message to appear on the simulator console, the configured verbosity of the simulation must be greater than or equal to the verbosity level set in the uvm_info
macro.
Verbosity | Value | Description |
---|---|---|
UVM_NONE | 0 | Report is always printed. Verbosity level setting cannot disable it. |
UVM_LOW | 100 | Report is issued if configured verbosity is set to UVM_LOW or above. |
UVM_MEDIUM | 200 | Report is issued if configured verbosity is set to UVM_LOW or above. |
UVM_HIGH | 300 | Report is issued if configured verbosity is set to UVM_LOW or above. |
UVM_FULL | 400 | Report is issued if configured verbosity is set to UVM_LOW or above. |
UVM_HIGH | 500 | Report is issued if configured verbosity is set to UVM_LOW or above. |
Note: UVM_MEDIUM is set as the default value of verbosity.
Example:
`uvm_info("UART_TX", "UART Transmission started successfully", UVM_MEDIUM);
In this example:
- “UART_TX” is the String ID.
- “UART Transmission started successfully” is the String MSG.
- UVM_MEDIUM sets the Verbosity level.
Note: Among the UVM reporting macros, only uvm_info
includes the verbosity argument. The other three macros: uvm_warning
, uvm_error
, and uvm_fatal
do not have this argument. These macros report messages of fixed severity, meaning they do not rely on verbosity settings to filter or display the message.