Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Functional verification
Marcin Kazmierczak
SwitchCore AB
SwitchCore today
Fab-less semiconductor company
Develops integrated switching devices with advanced
QoS functionality for the gigabit Ethernet market.
In-house back-end and full-custom design
85 employees
Offices in Lund, Stockholm, San Jose, Boston and
Singapore
Design flow
Specification
RTL-Design
Block-level
Top-level
Simulations
Regression
Synthesis
Floorplanning
Regression
Layout
Tests netlist
Static Timing
Analysis
DRC
Tape Out
Verification Flow
Specification
Verification Plan
Beh
TB
Ext sim
RTL coding
TC
RTL debug
Why verify?
Cost of bug
Block design
Chip simulation
More debug
May require change in algorithm
Silicon in lab
Most often requires new tape-out
Expensive
At customer environment
Very expensive
Reputation
7
Functional simulation
Simulate
Stimulate a device from its inputs
Monitor outputs for expected behaviour
Show that the DUT works correctly for all valid
combinations of inputs
DUT
Testbench environment
Software based simulation environment
Resembles hardware lab
Pattern generators
Logic analyzers
Bus-functional models
Harness
Testbench environment
Testcases
Harness
BFM
BFM
10
DUT
BFM
Bus-functional models
11
PHY
Testcases
Direct testcases
Test isolated function
Automated result
Language
Calls high-level routines in
testbench
Stimuli
Expected
output
PASS
FAIL
TB ENGINE
12
Verification plan
General specification
Features
Definition of testcases
Conformance test plan
Specification of environment
Allocation of resources
Goals
Difficult to plan all activities
Block-level verification plan
13
Behavioural model
External functionality
High-level software
constructs
Keep it simple
Shorter development time
Faster simulations
Debug testcases
Archictectural issues
Differences from RTL
14
BEH
BFM
BFM
RTL
Regression
Test suite
Automation
Run on regular basis
Verify added functionality
Check that nothing already verified is broken
Repeatable
15
Observability
Propagation
Detection
DUT
16
Controllability
Triggering an error condition
Coverage
DUT
17
Code coverage
Statement
Branch
Path
Quality measure of test suite
Deficiencies?
Hardware concurrency
18
Functional coverage
State machine
States
Transitions
Transactions
CPU interfaces
Sequences
Frames
Cpu accesses
Combinations
19
Extended verification
Testplan
Basic sanity
Functions
Stress
20
Random simulation
21
Random simulation
Requirements on verification environment
constraints
seed
22
Random
parameters
BFM
Expected
result
BFM
DUT
BFM
PASS ?
FAIL ?
Generation
Bus-functional models
Higher-level of abstraction
Identification
Sequence numbers
Coverage
Frame types
Sequences
23
Checking
Protocol checkers
Bus-functional models
Standards
Protocol violation
BFM
24
DUT
BFM
Checking
Scoreboard
25
Transfer function
Expected data
Comparison function
Identification
On-the-fly checking
Difficulties?
Scoreboard
BFM
Match/Comparison
DUT
BFM
Parsing
Testcases written in proprietary format (SwitchCore)
Easy to change and re-run
Pre-processing of testcases (Perl)
Testcase
26
Pre-processor
Testfile
HDL Testbenches
HDLs (Verilog/VHDL) can be powerful with advanced
coding style
Known languages
But not efficient in testbench coding
Deficiencies
Non re-rentrant tasks in Verilog
No powerful primitives
27
Specman/E
Powerful primitives
Functional Coverage Points
Randomization
Methodology
No upfront definition of testcases
Verisity (www.verisity.com)
28
State machines
Signals
Values
Transactions
Cpu access
Vera
Verilog based
Object-oriented
Randomization functions
Checking
Synopsis (www.synopsis.com)
30
TestBuilder
C++
Class-library
Generation / checking
Open-source
Integration with NC-Verilog
Cadence (www.cadence.com)
31
Formal Verification
Mathematical
Proof properties
Exhaustive
Size
Properties
Equivalence checking
netlist - netlist
RTL - netlist
32
White-Box Verification
Assertions
Increase observability
Better coverage measure
Easier debug
Corner-cases
Used during RTL simulations
Error!
DUT
33
Semi-Formal Verification
Increase controllability
Formally check if assertions can be violated
Used with assertions during RTL simulations
Not exhaustive
Zero-in (www.0-in.com)
34
System simulation
PHY
NP
RAM
35
IF
Emulation
System of FPGAs
Faster simulation
Software/Hardware co-verification
Difficulties
Generation
Checking
37
Bugs
Bug tracking important
Categories
Minor
Respin
DOA (Dead-On-Arrival)
38
SwitchCore
ModelSim
Simulation on RTL and netlist (with timing)
Netlist simulation are very slow
Static timing analysis more efficient in finding timing
issues
39
SwitchCore
Block-level testbenches
Multi-block testbenches
Top-level testbench
Regression suite
Random tests
40
Experience
Multi-block testbenches
Designer should not verify own block
Random tests important
ASIC general specification
Planning / Goals
Clean interfaces between blocks
Bug tracking important
Release management
Difficult to plan debugging time
41
Future
Random simulation
Testcase generation
Closed-loop random generation
Formal methods
Hybrid methods (e.g. Semi-formal)
Less RTL coding
Verification more and more important
42