SoC Verification
SoC Verification
SoC Verification
Outline
Verification Overview Verification Strategies Tools for Verification SoC Verification Flow
l l l l
What is Verification ?
l
A process used to demonstrate the functional correctness of a design To making sure your are verifying that you are indeed implementing what you want To ensure that the result of some transformation is as expected
Transformation
Specification
Verification
Netlist
3
Source : Writing Test Benches Functional Verification of HDL Models by Janick Bergeron, KAP, 2000.
Verification Problems
l l l l
Was the spec correct ? Did the design team understand the spec? Was the blocks implemented correctly? Were the interfaces between the blocks correct? Does it implement the desired functionality?
4
HW Design
Manufacturing
Specification
Verification
Netlist
Testing
Silicon
Source : Writing Test Benches Functional Verification of HDL Models by Janick Bergeron, KAP, 2000.
Using pre-defined and pre-verified building block can effectively reduce the productivity gap
Block (IP) based design approach Platform based design approach
An Industrial Example
System Simulation ASIC Testbenches Extended Simulation Equivalence Checking Emulation Support Emulation Software Verification Design BEH Model Bottleneck !! High Level Design
Source : Functional Verification on Large ASICs by Adrian Evans, etc., 35th DAC, June 1998.
Verification Complexity
l
transitions
l
Weeks
10
Error-Free Design ?
l
As the number of errors left to be found decreases, the time and cost to identify them increases Verification can only show the presence of errors, not their absence Two important questions to be solved:
How much is enough? When will it be done?
11
Reference Book
l
12
Outline
Verification Overview Verification Strategies Tools for Verification SoC Verification Flow
l l l l
13
Verification Approaches
l
14
Locality Catching bugs is easier and faster with foundational IPs (sub-blocks) Design the SoC chip with these highly confidence bug-free IPs
15
Verification Environment
Output (Response)
16
Terminology
l
Verification environment
Commonly referred as testbench (environment)
Definition of a testbench
A verification environment containing a set of
components [such as bus functional models (BFMs), bus monitors, memory modules] and the interconnect of such components with the designunder-verification (DUV)
l
testbenches
17
Testbench Design
l l
Auto or semi-auto stimulus generator is preferred Automatic response checking is highly recommended May be designed with the following techniques
Testbench in HDL Tesebench in programming language interface (PLI) Waveform-based Transaction-based Specification-based
18
Random testing
Try to create scenarios that engineers do
not anticipate
l
Functional testing
User-provided functional patterns
l l l
Compliances testing Corner case testing Real code testing (application SW)
Avoid misunderstanding the spec.
19
Regression testing
Ensure that fixing a bug will not introduce
Bug Tracking
l
A central database collecting known bugs and fixes Avoid debugging the same bug multiple times Good bug report system helps knowledge accumulation
21
Bug rate usually follow a well-defined curve The position on the curve decides the most-effective verification approach Help determine whether the SoC is ready to tape-out
22
# of bugs reported
Time
23
Adversarial Testing
l
methodologies
l
Verification Plan
l l
is successfully complete
25
26
Outline
Verification Overview Verification Strategies Tools for Verification SoC Verification Flow
l l l l
27
Simulation
Event-driven: Timing accurate Cycle-based: Faster simulation time (5x 100x) Transaction-based: Require bus functional model (BFM) of each design Only check the transactions between components Have faster speed by raising the level of abstraction
28
Event-Driven Simulation
l l l
Advance Time
Event Evaluation
Propagate Events
Finish
29
Cycle-Based Simulation
l
Faster simulation time (5x 100x) Only works for synchronous designs Only cycle-accurate Require other tools (ex: STA) to check timing problems
30
Simulation-Based Verification
l
Test cases
User-provided (often) Randomly generated
Near-term improvements
Faster simulators
Compiled code, cycle-based, emulation, Testbench tools Make the generation of pseudo-random patterns better/easier
l
Code coverage
Qualify a particular test suite when applied to a
Coverage-Driven Verification
l
Coverage reports can indicate how much of the design has been exercised
Point out what areas need additional verification
Quantitative sign-off (the end of verification process) criterion Verify more but simulate less
33
Time
source : Verification Methodology Manual For Code Coverage In HDL Designs by Dempster and Stuart 34
Coverage Analysis
l l
Dedicated tools are required besides the simulator Several commercial tools for measuring Verilog and VHDL code coverage are available VCS (Synopsys) NC-Sim (Cadence) Verification navigator (TransEDA) Basic idea is to monitor the actions during simulation Require supports from the simulator PLI (programming language interface) VCD (value change dump) files
35
l l
Analysis Results
n
36
Testbench Automation
l
Require both generator and predictor in an integrated environment Generator: constrained random patterns
Ex: keep A in [10 100]; keep A + B == 120; Pure random data is useless Variations can be directed by weighting options Ex: 60% fetch, 30% data read, 10% write
A mathematical model written in Hardware Description Language Emulate circuit block functionality by sensing and responding to circuit conditions Available Analog/Mixed-Signal HDL:
Verilog-A VHDL-A Verilog-AMS VHDL-AMS
38
Available simulators:
Cadence Antrim Mentor Synopsys
39
Static technologies
Lint checking:
A static check of the design code Identify simple errors in the early design cycle Static timing analysis: Check timing-related problems without input patterns Faster and more complete if applicable Formal verification: Check functionality only Theoretically promise 100% coverage but design size is often limited due to high resource requirement
40
HDL Linter
l
Inspection
l
For designers, finding bugs by careful inspection is often faster then that by simulation Inspection process
Design (specification, architecture) review Code (implementation) review
Line-by-line fashion At the sub-block level
What is STA ?
l l
STA = static timing analysis STA is a method for determining if a circuit meets timing constraints without having to simulate No input patterns are required
100% coverage if applicable
FF1 CLK
FF2
Reference :Synopsys
43
Formal Verification
l
Ensure the consistency with specification for all possible inputs (100% coverage) Primary applications
Equivalence Checking Model Checking
Solve the completeness problem in simulationbased methods Cannot handle large designs due to its high complexity Valuable, but not a general solution
44
Equivalence Checking
Synthesis RTL or Netlist
Gate-level to gate-level
Ensure that some netlist post-processing did not change the
RTL to gate-level
Verify that the netlist correctly implements the original RTL code
RTL to RTL
Verify that two RTL descriptions are logically identical
45
Equivalence Checking
l
Verysys,
l
But the hard bugs are usually in both descriptions Target implementation errors, not design errors
Similar to check C v.s. assembly language
46
Model Checking
RTL Coding Specification Interpretation Assertions
l
Formally prove or disprove some assertions (properties) of the design The assertions of the design should be provided by users first
Described using a formal language
47
Model Checking
l
Enumerates all states in the STG of the design to check those assertions Gaining acceptance, but not widely used
Abstract, Chrysalis, IBM, Lucent, Verplex,
Verysys,
l
abstraction (of the design) Both tend to cause costly false errors
48
New Approaches
l
The two primary verification methods both have their drawbacks and limitations
Simulation: time consuming Formal verification: memory explosion
Hardware modeling
Pre-developed simulation models for other
Emulation
Test the system in a hardware-liked fashion
Rapid prototyping
FPGA ASIC test chip
50
Assistant Hardware
l
Rule of thumb
10 cycles/s for software simulator 1K cycles/s for hardware accelerator 100K cycles/s for ASIC emulator
Hardware accelerator
To speed up logic simulation by mapping
51
Emulation
l
Emulation
Verify designs using real hardware (like FPGA?) Better throughput in handling complex designs Inputs should be the gate-level netlist Synthesizable testbenches required Require expensive emulators Software-driven verification
Verify HW using SW Verify SW using HW
Prototyping
l
FPGA
Performance degradation Limited design capacity (utilization) Partitioning and routing problems
Emulation system
FPGA + Logic modeler Automatic partitioning and routing under
Limited Production
l
l l
Even after robust verification process and prototyping, its still not guaranteed to be bug-free Engineering samples A limited production for new macro is necessary
1 to 4 customers Small volume Reducing the risk of supporting problems
Source : System-on-a-chip Verification Methodology and Techniques by P. Rashinkar, etc., KAP, 2001.
55
Outline
Verification Overview Verification Strategies Tools for Verification SoC Verification Flow
l l l l
56
Source : System-on-a-chip Verification Methodology and Techniques by P. Rashinkar, etc., KAP, 2001.
57
Verify the leaf IPs Verify the interface among IPs Run a set of complex applications Prototype the full chip and run the application software Decide when to release for mass production
58
Interesting Observations
l
90% of ASICs work at the first silicon but only 50% work in the target system
Do not perform system level verification (with
software)
l
Interface Verification
l
Inter-block interfaces
Point-to-point On-chip bus (OCB) Simplified models are used
BFM, bus monitors, bus checkers
60
real world
l
Running real application codes (such as boot OS) for higher design confidence
RTL simulation is not fast enough to
61
Solutions
Move to a higher level of abstraction for
HW/SW Co-Simulation
l
Couple a software execution environment with a hardware simulator Simulate the system at higher levels
Software normally executed on an Instruction Set
Simulator (ISS) A Bus Interface Model (BIM) converts software operations into detailed pin operations
l l l
Allows two engineering groups to talk together Allows earlier integration Provide a significant performance improvement for system verification
Have gained more and more popularity
63
System-Level Testbench
l
All functionality stated in the spec. should be covered The success and failure conditions must be defined for each test Pay particular attention to:
Corner cases Boundary conditions Design discontinuities Error conditions Exception handling
Source : System-on-a-chip Verification Methodology and Techniques by P. Rashinkar, etc., KAP, 2001.
64
Timing Verification
l
STA (static timing analysis) is the fastest approach for synchronous designs
Avoid any timing exceptions is extremely important
65
Design Sign-off
l
Sign-off is the final step in the design process It determines whether the design is ready to be taped out for fabrication No corrections can be made after this step The design team needs to be confident that the design is 100% correct
Many items need to be checked
Source : System-on-a-chip Verification Methodology and Techniques by P. Rashinkar, etc., KAP, 2001.
66
Traditional Sign-off
l
given parallel verification vectors Verify functionality and timing at the same time (dynamic timing analysis, DTA) Parallel verification vectors also serve as the manufacturing test patterns
l
Problems
Infeasible for million gates design (take too much
simulation time) Fault coverage is low (60% typically) Critical timing paths may not be exercised
67
Formal verification used to verify functionality STA for timing verification Gate level simulation
Supplement for formal verification and STA
l l
68