Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1
Accellera Systems Initiative
Outline
Part A - Introduction
Part B UVM Elements and Applications
Part C Further steps & Outlook
Verification stack:
tools, language and methodology
Verification
management
Universal Verification
Methodology
UVM (-SC / -AMS)
Class library
SystemC(-AMS)
Language
SystemC(-AMS)
compliant simulator
top (sc_main)
Test
register
sequence
rw
config
Testbench (env)
virtual
sequencer
Reg model
config
scoreboard
Subscr
ref
Subscr
model
2
1
Adapter
UVC1 (env)
UVC2 (env)
agent
agent
..
Sqr
conf
Sqr
conf
Drv
Mon
Drv
Mon
Interf1
Interf2
DUT
Test
Testcases
cases
Scenario
Sequences
Verification component
Functional
Sequencer
Command
Driver
Scoreboard
Monitor
Monitor
Device
under test
Signal
Functional coverage
10
11
12
Outline
Part B UVM Elements and Applications
13
Required minimum
Test
Testbench
Agent
Sequencer
Driver
Monitor
DUT
Scoreboard
Test
virtual
sequencer
Reg model
config
scoreboard
Subscr
ref
Subscr
model
2
1
Adapter
UVC1 (env)
UVC2 (env)
agent
More Agents
Virtual Sequencers
Register Model
Extensive configuration on every element
config
Testbench (env)
Optional
register
sequence
rw
14
agent
..
Sqr
conf
Sqr
conf
Drv
Mon
Drv
Mon
Interf1
Interf2
DUT
UVM agent
seq
15
trans
agent
sequencer
config
seq_item_export
analysis
seq_item_port
item_collected_port
driver
monitor
vif
vif
UVM agent
seq
trans
Possible configurations
16
agent
sequencer
config
seq_item_export
analysis
seq_item_port
item_collected_port
driver
monitor
vif
vif
UVM sequencer
seq
17
trans
agent
sequencer
config
seq_item_export
analysis
seq_item_port
item_collected_port
driver
monitor
vif
vif
UVM driver
seq
18
trans
agent
sequencer
config
seq_item_export
analysis
seq_item_port
item_collected_port
driver
monitor
vif
vif
UVM monitor
seq
19
trans
agent
sequencer
config
seq_item_export
analysis
seq_item_port
item_collected_port
driver
monitor
vif
vif
20
UVM sequences
Sequences are part of the test scenario
and define streams of transactions
The properties (or attributes) of a
transaction are captured in a sequence
item
Sequences are not part of the testbench
hierarchy, but are mapped onto one or
more sequencers
Sequences can be layered, hierarchical or
virtual, and may contain multiple
sequences or sequence items
Sequences and transactions can be
configured via the factory
sequence
transaction
transaction
transaction
seq1
seq
seq1
seq2
trans
trans
seq2
trans
trans
21
22
default
sequence
config
Testbench (env)
config
Test
virtual
sequencer
scoreboard
Subscr
ref
Subscr
1
model
2
UVC1 (env)
agent
UVC2 (env)
agent
..
Sqr
conf
Sqr
conf
Drv
Mon
Drv
Mon
23
default
sequence
config
Testbench (env)
config
Test
virtual
sequencer
scoreboard
Subscr
ref
Subscr
1
model
2
UVC1 (env)
agent
UVC2 (env)
agent
..
Sqr
conf
Sqr
conf
Drv
Mon
Drv
Mon
UVM scoreboard
The scoreboard performs
end-to-end checking by
comparing expected and processed
transactions
These transactions are retrieved by
dedicated subscribers or listeners, which
implement the write method of the
analysis ports of each monitor, to which
these subscribers are connected
A scoreboard may contain a predictor,
which acts as reference or golden model.
Alternatively, the scoreboard may
contain an algorithm to calculate the
expected transaction
Base class: uvm_scoreboard
24
default
sequence
config
Testbench (env)
config
Test
virtual
sequencer
scoreboard
Subscr
ref
Subscr
1
model
2
UVC1 (env)
agent
UVC2 (env)
agent
..
Sqr
conf
Sqr
conf
Drv
Mon
Drv
Mon
UVM test
Each UVM test is defined as a
dedicated test class, which
instantiates the testbench and
defines the test sequence(s)
Reuse of tests and topologies is
possible by deriving tests from a test
base class
The configuration and factory concept
can be used to configure or override
UVM components, sequences or
sequence items
Tests can be selected (passed) as
command line option*
Base class: uvm_test
default
sequence
config
Testbench (env)
config
Test
virtual
sequencer
scoreboard
Subscr
ref
Subscr
1
model
2
UVC1 (env)
agent
UVC2 (env)
agent
..
Sqr
conf
Sqr
conf
Drv
Mon
Drv
Mon
25
UVM testbench
A testbench is defined as the
complete environment which
instantiates and configures the
UVCs, scoreboard, and virtual
sequencer if available
The UVCs are sub-environments in
a testbench
The testbench only makes the
connections between the
scoreboard and virtual sequencer
to each UVC; the connection
between UVCs and the DUT is
arranged within the UVCs
Accellera Systems Initiative
26
default
sequence
config
Testbench (env)
config
Test
virtual
sequencer
scoreboard
Subscr
ref
Subscr
1
model
2
UVC1 (env)
agent
UVC2 (env)
agent
..
Sqr
conf
Sqr
conf
Drv
Mon
Drv
Mon
27
default
sequence
config
Testbench (env)
config
Test
virtual
sequencer
scoreboard
Subscr
ref
Subscr
1
model
2
UVC1 (env)
agent
UVC2 (env)
agent
..
Sqr
conf
Sqr
conf
Drv
Mon
Drv
Mon
28
default
sequence
config
Testbench (env)
config
Test
virtual
sequencer
scoreboard
Subscr
ref
Subscr
1
model
2
UVC1 (env)
UVC2 (env)
agent
Sqr
conf
Sqr
conf
Drv
Mon
Drv
Mon
out
in
agent
..
AMS
DUT
DIG
SW
Status
testing
Register callbacks
testing
testing
testing
development
development
development
study
Randomization of registers
study
29
Application Examples
30
UVM-SystemC Generator
Generator is based on easier uvm code generator for
SystemVerilog from Doulos
(http://www.doulos.com/knowhow/sysverilog/uvm/
easier_uvm_generator/)
Generator uses template files as input, which are
similiar to the Doulos generator
Generates complete running UVM-SystemC
environment
31
UVM-SystemC Generator
Generated UVM objects and files:
UVM_Agent
UVM_Scoreboard
UVM_Driver
UVM_Monitor
UVM_Sequencer
UVM_Environment
UVM_Config
UVM_Subscriber
UVM_Test
Makefile to compile the generated UVM project
Instantiation and DUT connection
32
UVM-SystemC Generator
Input file for generating
a complete agent
Transaction items
Interface ports
DUT connection to
agent interfaces (DUT
port <-> agent port))
#agent name
agent_name = clkndata
#transaction item
trans_item = data_tx
#transaction variables
trans_var = int data
#interface
if_port =
if_port =
if_port =
if_port =
if_port =
ports
sc_core::sc_signal<bool>
sc_core::sc_signal<bool>
sc_core::sc_signal<bool>
sc_core::sc_signal<bool>
sc_core::sc_signal<bool>
!clkndata_if
clk clk
reset_n reset_n
rw_master1 rw_master
scl1 scl
sda1 sda
clk
reset_n
scl
sda
rw_master
if_clock = clk
if_reset = reset_n
!agent2_if
...
#agent mode
agent_is_active = UVM_ACTIVE
33
clk
ALU
rst
a
b
op
x
34
default
sequence
config
Testbench (env)
config
Test
virtual
sequencer
scoreboard
Subscr
ref
Subscr
1
model
2
UVC1 (env)
UVC2 (env)
agent
agent
Sqr
conf
Sqr
conf
Drv
Mon
Drv
Mon
DUT
in
AMS
DIG
out
SW
35
Benefits
Avoidance of boilerplate code copy & paste disasters
Manual input amount as in hand-crafted testbench
DUT setup
Test sequence
Driver implementation for DUT driving
Monitor implementation for DUT interpreting
UVM conformity
Re-Usage because of modularity more likely
36
default
sequence
Test
Testbench (env)
virtual
sequence
r
config
scoreboard
Subscr
1
UVC1 (env)
ref
Subscr
2
model
UVC2 (env)
agent
agent
Driver
SystemC
Monitor
SystemC
vif
vif
DUT
SystemC - Behavioral
37
default
sequence
Test
Testbench (env)
virtual
sequence
r
config
scoreboard
Subscr
1
UVC1 (env)
ref
Subscr
2
model
UVC2 (env)
agent
agent
Driver
Emulation
Monitor
Emulation
vif
vif
DUT
FPGA - Emulation
38
default
sequence
Test
Testbench (env)
virtual
sequence
r
config
scoreboard
Subscr
1
UVC1 (env)
ref
Subscr
2
model
UVC2 (env)
agent
agent
Driver
Lab equip
Monitor
Lab equip
vif
vif
DUT
ASIC 1st Silicon
39
Simulation - SystemC
config
default
sequence
Test
Testbench (env)
virtual
sequence
r
config
scoreboard
Subscr
1
UVC1 (env)
ref
Subscr
2
model
UVC2 (env)
agent
agent
Driver
SystemC
Monitor
SystemC
vif
vif
Source: ZedBoard.org
default
sequence
Test
Testbench (env)
virtual
sequence
r
config
scoreboard
ref
Subscr
2
model
Subscr
1
UVC1 (env)
UVC2 (env)
Source: ZedBoard.org
default
sequence
Test
Testbench (env)
virtual
sequence
r
config
scoreboard
Subscr
1
UVC1 (env)
ref
Subscr
2
model
UVC2 (env)
agent
agent
agent
agent
Driver
Emulation
Monitor
Emulation
Driver
Lab equip
Monitor
Lab equip
vif
vif
vif
vif
DUT
SystemC - Behavioral
DUT
DUT
FPGA - Emulation
40
Outline
Part C Further steps & Outlook
Standardization in Accellera
Next steps
Summary and outlook
41
Standardization in Accellera
Standardization in SystemC
Verification WG ongoing
UVM-SystemC Language
Reference Manual (LRM)
completed
Improving the UVM-SystemC
Proof-of-Concept (PoC)
implementation
Creation of a UVM-SystemC
regression suite started
42
Next year
Finalize upgrade to UVM 1.2 (upgrade to UVM 1.2 already started)
Add constrained randomization capabilities (e.g. SCV, CRAVE)
Introduction of assertions and functional coverage features
43
44