Professional Documents
Culture Documents
UVM Presentation DAC2011 Final PDF
UVM Presentation DAC2011 Final PDF
UVM Presentation DAC2011 Final PDF
(UVM)
Verifying Blocks to IP to SOCs and Systems
Organizers:
Dennis Brophy
Stan Krolikoski
Yatin Trivedi
San Diego, CA
June 5, 2011
Workshop Outline
10:00am 10:05am
Dennis Brophy
10:05am 10:45am
10:45am 11:25am
Tom Fitzpatrick
11:25am 11:40am
Break
11:40am 12:20pm
Janick Bergeron
12:20pm 12:50pm
Ambar Sarkar
12:50pm 1:00pm
All
Q&A
Welcome
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Workshop Outline
10:00am 10:05am
Dennis Brophy
10:05am 10:45am
10:45am 11:25am
Tom Fitzpatrick
11:25am 11:40am
Break
11:40am 12:20pm
Janick Bergeron
12:20pm 12:50pm
Ambar Sarkar
12:50pm 1:00pm
All
Q&A
Welcome
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Coverage
Scoreboard
Checking
Coverage
seed
23098432
38748932
23432239
17821961
10932893
20395483
18902904
23843298
23432432
24324322
55252255
09273822
13814791
4098e092
23432424
24242355
25262622
26452454
24524522
Coverage
Random
Stimulus
Sequence
Generator
Generator
Tests
Tests
Monitor
Driver
Monitor
DUT
APB
UART
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
UVM Architecture:
Interface Level Encapsulation
uvm_agent
uvm_
sequencer
Config:
sequences
uvm_monitor
events,
status,
data
uvm_driver
vi
vi
interface
DUT
7
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Config:
is_active:
UVM_ACTIVE
sequences
min_addr:
16h0100
uvm_monitor
events,
status,
data
passive
uvm_driver
vi
vi
DUT
8
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
seq
vi
seq
i/f
monitor
monitor i/f
monitor i/f
slave agent
slave agent
Config:
Config:
sequencer
sequencer
arbiter agent
sequencer
Config:
seq
seq vi
i/f
vi
events,
events, driver
status,
status,
events, driver
data
status,
vidata
vi driver
vidata
vi
Config:
monitor
monitor
events,
status,
events,
data
status,
vi
data
i/f
driver
driver
vi
Virtual
interface
seq
monitor
Sometimes common
events,
for all
agents
status,
data
num_masters=3
num_slaves=2
driver
monitor
events,
status,
data
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
UVM1.0 Configuration
Enhancements (Cont)
Check if configuration
exists
the uvm_config_db
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
for
--------------------------------------Name
Type
Value
--------------------------------------// two instances of data_packet_c
my_packet
data_packet_c
@479
data_packet_c packet1, packet2;
rev_no
string
v1.1p
initial begin
header
pkt_header_c
@520
// create and randomize new packet dest_addr
integral
'h25
packet1 = new(my_packet);
pkt_length integral
'd29
assert(packet1.randomize());
payload
da(integral)
[0]
'h2a{
copy_packet:integral
(data_packet_c@489)
// print using UVM automation
[1]rev_no: v1.1s
packet1.print();
copy():
Copies integral
all fields of packet1 'hdb
...header: (pkt_header_c@576)
...
{ ...
// copy using UVM automation
to packet2,
including
sub-classes 'h21
'h25
[28] dest_addr:
integral
packet2 = new(copy_packet);
pkt_length:
'd29
parity
integral
'hd9
and
arrays
packet2.copy(packet1));
}
parity_type
parity_e
GOOD_PARITY
packet2.rev_no = v1.1s;
payload: integral
{
ipg_delay
'd20
// print using UVM tree printer --------------------------------------[0]: 'h2a
[1]: 'hdb
packet2.print(
... ...
uvm_default_tree_printer);
[28]: 'h21
end
}
UVM also allows manual
parity: 'hd9
parity_type: GOOD_PARITY
implementation for performance or
ipg_delay: 'd20
other reasons
}
15
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Output
file/line
time
id
message body
scope
Simple Messaging:
`uvm_*(string id, string message, <verbosity>);
Where * (severity) is one of fatal, error, warning, info
<verbosity> is only valid for uvm_info
16
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
UVM Sequences
A sequencer controls the generation of random stimulus
by executing sequences
A sequence captures meaningful streams
of transactions
A simple sequence is a random transaction generator
A more complex sequence can contain timing, additional
constraints, parameters
Sequences:
Allow reactive generation react to DUT
Have many built-in capabilities like interrupt support, arbitration
schemes, automatic factory support, etc
Can be nested inside other sequences
Are reusable at higher levels
17
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
SEQR
Scoreboard
Mon
DRV
VC3
coverage
DUT
Virtual Sequencer
CPU
Mem
Periph
Periph
Mon
BFM
Mon
BFM
Mon DRV
SEQR
SEQR
VC3
VC1
18
VC
VC32
Mon
BFM
Mon
BFM
Mon DRV
Benefits
Tests are shorter, and descriptive
Less knowledge to create a test
Easier to maintain changes are
done in a central location
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
end of elaboration
start_of_simulation
reset
configure
main
shutdown
run
extract
check
report
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
// Module OVC
using wildcards
the
tesbench, overrides constraints,
and sets the default sequences
21
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Overriding SV Components
and Data Objects
Example:
&
A data_packet_c
driver
B short_packet_c
driver_v1
my_env
agent[1]
agent[0]
sequencer
BA
sequencer
BA
driver monitor
BA
BA
driver monitor
BA
BA
object::type_id::set_inst_override
Example:
my_env
agent[0]
agent[1]
sequencer
A
B
sequencer
A
driver monitor
A
A
driver monitor
driver
A
AA
data_packet_c::type_id::set_inst_override
(short_packet_c::get_type(),
my_env.agent[0].sequencer);
my_driver::type_id::set_inst_override
(driver_v1::get_type(), my_env.agent[1]);
22
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
test3
test2
tb test1
tbtb
IF
env
env
env
env
env
env
IF
DUT
Function void
build();
endfunction
Multiple tests
Allows execution
23
IF
initial begin
run_test();
end
rst
clks
endmodule : top
DUT snapshot
Compile the entire test suite together and use commandline option to select a test:
of multiple tests on the same snapshot
% <sim> f run.f +UVM_TESTNAME=test3
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
24
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Command-line Processor
Class
Provide a vendor independent general interface
to the command line arguments
Supported categories:
Basic Arguments and values
get_args, get_args_matches
Tool information
get_tool_name(), get_tool_version()
26
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
28
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Workshop Outline
10:00am 10:05am
Dennis Brophy
10:05am 10:45am
10:45am 11:25am
Tom Fitzpatrick
11:25am 11:40am
Break
11:40am 12:20pm
Janick Bergeron
12:20pm 12:50pm
Ambar Sarkar
12:50pm 1:00pm
All
Q&A
29
Welcome
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Sequences
Decouple stimulus specification
from structural hierarchy
Simple test writer API
u1
u1
s1
s5
s3
s2
s4
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Sequence_Item Example
class spi_seq_item extends uvm_sequence_item;
// UVM Factory Registration Macro
`uvm_object_utils(spi_seq_item)
Data fields:
Request direction rand (stimulus generation)
Response direction non-rand
endclass:spi_seq_item
33
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
34
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Explicit
req = my_req::type_id::create(req);
start_item(req);
assert(req.randomize());
finish_item(req);
get_response(rsp);
`uvm_do(req)
get_response(rsp);
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
driver
Starting a Sequence
Explicit
task xxx_phase(uvm_phase phase);
my_seq.start(seqr);
xxx_phase can be
any run-time phase
Sequencer
Phase
Using wrapper
uvm_config_db#(uvm_object_wrapper)::set(this,agent.sqr.xxx_phase",
"default_sequence", my_seq::type_id::get());
Wrapper
Using instance
myseq = my_seq::type_id::create(myseq);
uvm_config_db#(uvm_sequence_base)::set(this,agent.sqr.xxx_phase",
"default_sequence", myseq);
my_seq.set_priority(200);
Sequence
37
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Calling start()
task xxx_phase(uvm_phase phase);
my_seq.start(seqr);
my_seq.start(uvm_sequencer_base seqr,
uvm_sequencer_base parent = null,
integer priority = 100,
bit call_pre_post = 1);
Stimulus
code
38
my_seq.pre_start()
my_seq.pre_body();
parent.pre_do(0);
parent.mid_do(this);
my_seq.body();
parent.post_do(this);
my_seq.post_body();
my_seq.post_start();
on sequencer
If call_pre_post ==1
If parent!=null
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Sequence Library
IS-A Sequence
endclass
`uvm_sequence_utils
`uvm_sequencer_utils
et. al. deprecated
39
my_seq_lib
my_seq1
my_seq2
endclass
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Sequence Library
uvm_config_db #(uvm_sequence_lib_mode)::set(this,
"sequencer.xxx_phase, default_sequence.selection_mode, MODE);
typedef enum
{ UVM_SEQ_LIB_RAND,
UVM_SEQ_LIB_RANDC,
UVM_SEQ_LIB_ITEM,
UVM_SEQ_LIB_USER
} uvm_sequence_lib_mode;
40
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
UVM Phasing
common
Legacy
OVM VIP
build
connect
new vip
end_of_elaboration
start_of_simulation
uvm
pre_reset
reset
post_reset
pre_configure
configure
post_configure
run
pre_main
main
post_main
pre_shutdown
shutdown
post_shutdown
reset
configure
main
shutdown
extract
check
time
report
final
41
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Phase Synchronization
By default, all components must allow all
other components to complete a phase
before all components move to next phase
VIP 1:
reset
configure
main
shutdown
VIP 2:
reset
configure
main
shutdown
VIP 3:
reset
configure
main
shutdown
time
42
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Phase Semantics
In UVM Reference Guide, the semantics
for each phase are defined, e.g.
reset
Upon Entry
Indicates that the hardware reset signal is ready to be asserted.
Typical Uses
Assert reset signals.
Components connected to virtual interfaces should drive their output to their
specified reset or idle value.
Components and environments should initialize their state variables.
Clock generators start generating active edges.
De-assert the reset signal(s) just before exit.
Wait for the reset signal(s) to be de-asserted.
Exit Criteria
Reset signal has just been de-asserted.
Main or base clock is working and stable.
At least one active clock edge has occurred.
Output signals and state variables have been initialized.
43
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
uvm_component Example
task main_phase(uvm_phase phase);
phase.raise_objection(this);
main test behavior, e.g. send 100 items
Called automatically
when main phase
phase.drop_objection(this);
starts (after all
endtask
phase_started() calls)
function void phase_started(uvm_phase phase);
if (phase.get_name()==post_reset)
fork background_thread(); join_none
endfunction
Called automatically
when phase first starts.
Thread forks when
phase is post_reset.
45
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
User-defined Phases
Integrator can create one or more phases
Integrator can create schedules with any
mix of standard and user-defined phases
then assign components to use one of
those schedules
uvm_domain common =
want new phase
uvm_domain::get_common_domain();
named cfg2 after
common.add(cfg2_phase::get(),
configure and before
.after_phase(configure_phase::get(),
post_configure
.before_phase(post_configure_phase.get())
);
New
sched:
46
configure
cfg2
post_configure
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Separate Domains
Sometimes it is OK for a part of the
design/environment to do behavior that is
out of alignment with the remainder
e.g. mid-sim reset of a portion of the chip
e.g. one side starts main functionality while
other side is finishing configuration
47
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Domains
Domains are collections of components
that must advance phases in unison
By default, no inter-domain synchronization
VIP 1:
reset
configure
main
shutdown
VIP 2:
reset
configure
main
shutdown
Domain A
VIP 3:
reset
configure
main
shutdown
time
48
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Domain B
Domain Synchronization
Domains can be synchronized at one,
many, or all phase transitions.
domainA.sync(.target(domainB),.phase(uvm_main_phase::get()));
VIP 1:
reset
VIP 2:
reset
configure
main
shutdown
Domain A
configure
main
shutdown
time
49
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Domain B
reset
VIP 2:
reset
configure
main
reset
config
main
shutdown
Domain A
configure
main
shutdown
Domain B
time
50
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
51
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Ending Phases
task run_phase(uvm_phase phase);
phase.raise_objection();
seq.start();
phase.drop_objection();
endtask
Must raise_objection()
before first NBA
my_seq
VIP:
run
52
extract
check
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
report
Ending Phases
task main_phase(uvm_phase phase);
phase.raise_objection();
seq.start();
phase.drop_objection();
endtask
Must raise_objection()
before first NBA
main_seq
VIP:
main
53
post_main
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
seq.start();
if(ending)
phase.drop_objection();
phase.drop_objection();
endtask
an objection
main_seq
VIP:
main
54
post_main
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Ending Phases
Phase objection must be raised before first
NBA
Phase forks off processes
wait for phase.all_dropped
call phase_ready_to_end()
component can raise objection
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
56
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Workshop Outline
10:00am 10:05am
Dennis Brophy
10:05am 10:45am
10:45am 11:25am
Tom Fitzpatrick
11:25am 11:40am
Break
11:40am 12:20pm
Janick Bergeron
12:20pm 12:50pm
Ambar Sarkar
12:50pm 1:00pm
All
Q&A
57
Welcome
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Accellera at DAC
Accellera Breakfast at DAC: UVM User Experiences
An Accellera event sponsored by Cadence, Mentor, and Synopsys
Tuesday, June 7th, 7:00am-8:30am, Room 25AB
Birds-Of-A-Feather Meeting
Soft IP Tagging Standardization Kickoff
Tuesday, June 7, 7:00 PM-8:30 PM, Room 31AB
58
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Workshop Outline
10:00am 10:05am
Dennis Brophy
10:05am 10:45am
10:45am 11:25am
Tom Fitzpatrick
11:25am 11:40am
Break
11:40am 12:20pm
Janick Bergeron
12:20pm 12:50pm
Ambar Sarkar
12:50pm 1:00pm
All
Q&A
59
Welcome
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
TLM-1.0
Unidirectional put/get interfaces
Initiator
Target
Initiator
put
Target
get
61
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Why TLM-2.0?
Better interoperability over TLM-1.0
Semantics
Pre-defined transaction for buses
Performance
Pass by reference (in SystemC)
Temporal decoupling
62
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
TLM-2.0 in SV vs SC
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
TLM-2.0 Semantics
Blocking
When the call returns,
the transaction is done
Response is annotated
Initiator
Target
Initiator
Target
Nonblocking
Call back and forth
Protocol state changes
Transaction is updated
64
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Type
Modifiable?
Command
uvm_tlm_command_e
No
Address
bit [63:0]
Interconnect only
Data
byte unsigned [ ]
Data length
int unsigned
No
byte unsigned [ ]
No
int unsigned
No
Streaming width
int unsigned
No
Response status
uvm_tlm_response_status_e
Target only
Extensions
uvm_tlm_extension_base [ ]
Yes
65
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Connecting to SystemC
Tool-specific mechanism
Not part of UVM
SystemVerilog
SystemC
Copy across
at method call
and return
66
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Predefined
for GP in VCS
TLM2 Bridge
Initiator
Proxy Init
Proxy Trgt
Target
Pack/unpack
Unaware of
language
crossing
User-defined for
GP extensions
or non-GP
67
Unaware of
language
crossing
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Overall Architecture
Pre-Defined
Pre-Defined
Sequences
Pre-Defined
Sequences
Sequences
Spec
Generator
Pre-Defined
Pre-Defined
Sequences
User-Defined
Sequences
Sequences
Abstract
read/write
Register Model
Backdoor
Generic
physical r/w
Adapter
Bus-specific
r/w item
Any bus
agent
69
DUT
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
X
UVM
UVM
70
System
RDL
SQL
CSV
Generator
Generator
Generator
Generator
MSWord
EDA
Vendors
Register Model
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
...
Physical Interfaces
Register model abstracts
Physical interfaces
Addresses
Endianness
DUT may
change
User
perspective
R1.read(...);
...
R2.write(...);
...
R3.read(...);
R1
Register
Model
Perspective
stays the same
71
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
R3
R2
Mirror
Register model mirrors content of registers
in DUT
Scoreboard for registers
Updated on read and write()
Optionally checked on read()
Register
Model
API
R1
R3
R2
R1
R2
R3
72
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Back-door Access
Must define HDL path to register in DUT
Generator-specific
API
R3
R2
R1
Mirror is
implicitly
updated
73
R2
R3
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Programmers View
R0
R0
F1
F3
F2
F4...
Multi-address Register
...F4
R1
R2
F5
F6
A[0]
F5
F6
A[1]
F5
F6
A[255]
Array of Registers
F7
F8
F9
F8
F9
F8
F9
74
RF0[0]
RF1[0]
F10
F7
Memory
RF1[0]
F10
F7
RF0[0]
F10
M0
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
RF0[7]
RF1[7]
M0[0..65535]
Class View
One class per field
One class per register
F1
F3
F2
F4...
...F4
Generated
Make sure names
Name
are different from
Address base class methods
Contained fields
Read/Write methods
R0
R0
R2
F5
F6
A[0]
F5
F6
A[1]
F5
F6
A[255]
F7
F8
F9
F7
F8
F9
F8
F9
RF0[0]
RF1[0]
F10
F7
RF0[0]
RF1[0]
F10
F10
M0
75
R1
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
RF0[7]
RF1[7]
M0[0..65535]
Class View
Generated
May be arrays
Optional: contained fields
F3
F2
F4...
R0
R0
R2
F5
F6
A[0]
F5
F6
A[1]
F5
F6
A[255]
F7
F8
F9
F7
F8
F9
F8
F9
RF0[0]
RF1[0]
F10
F7
RF0[0]
RF1[0]
F10
F10
M0
76
R1
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
RF0[7]
RF1[7]
M0[0..65535]
API View
Methods in relevant
class instance
F1
...F4
blk.F4.read(...)
R1
R2
F5
F6
A[0]
F5
F6
A[1]
F5
F6
A[255]
F7
F8
F9
blk.A[1].write(...)
F3
F2
F4...
blk.R0.get_full_name()
blk.A[255].F5.write(...)
R0
R0
RF1[0]
F10
F7
F8
F9
F8
F9
RF0[0]
RF1[0]
F10
F7
RF0[0]
F10
RF0[7]
RF1[7]
blk.M0.read(...)
M0
77
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
M0[0..65535]
By-name API
also available
78
blk.blk[2].regfile[4].reg.fld.read(...);
blk.mem.write(...);
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Register Sequences
Sequences accessing registers should be
virtual sequences
Not associated with a particular sequencer
type
Contain a reference
to register model
Access registers in
body() task
79
class my_test_seq
extends uvm_sequence;
my_dut_model regmodel;
virtual task body();
regmodel.R1.write(...);
regmodel.R2.read(...);
...
endtask
endclass
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Register Sequences
Includes pre-defined sequences
Check reset values
Toggle & check every bit
Front-door/back-door accesses
Memory walking
80
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Introspection
Rich introspection API
get_blocks()
Register File
get_block()
Block
get_maps()
Map
get_parent()
get_regfile()
get_registers()
Register
get_parent()
get_fields()
get_access()
get_reset()
get_n_bits()
get_lsp_pos()
is_volatile()
81
Field
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
get_maps()
is_in_map()
get_offset()
Coverage Models
Register models may contain coverage
models
Up to the generator
In all blocks
and registers
All coverage
models in block
blk.set_coverage(UVM_CVR_ALL);
82
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Customization Opportunities
Spec
Best
DONT!
Generator
Options,
value-add
Register Model
Factory
Pre-Build
Post-Build
Callbacks
83
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
DUT integration
Multiple interfaces
Randomization
Vertical Reuse
Offline access
User-defined front-door accesses
Access serialization
Pipelined accesses
84
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Workshop Outline
10:00am 10:05am
Dennis Brophy
10:05am 10:45am
10:45am 11:25am
Tom Fitzpatrick
11:25am 11:40am
Break
11:40am 12:20pm
Janick Bergeron
12:20pm 12:50pm
Ambar Sarkar
12:50pm 1:00pm
All
Q&A
85
Welcome
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Agenda
Case studies
Several UVM1.0 environments deployed
Currently in production
Novice to sophisticated teams
Advanced uses
Unit to system-level
VIP Stacking/Layering
87
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Increasing
sophistication,
but scalable
88
Add checking
Write tests
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Example
Packet Output 1
Packet Input
Channel Engine
Packet Output 2
Packet Output 3
Read/Write
89
Host Interface
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
clk_rstagent
agent
clk_rst
packet
scoreboard
interrupt
scoreboard
[x3]
Config:
active
host agent
Config:
Config:
Config:
active
active
active
Config:
active
pi agent
poagent
agent
po
po
agent
DUT
90
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Channel Engine
Packet Output 2
Packet Output 3
Read/Write
Host Interface
91
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Sending traffic
Similar to initialization
Sequences differ
//! sequence body.
task pi_sequence::body();
pi_transaction#(. . .) req_xn;
cfg_inst = p_sequencer.cfg;
forever begin
p_sequencer.peek_port.peek(req_xn);
if (!this.randomize()) begin
`uvm_fatal({get_name(), "RNDFLT"}, "Can't randomize");
end
`uvm_do_with(this_transaction,
{ trans_kind == req_xn.trans_kind;
read_vld_delay inside { [0:15] };
. . .
});
. . .
94
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
95
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
96
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Scoreboarding
Reuse SB encapsulated within sub-envs
Chain the scoreboards
Functional Coverage
Needed to filter coverage points
Reuse monitors
Avoid duplicated instances
Gate Simulations
Disable monitors
Disable internal scoreboards
Registers
Register abstraction reused, but different interfaces used
Configurations
Defined separate system configuration
Top level instantiated sub-env configurations
Sequences
Virtual sequencer only at the system level
Initialization sequences reused from unit-level
Traffic sequences created from scratch at the system level
97
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
98
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
VIP Stacking/Layering
VIP Agent Top
Config
is_active=1
has_interface=0
Analysis
Sequencer
Monitor
Converts
Downwards
Converts
upwards
VIP Agent Bottom
Config
is_active=1
has_interface=1
Analysis
Convert Sequencer
Sequencer
Convert Monitor
Monitor
vi
Driver
vi
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Summary
Getting started with UVM was relatively easy
Once initial plumbing in place
Basic tasks remain simple
Were able to use a prescriptive approach
100
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Workshop Outline
10:00am 10:05am
Dennis Brophy
10:05am 10:45am
10:45am 11:25am
Tom Fitzpatrick
11:25am 11:40am
Break
11:40am 12:20pm
Janick Bergeron
12:20pm 12:50pm
Ambar Sarkar
12:50pm 1:00pm
All
Q&A
101
Welcome
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Questions?
102
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Accellera at DAC
Accellera Breakfast at DAC: UVM User Experiences
An Accellera event sponsored by Cadence, Mentor, and Synopsys
Tuesday, June 7th, 7:00am-8:30am, Room 25AB
Birds-Of-A-Feather Meeting
Soft IP Tagging Standardization Kickoff
Tuesday, June 7, 7:00 PM-8:30 PM, Room 31AB
103
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
104
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems
Thank You
105
DAC Workshop on Universal Verification Methodology (UVM) - Verifying Blocks to IP to SOCs and Systems