course basic uvm session8 uvm reporting tfitzpatrick
DESCRIPTION
Basic Uvm SessionTRANSCRIPT
[email protected] | www.verificationacademy.com
UVM Basics Reporting
Tom Fitzpatrick
Verification Evangelist
Reporting
function void write(my_transaction t); `uvm_info(“mg", "Transaction received", UVM_NONE)
Severity Originator/ID Message Verbosity
Severity Time Hierarchical path ID
Message
# UVM_INFO eg.sv(110) @ 100: uvm_test_top.m_env.m_driver [mg] Transaction received
File Line
Message
© 2013 Mentor Graphics Corporation, all rights reserved.
The Report Macros
• From uvm_component
• From uvm_sequence
• From SystemVerilog module
`uvm_info ("id", "message", verbosity)
`uvm_warning("id", "message")
`uvm_error ("id", "message")
`uvm_fatal ("id", "message")
© 2013 Mentor Graphics Corporation, all rights reserved.
Controlling Verbosity
`uvm_info("id", "message 1", UVM_NONE)
`uvm_info("id", "message 2", UVM_LOW)
`uvm_info("id", "message 3", UVM_MEDIUM)
`uvm_info("id", "message 4", UVM_HIGH)
`uvm_info("id", "message 5", UVM_FULL)
+UVM_VERBOSITY=UVM_LOW
Output if verbosity <= UVM_LOW
© 2013 Mentor Graphics Corporation, all rights reserved.
Setting Actions
uvm_top.set_report_severity_action_hier(
UVM_INFO, UVM_NO_ACTION);
uvm_top.set_report_severity_id_hier(
“mg", UVM_NO_ACTION);
Suppress all info messages
Suppress all messages with ID = "ja"
© 2013 Mentor Graphics Corporation, all rights reserved.
Some Common Actions
UVM_NO_ACTION
UVM_DISPLAY
UVM_LOG
UVM_COUNT
UVM_EXIT
UVM_STOP
Do nothing
Send report to standard output
Send report to a file
Stop simulation when max count is reached
Finish simulation immediately
Call $stop
© 2013 Mentor Graphics Corporation, all rights reserved.
Redirecting Reports to a File
file_h = $fopen("my.log", "w"); uvm_top.set_report_default_file_hier(file_h); uvm_top.set_report_severity_action_hier( UVM_INFO, UVM_DISPLAY | UVM_LOG);
_hier methods must be called after build_phase
© 2013 Mentor Graphics Corporation, all rights reserved.
Summary 1
DUT
Reusable verification
environment
Test1 Test2 Test3 Separating tests from test bench
Configurable test bench
© 2013 Mentor Graphics Corporation, all rights reserved.
Env
Summary 2
Agent
Sequencer
Driver Monitor
DUT
Agent
Sequencer
Driver Monitor
Subscriber Subscriber
Layered sequences
Reusable VIP
© 2013 Mentor Graphics Corporation, all rights reserved.
[email protected] | www.verificationacademy.com
UVM Basics Reporting
Tom Fitzpatrick
Verification Evangelist