0% found this document useful (0 votes)
84 views8 pages

UVM - Reporting Mechanism

The UVM Reporting Mechanism is utilized for debugging by controlling the display of messages with varying severity levels (Fatal, Error, Warning, Info) and verbosity settings. It includes built-in reporting methods and macros to log messages, as well as options to modify simulator default actions based on severity and IDs. Users can control message display through makefile commands to set verbosity levels for specific components and phases in the simulation.

Uploaded by

aarti10prajapati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views8 pages

UVM - Reporting Mechanism

The UVM Reporting Mechanism is utilized for debugging by controlling the display of messages with varying severity levels (Fatal, Error, Warning, Info) and verbosity settings. It includes built-in reporting methods and macros to log messages, as well as options to modify simulator default actions based on severity and IDs. Users can control message display through makefile commands to set verbosity levels for specific components and phases in the simulation.

Uploaded by

aarti10prajapati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

UVM Reporting Mechanism

It is used for Debugging purpose. It is used to control the


display of message and it is not possible in sv.
UVM Reporting has the some concepts
➢ Severity
➢ Verbosity
➢ Simulation Handing Behavior

Severity
It tells the importance of message
▪ Fatal
▪ Error
▪ Warning
▪ Info

✓ Fatal is a highest severity


✓ Info is low severity

Verbosity
It is used to control the display of message
Verbosity settings
▪ UVM_NONE -0
▪ UVM_LOW -100
▪ UVM_MEDIUM-200
▪ UVM_HIGH -300
▪ UVM_FULL -400
▪ UVM_DEBUG - 500
Reporting methods
These are builtin methods each contain 5 arguments
uvm_report_info
virtual function void uvm_report_info ( string id,
string message,
int verbosity=UVM_HIGH,
string filename = "",
int line= 0)
uvm_report_warning
virtual function void uvm_report_warning (string id,
string message,
int verbosity=UVM_MEDIUM,
string filename = "",
int line= 0)
uvm_report_error
virtual function void uvm_report_error (string id,
string message,
int verbosity=UVM_LOW,
string filename = "",
int line= 0)
uvm_report_fatal
virtual function void uvm_report_fatal (string id,
string message,
int verbosity=UVM_NONE,
string filename = "",
int line= 0)

But it is not recommended

UVM Reporting provides Macros to embed report messages.


Followings are the Macros to be used:
UVM MACROS FOR REPORTING MECHANISM
➢ `uvm_info (string ID, string message, verbosity )
➢ `uvm_error (string ID, string message )
➢ `uvm_warning (string ID, string message)
➢ `uvm_fatal (string ID, string message)

UVM SEVERITY DEFINITION


`uvm_info
It display a message
`uvm_warning
It display a message
`uvm_error
It display a message and return error count
`uvm_fatal
It display a message and exist from a simulation

Modify Simulator Default Action


By severity
Set_report_severity_action (severity, actions)
By id
Set_report_id_action (id, actions)
Example
drv.set_report_severity_action(UVM_ERROR
,UVM_LOG+UVM_EXIT);
//here default action of the error is display a message and
shows a error count but here we make a error as write a report
to file(UVM_LOG) and exit from a simulation

HOW TO CONTROL A DISPLAY MESSAGE

In make file use command


+uvm_verbosity =UVM_MEDIUM in run_test to control
a display message

For Example
function void build_phase(uvm_phase phase)
super.build_phase(phase);
`uvm_info(“UVM_DRIVER”, this is build phase,
UVM_LOW)
endfunction

function void connect_phase(uvm_phase phase)


super.connect_phase(phase);
`uvm_info(“UVM_DRIVER”, this is connect
phase,UVM_MEDIUM)
endfunction
function void end_of_elaboration_phase(uvm_phase phase)
super.end_of_elaboration_phase(phase);
`uvm_info(“UVM_DRIVER”, this is end_of_elaboration
phase,UVM_HIGH)
endfunction

function void start _of simulation_phase(uvm_phase phase)


super.start_of_simulation_phase(phase);
`uvm_info(“UVM_DRIVER”, this is start of simulation
phase,UVM_FULL)
endfunction

IN MAKE FILE
Case 1:
Run test
+uvm_verbosity=UVM_MEDIUM
Output
`uvm_info(“UVM_DRIVER”,this is build phase,
UVM_LOW
`uvm_info(“UVM_DRIVER”, this is connect
phase,UVM_MEDIUM);

Note: here uvm verbosity uvm_medium and less than


uvm_medium such as uvm_low info statement is printed
Case 2:
+uvm_verbosity=UVM_HIGH
Output
`uvm_info(“UVM_DRIVER”,this is build phase,
UVM_LOW)
`uvm_info(“UVM_DRIVER”, this is connect
phase,UVM_MEDIUM)
`uvm_info(“UVM_DRIVER”, this is end_of_elaboration
phase,UVM_HIGH)

Note: here uvm verbosity uvm_high and less than


uvm_high such as uvm_low ,uvm_medium info statement
is printed

Case 3:
+uvm_verbosity=UVM_LOW
Output
`uvm_info(“UVM_DRIVER”,this is build phase,
UVM_LOW

Note: here uvm verbosity uvm_low info statement is


printed there is no less priority than uvm_low verbosity
In make file use command
+uvm_set_verbosity =component_name, id, verbosity,
phase name ,option_all_time in make file run_test to control
a particular component &particular id &particular phase
display message

Case 5:
+uvm_set_verbosity =uvm_driver, “UVM_DRIVER”,
UVM_MEDIUM, build
Output
`uvm_info(“UVM_DRIVER”,this is build phase,
UVM_LOW
`uvm_info(“UVM_DRIVER”, this is connect
phase,UVM_MEDIUM)

Case 6:
+uvm_verbosity=UVM_NONE

OUTPUT
No info statement

Note:
Initially, UVM verbosity is set to UVM_NONE,
suppressing all informational messages.
Case 7:
+uvm_verbosity=UVM_NONE +uvm_set_verbosity
=uvm_driver, “UVM_DRIVER”, UVM_FULL, connect
Output
`uvm_info(“UVM_DRIVER”, this is connect
phase,UVM_MEDIUM)
`uvm_info(“UVM_DRIVER”, this is end_of_elaboration
phase,UVM_HIGH)
`uvm_info(“UVM_DRIVER”, this is start of simulation
phase,UVM_FULL)

Note:
Initially, the UVM verbosity is set to UVM_NONE,
suppressing all informational messages. However, using the
+uvm_set_verbosity command, the verbosity for the
uvm_driver1 component with the id UVM_DRIVER is
explicitly set to UVM_FULL during the connect phase.

As a result, prior to the connect phase, the verbosity remains at


UVM_NONE, but once the connect phase is reached, the
verbosity for uvm_driver1 is elevated to UVM_FULL.
Consequently, informational messages with a verbosity level of
UVM_FULL and below are displayed for this component.

You might also like