




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of the universal verification methodology (uvm) and its key concepts for hardware verification. It covers topics such as test/testbench separation, phased build process, configurability, tlm communication, and hierarchical sequential stimulus. The document also explains how to build an environment using uvm, including the instantiation of verification components and the definition of connections. It further discusses the uvm configuration database, separating stimulus from the testbench, and designing sequence items. Useful for understanding the architectural design of a uvm testbench and the structural building blocks of a uvc (uvm verification component).
Typology: Cheat Sheet
1 / 244
This page cannot be seen from the preview
Don't miss anything!





























































































Base Classes in UVM
The Keys to Verification Productivity
Your VIP &
Verification
Environments
Class Library
Methodology
UVM Key Concepts
VC
VC VC VC
SPI I/F
DUT
seq_item
10
class dut_agent extends uvm_component; `uvm_component_utils(dut_agent) dut_agent_cfg m_cfg; uvm_analysis_port #(dut_txn) ap; dut_monitor m_monitor; dut_driver m_driver; uvm_sequencer #(dut_txn) m_seqr; … function void build_phase(uvm_phase phase); … endfunction
function void connect_phase(uvm_phase phase); m_monitor.dut_if = m_cfg.bus_if; ap = m_monitor.ap; if(m_cfg.active == UVM_ACTIVE) begin m_driver.seq_item_port.connect( m_seqr.seq_item_export); m_driver.dut_if = m_cfg.bus_if; end … endfunction
endclass
DUT
UVC (agent)
Sequencer Driver
Monitor
Configuration Object
class my_env extends uvm_env; uvm_component_utils(my_env) agent1 m_agent1; agent2 m_agent2; my_scoreboard m_scoreboard; my_env_config m_cfg; function new(string name = “my_env”, uvm_component parent = null); super.new(name, parent); endfunction **function void build_phase(uvm_phase phase);** if(!uvm_config_db #( my_env_config )::get( this , "", “my_env_config" , m_cfg ) beginuvm_error(“Env: build", “can’t get env_config") end if(m_cfg.has_agent1) begin uvm_config_db #(agent1_config)::set( this , "m_agent1","agent1_config",m_cfg.m_agent1_cfg); m_agent1 = agent1::type_id::create("m_agent1", this); end if(m_cfg.has_agent2) begin uvm_config_db #(agent2_config)::set( this , "m_agent2","agent2_config",m_cfg.m_agent2_cfg); m_agent2 = agent2::type_id::create("m_agent2", this); end if(m_cfg.has_my_scoreboard) begin m_scoreboard = my_scoreboard::type_id::create("m_scoreboard", this); end endfunction:build_phase
DUT
UVM Configuration Database
set e.a.d.x = 4
set a.d.x = 3
set d.x = 2;
get x = 4
Path Value
{test .e.a.d.x} 4
{test.e .a.d.x} 3
{test.e.a .d.x} 2
{test.e.a.d .x} 1
Highest Write Wins
set e.y = 4
get y; set a.y = y
get y; set d.y = y;
get y = (^4)
Usually, a component will get its configuration and use that to configure its children
123
Separating Stimulus from the
Testbench
DUT
16
This is the “transaction”
Make all “input” properties rand
do_copy() do_compare() convert2string() do_print() do_record() do_pack() do_unpack()
Methods for standard operation
Users call copy(), compare()…
Virtual method
do_copy() do_compare() convert2string() do_print() do_record() do_pack() do_unpack()
do_copy()
Chain the copy with parent classes
do_copy()
Copy members of rhs to this
do_copy()