Sie sind auf Seite 1von 10

UVM Basics

Reporting

Tom Fitzpatrick Verification Evangelist

info@verificationacademy.com

|

www.verificationacademy.com

Reporting
Reporting

function void write(my_transaction t);

`uvm_info(“mg", "Transaction received", UVM_NONE)

Severity
Severity
Originator/ID
Originator/ID
Message
Message
Verbosity
Verbosity
Severity
Severity
File
File
Line
Line
Time
Time
Hierarchical path
Hierarchical path
ID
ID

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

Message Message
Message
Message

© 2013 Mentor Graphics Corporation, all rights reserved.

The Report Macros
The Report Macros

`uvm_info

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

`uvm_fatal ("id", "message")

("id", "message", verbosity)

From uvm_component

From uvm_sequence

From SystemVerilog module

© 2013 Mentor Graphics Corporation, all rights reserved.

Controlling Verbosity
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
Output if verbosity <= UVM_LOW

© 2013 Mentor Graphics Corporation, all rights reserved.

Setting Actions
Setting Actions

uvm_top.set_report_severity_action_hier( UVM_INFO, UVM_NO_ACTION);

Suppress all info messages
Suppress all info messages

uvm_top.set_report_severity_id_hier( “mg", UVM_NO_ACTION);

Suppress all messages with ID = "ja"
Suppress all messages with ID = "ja"

© 2013 Mentor Graphics Corporation, all rights reserved.

Some Common Actions
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
Redirecting Reports to a File
_hier methods must be called after build_phase
_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
Summary 1
Test1
Test1
Test2
Test2
Test3 Separating tests from test bench
Test3
Separating tests from test
bench
Reusable verification Configurable test bench environment DUT
Reusable
verification
Configurable test
bench
environment
DUT

© 2013 Mentor Graphics Corporation, all rights reserved.

Summary 2
Summary 2
Env Subscriber Subscriber Layered Agent Agent sequences Sequencer Sequencer Reusable VIP Monitor Driver
Env
Subscriber
Subscriber
Layered
Agent
Agent
sequences
Sequencer
Sequencer
Reusable
VIP
Monitor
Driver
Monitor
Driver
DUT
DUT

© 2013 Mentor Graphics Corporation, all rights reserved.

UVM Basics

Reporting

Tom Fitzpatrick Verification Evangelist

info@verificationacademy.com

|

www.verificationacademy.com