You are on page 1of 20

Challenges in using UVM at SoC

level
Rohit Jindal
ST Microelectronics
Agenda
 General Overview of UVM

 Challenges in using UVM at SoC level

 Proposal for using UVM at SoC level

2
What is UVM?
Universal Verification Methodology
 Testbenches for HDL designs
 UVM has SystemVerilog Base Class Library
 Based on constrained Random Verification approach
 Industry standard developed by Accellera
 Apache 2.0 open-source license

 Key features of the methodology:


 Data design and stimulus generation
 Building and running a verification environment
 3C : Checker, Coverage and Constrains

3
The Goal : Automation

Source: Accellera DAC Presentation

4
Key Features of UVM [1]

 Built-in automation
 Transaction manipulation (Print / Pack / [Deep] Copy / Record)

 Defined testbench build and hook-up mechanism


 Flexible automatic test phase interface
 Lot of phases defined for synchronization

 Powerful stimulus generation mechanism using sequences


 On-the-fly randomization control
 Sequence Layering & nested sequence
 Virtual sequences [Controlling multiple sequencers from ‘central place’]

 TLM communication
 Modular and Language independent

 Supports reuse
 Module-to-system
 Project-to-project

5
Key Features of UVM [2]

 Sequences or Testcases
 UVM Tests or sequences separated from TestBench environment

 Uniformity
 Standard structure for all Testbench components

 UVM factories
 UVM factories give flexibility
 Easy to update or modify components without changing original code

 Configuration
 UVM configuration helps in customizing the environment from Top or anywhere

 And more…
 Messaging utilities with on-the-fly control over verbosity
 Ensures random stability
 Compile once and run many times using snapshot

6
Reusable UVM Component Architecture
Env • Encapsulates the
(UVC)Agent • An env encapsulates and
Agent configurescomponents for
multiple agents
Agent
a device
• Also referred on UVM
to as an the bus
• Verification
Independently
• Containscollects
shared
Component config
(UVC)
Sequencer
Config: • Generates sequences
transactions information of
sequences
active_passive from the transactions
DUT interface
tlm i/f
and passes
• Contains them
itemstofrom
• Pullsevents, the the
driver
status,
• Connected• A checking
bus to the driver
protocol
sequencer via a
can have
tlm i/f
tlm i/f variable
and
• Implements number
TLMcoverage
interface of devices
signal-level
Monitor
• Each •isVirtual
represented
Coverage Driver • Sends transactions
protocol toasaan– agent
Interface
Checking
and sendsConnection
scoreboard to the DUT
vif vif
viafrom
TLM the testbench
write port to the
• SystemVerilog DUT Interface
••Contains
ContainsDUT DUTsignals
bus signals
for a
APB IF
device
DUT

7
What Are the Benefits Of This
Architecture?
Encapsulating components makes “Virtual” sequences enable
it modular and simplifies maintenance control at the system level

UVC (UVM Verification Component)


Supports module-
Master Agent Slave Agent
Config:
Config: Config:
Config:
to-system reuse
active passive
Sequencer Sequencer
tlm i/f tlm i/f
sequences sequences
Monitor Monitor
tlm i/f tlm i/f
tlm i/f tlm i/f
Control and configure Passive
tlm i/f tlm i/f
from above tlm i/f tlm i/f
Easy-to-use test
Collector Driver Collector Driver

vif vif vif vif


writer interface

APB IF
DUT
Architecture exactly the
same across all languages!
Each component has an UVM parent class
with built-in utilities and automation …
8
Agenda
 General Overview of UVM

 Challenges in using UVM at SoC level

 Proposal for using UVM at SoC level

9
Challenges for SoC verification
 Quick setup of SoC verification env (integration of
all verification component)
 Synchronization or Control of verification
components
 More emphasize is on system scenarios/
integration rather than on randomization
 Should able to reuse configuration of IP from IP
or sub-system testcases
 Should able to re-produce validation issues

10
IO Injector
TLM Platform Receiver
Reference

UVM Verification Flow SoC Validation

SoC IP
User Code

Integration Verification

Seqs
Seqs Sequencer
Reference IP
Seqs
Reference IP
I/O UVC RTL IP
Monitor Protocol
TLM
Monitor
TLM Port Driver
Driver

ICN

Seqs
Memory Seqs Sequencer
Seqs
Virtual Register Virtual
Sequence ICN UVC
Monitor Protocol
TLM
Monitor
TLM Port Driver
Driver
IO Injector
TLM Platform Receiver
Reference

UVM Verification Flow at SoC level SoC Validation

SoC IP
User Code

Integration Verification

Seqs
Seqs Sequencer
Seqs
RTL IP
I/O UVC
Monitor Driver

ICN

Seqs
Memory Seqs Sequencer
Seqs Processor
Virtual Register
ICN UVC
Monitor Driver
No Simple way to control UVC from C
Challenges in using UVM at SoC level

 No good way to control UVC from C or processor


 No standard way to support multiple language
(available from Cadence but not Accellera or
IEEE standard)
 Easier said than done to reuse the test cases
(sequences) from IP->sub-system->SoC.

13
IO Injector
TLM Platform Receiver
Reference

Proposed UVC Architecture… SoC Validation

SoC IP
User Code

Integration Verification

TLM 2.0 Export


Seqs

Seqs Sequencer

Seqs

I/O UVC Reg

TLM Reg
Monitor Processor
Driver Controlled Seq
Sequence Name Reg Reg

Control Reg
Work done
 Developed a wrapper to connect TLM port
between SystemC and UVM
 Added TLM export in sequencer
 Added a sequence with registers which can be
controlled through TLM port
 Developed Test platform to demonstrate
controlling of sequence from TLM IP

15
IO Injector
TLM Platform Receiver
Reference

SoC Verification with UVM SoC Validation

SoC IP
User Code

Integration Verification

SOC
IO RTL IP3
Injector UVC
Receiver
Ethernet UVC
Ether
USB UVC
USB
net

TLM Channel ICN

BFM
EMI LMI
Transactor SLM
ISS

Test Code (in C)


Tx/Rx Frame
PCI

TLM RTL User Code Transactor (Sc or SCEMI)


Workdone
 Connection of EMI interface with SystemC TLM
channel
 Connection of TLM SystemC port with UVM port
 Developed Test Platform to demonstrate
controlling of sequence from Processor
 C code running on ISS, which is writing to a TLM
Port about the sequence information
 Based on the received information, UVC
sequence runs the required sequence or
generate the random/directed traffic
 Checked the generated data through C testcase
17
My view….
 UVM good at IP level and best with standard
interfaces like AHB, AXI etc
 Best for constraint randomization verification
 Good in reusing verification components (like
driver, monitor or agents)
 For efficient reuse verification engineers need to
be expert in UVM and OOPs concept
 Still some gray areas for how to use UVM at SoC
and Accellera can work in this area

18
Wishlist for UVM 2.0
 Seamless connection between UVM and SystemC ports
 TLM export in sequencer library
 Sequence with registers which can be written from TLM
port in sequencer
 Event queue in sequencer for synchronization
 Standard name for some of the sequences like
generate_interrupt, clear_interrupt, dma_data_transfer
etc

19
Thanks

20

You might also like