Professional Documents
Culture Documents
Part2 Vasudevan Uvm Tips and Tricks PDF
Part2 Vasudevan Uvm Tips and Tricks PDF
- Runtime Tips
Presented by Srivatsa Vasudevan - Synopsys, Inc.
© 2014-2016, www.verifworks.com
UVM TB Hierarchy
uvm_test_top
uvm_driver
uvm_env uvm_agent
uvm_sequencer
uvm_monitor
uvm_scoreboard
s2p_xactn_with_payload_pattern Program
Environment
Monitor scoreboard
components
Transactions
s2p_xactn
Command
component
set_type_override_by_type(
.original_type
(s2p_xactn::get_type()),
.override_type( A while later..
s2p_err_xn::get_type()));
// ... some time later
set_type_override_by_type(
.original_type
(s2p_xactn::get_type()),
.override_type(
s2p_new_err_xn::get_type())
Default - replace
.replace(1));
• Sample log
• ID: TPREGR
set_type_override_by_type(
.original_type
(s2p_xactn::get_type()),
.override_type( A while later..
s2p_err_xn::get_type()));
// ... some time later
set_type_override_by_type(
.original_type
(s2p_xactn::get_type()),
.override_type(
s2p_new_err_xn::get_type())
replace = 0
.replace(0));
• Sample log
• ID: TPREGRD
Recommended
• all_types = 1 (Default)
Registered user
types
Overrides alone!
Overrides +
Registered user
types +
UVM_*
A while later..
set_type_override_by_type(
.original_type
(s2p_xactn::get_type()),
.override_type(
s2p_err_xn::get_type()));
set_type_override_by_type(
.original_type
(s2p_xactn::get_type()),
.override_type(
s2p_xactn::get_type()));
• Sample log
• ID: TYPDUP
s2p_driver_0 = s2p_driver::type_id::create
("s2p_driver_0",this);
s2p_sqr_0 =
s2p_sequencer::type_id::create
("s2p_sqr_0",this); name
end
Crazy??
Fails
OK
Better!
http://www.cvcblr.com/blog/?p=414
http://www.cvcblr.com/blog/?p=414
UVM_INFO @ 0: reporter
[PH/TRC/SKIP] Phase
'uvm.uvm_sched.main' (id=284)
No objections raised, skipping phase
http://www.cvcblr.com/blog/?p=681
http://www.cvcblr.com/blog/?p=681
• phase_ready_to_end callback
• Mimics reset,
config via
#delays
• Uses a virtual
sequence in
main_phase
Innings
break!
JUMP!
time
Field
value
name
Field
name
value
NO get
(read)
Default No limit
SET-s
GET-s
• +UVM_TESTNAME=my_test
– Executes “class my_test extends from uvm_test”
– Should be registered with factory
• `uvm_component_utils (my_test)
– Overrides value (if present) in code:
• run_test (“default_test”)
– Only one test is run at a time
vw_uvm_sim
+uvm_set_verbosity=<comp>,<id>,<verbo
sity>,<phase|time>,<offset>
Example
vw_uvm_sim
+uvm_set_verbosity=uvm_test_top.env0.
agent1.*,_ALL_,UVM_FULL,time,800
vw_uvm_sim
+uvm_set_severity=<comp>,<id>,<orig_s
everity>,<new_severity>
Example
vw_uvm_sim
+uvm_set_severity=uvm_test_top.env_0.
*,SBRD,UVM_INFO,UVM_WARNING
vw_uvm_sim
+uvm_set_action=<comp>,<id>,<severity
>,<action[|action]>
Example
vw_uvm_sim
+uvm_set_action=uvm_test_top.env_0.*,
_ALL_,UVM_INFO,UVM_NO_ACTION