Professional Documents
Culture Documents
Michael A. Warner
Worldwide Consulting Manager
Agenda
Verification Planning Testbench Architecture Testbench Implementation
SystemVerilog Basics OOP with SystemVerilog OVM Introduction
03/04/2010
Agenda
Verification Planning Testbench Architecture Testbench Implementation
SystemVerilog Basics OOP with SystemVerilog OVM Introduction
Why Plan?
It takes 50-80% of the total development effort to insure the intent of the specification is preserved in its implementationis that reasonable?
Area Power HDL Debug DFT Timing PD
Specification
Requirements Verification Path VAD Coverage Closure VID (Manual) HDL Debug Review Triage HVL Regression HVL Mgmt Debug
Tape-Out or Tap-Out
03/04/2010
Specification
DRs VAD VID Review HVL
5
Tape-Out or Tap-Out
HVL Debug
Key Concepts
Misaligned expectations between mgmt and engineering is the leading cause of pain and suffering in verification Aligning expectations with mgmt is especially difficult with verification given its nondeterministic and open-ended nature Managing expectations is a little easier when you have a proven planning process based on experience, history and science
03/04/2010
Scheduling Saboteurs
Convolutes schedule with details Wont commit without all the facts Backs up estimated with lots of data
All tasks are simple and easy Schedules are vague at best No basis for estimates
He tells you what he thinks you want to hear He is afraid of not pleasing others He is a people pleaser
Uses FUD to achieve goal Tremendous vector generator Little appreciation for the engineering process
03/04/2010
External Influences
Strategy
Gap Reconciliation
Schedule Reviews
Plan Of Record
Staffing Plan
03/04/2010
Specifications
Strategy
Requirements
Start
Time
End
Confidential Information of Mentor Graphics
Strategy
This is how we go about doing verification in general These are our goals, tools, technologies and processes Specifications
Strategy
Requirements
Start
Time
End
Confidential Information of Mentor Graphics
03/04/2010
Strategy: Tools
Strategy: Methodology
Testbench
OVM
Home Grown
03/04/2010
Strategy: Language
SystemC C VHDL
TCL
Requirements
This is what we need to verify in a particular design These are the features we need to hit and how important they are Specifications
Strategy
Requirements
Start
Time
End
Confidential Information of Mentor Graphics
03/04/2010
Requirements: Extraction
Extract requirements
although be aware that the required information for one feature might come from several places
Functional Specification
03/04/2010
Conversations Referenced documents Compliance Specification Design specification Delta Functional Specification Base Functional Specification
the functional specification might not mention the architecture used in a block, but it still has to be verified to check corner case handling
FIFO full flags Counter wraparound Local shared buffer arbiters
03/04/2010
10
Requirements: Implementation
Finite State Machines
Registers
encoding (one hot or only legal values) enters reset state on reset
Read-only bits can never be written reset to defaults updated correctly from bus
Interfaces
Arithmetic under- or over-flow Signals remain mutually exclusive Clock synchronisation blocks
03/04/2010
11
learn to read between the lines what wasnt mentioned that should have been? what feasible error conditions should be dealt with?
When the transfer is completed, the DMA engine will assert an interrupt (if enabled) or go to the idle state. If the auto restart bit (ARS) is set, it immediately restarts the operation What if interrupts are enabled and ARS is set?
actually, the specification doesnt mention if the interrupt needs to be cleared to start a channel experience says that this might be a reasonable thing to do
Plans
This is exactly how we will verify a particular design The plan(s) contain the specific steps Specifications
Strategy
Requirements
Start
Time
End
Confidential Information of Mentor Graphics
03/04/2010
12
DUT
Mapping
Testbench
03/04/2010
13
Plans: Example
The serial receive block has four buffers. The block checks for the parity and validity of the data frame on the RXD input and then writes correct data into its buffers. Check that RXD data is being properly written into buffers taking into consideration the parity and validity of the data. Using Data = 5 bits, Data = 6 bits, Data = 7 bits, Data = 8 bits Using Parity = OFF, Parity = EVEN, Parity = ODD Using Stop Bits = 1, Stop Bits = 2 Requirement
Check
Functional Coverage
Constraints
To identify extra testbenches, actors or components that are required To cross link everything to provide traceability from the functional specification to the verification code
03/04/2010
14
too high and you dont really know what youre checking too low and youre checking things that the specification didnt specify, or maintaining too many requirements
Check that the arbiter selects the correct channel instead of Check that the arbiter works or channel arbitration
Accuracy
avoid cycle accurate checks avoid verifying what you dont have to
03/04/2010
15
Scoreboard
Test Controller
Coverage
Monitor
Monitor
Stimulus
Driver
Responder
Slave
RTL
Abstraction Conversion
Transaction Level
03/04/2010
16
You will need an External Actor to interact with each DUT interface If you plan to just do black box verification, then these are probably all the actors you need If you are doing white or grey box testing, then you will need actors for interfaces within the DUT
Interrupts
03/04/2010
17
Arbiter
Confidential Information of Mentor Graphics
it and the DUT it and other actors its internal components Register Transaction Address[] Data[] Configuration Transaction DMA mode Channel Number Priority Src Address Dst Address Size Monitor Transaction Status Channel Number Priority #Bytes so far #Bytes to go Data[]
03/04/2010
18
and therefore the sub-components per actor and the transactions you need
and a rough idea about the topology of the testbench The detail is missing though, and for that, you need to map results of behavioural analysis onto actors
Plans: Implementation
For each requirement, ranked by importance
and any required monitors, etc
03/04/2010
19
Agenda
Verification Planning Testbench Architecture Testbench Implementation
SystemVerilog Basics OOP with SystemVerilog OVM Introduction
Testbench Architecture
Scoreboard
Test Controller
Coverage
Monitor
Monitor
Stimulus
Driver
DUT
Responder
Slave
RTL
Abstraction Coversion
Transaction Level
03/04/2010
20
Data Model
Generation Engine
FLOW MODEL:
CFG1
CFG2
CFG3
TRAFFIC
Normal
Long
Short
ERR
Const/Code
Diagnostic
Data Model
Generation Engine
Control Model
Const/Code
03/04/2010
21
Scoreboard
Generator
BFM
DUT
Transfer Function
Monitor
Transfer Function
Available or Build? Language (C, Hvl)? Who Maintains? Cycle Accurate? Typical? Interesting?
Ordering
Data Structure
Compare
Scoreboard
LOG
Scoreboard Architecture
One big scoreboard that is a model of the entire chip Divide up into smaller, easier scoreboards daisy-chained together
Generator
BFM
BLK
DUT
BLK
BLK
Monitor
TF
DS
CMP
TF
DS
CMP
TF
DS
CMP
SB
SB
SB
03/04/2010
22
lenn ahc_ a md _gc : puo rgdne ... ;t c el e s _t s d _ p c ,t c el e s _ c r s _ p c s s o r c : t c el e s _t s d Xt c el e s _ c r s _ s s o r c ... ; s s e r d d a _ c r s _ c ni. rt t ni o p r e v o c : s s e r d d a _ c r s _ c ni _ p c ; e k a h s d n a h _ w h . rt t ni o p r e v o c : eka hsdn ah_ w h_pc ;t r a t s e r _ o t u a. rt t ni o p r e v o c : tr at s er _ ot u a _ p c ; yti r oi r p _ h c . rt t n i o p r e v o c : yti r o i r p _ h c _ p c ;t r at s e r _ w h. r t t ni o p r e v o c : tr at s er _ w h _ p c ; R O R R E _ e l b a n e _t ni. r t t ni o p r e v o c : R O R R E _ el b a n e _t ni _ p c ; E N O D _ el b a n e _t ni . r t t ni o p r e v o c : E N O D _ el b a n e _t ni _ p c ; Z S _ K H C _ e l b a n e _t ni. r t t ni o p r e v o c : Z S _ K H C _ el b a n e _t ni _ p c ;l e n n a h c _ a m d _ g c p u or gr e v o c
Channel 30 Channel 0 Channel Priorities Priority Arbiter M U X DMA Engine
03/04/2010
46 45 Channel 30 Channel 0 Channel Priorities
Coverage
Coverage
Testbench Monitors
Testbench Monitors
DMA Engine
interrupt
interrupt
Bus Interface 0
Bus Interface 0
Bus Interface 1
Bus Interface 1
handshake
handshake
23
Coverage Model
47 Channel Priorities Priority Arbiter Bus Interface 0
SVA
DMA Engine Channel 0 M U X Channel 30
SVA
Bus Interface 1 interrupt handshake
CG
SVA
SVA
SVA
Testbench Monitors
CG
32-bit general purpose scalar processor 5 stage pipeline can experience stalls in any stage 16 x 32-bit general purpose registers Register forwarding Op-codes
Register based addition: add src1, src2, dst Register based addition with saturation: sadd src1, src2, dst nop
What would be a reasonable data model? What would be a reasonable control model? What would be a reasonable correctness model? What would be a reasonable coverage model?
03/04/2010
24
10 Minute Break
03/04/2010
25