Sie sind auf Seite 1von 10

UVM Basics

Reporting

Tom Fitzpatrick
Verification Evangelist
info@verificationacademy.com | www.verificationacademy.com

Reporting
function void write(my_transaction t);
`uvm_info(mg", "Transaction received", UVM_NONE)
Severity

Severity

Originator/ID

File

Line

Message

Time

Verbosity

Hierarchical path

ID

# UVM_INFO eg.sv(110) @ 100: uvm_test_top.m_env.m_driver [mg]


Transaction received
Message

2013 Mentor Graphics Corporation, all rights reserved.

The Report Macros


`uvm_info

("id", "message", verbosity)

`uvm_warning("id", "message")
`uvm_error

("id", "message")

`uvm_fatal

("id", "message")

From uvm_component
From uvm_sequence
From SystemVerilog module
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);
Suppress all info messages

uvm_top.set_report_severity_id_hier(
mg", UVM_NO_ACTION);
Suppress all messages with ID = "ja"

2013 Mentor Graphics Corporation, all rights reserved.

Some Common Actions


UVM_NO_ACTION

Do nothing

UVM_DISPLAY

Send report to standard output

UVM_LOG

Send report to a file

UVM_COUNT

Stop simulation when max count is reached

UVM_EXIT

Finish simulation immediately

UVM_STOP

Call $stop

2013 Mentor Graphics Corporation, all rights reserved.

Redirecting Reports to a File


_hier methods must be called after build_phase

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);

2013 Mentor Graphics Corporation, all rights reserved.

Summary 1

Test1

Test2

Reusable
verification
environment

Test3

Separating tests from test


bench

Configurable test
bench

DUT

2013 Mentor Graphics Corporation, all rights reserved.

Summary 2
Env

Subscriber

Subscriber

Agent

Agent

Sequencer

Reusable
VIP

Monitor

Sequencer

Driver

Monitor

Layered
sequences

Driver

DUT
2013 Mentor Graphics Corporation, all rights reserved.

UVM Basics
Reporting

Tom Fitzpatrick
Verification Evangelist
info@verificationacademy.com | www.verificationacademy.com

Das könnte Ihnen auch gefallen