Inspection As Verification Adversarial Testing Testbench Design Timing Verification
Inspection As Verification Adversarial Testing Testbench Design Timing Verification
Inspection As Verification Adversarial Testing Testbench Design Timing Verification
Requirements Specifications Behavioral models Extended functions (for generalization and re-use)
Perform prototyping
Verification means testing Validation means formal proof Verification means formal proof Validation means testing
Dont be confused
It meets the requirements, specifications It meets timing, power, and area goals It meets the re-use goals
Fundamental Ideas
Controllability
Can you wiggle every wire? Can you set every bit? Can you see the state of every bit? Can you see the value on every wire?
Observability
During validation, we can do this in the simulator especially in a bottom-up mode (In manufacturing test this is not so easy)
Random Testing
Regression Testing
bugs found
time
Verification Tools
Simulation
Hardware Modeling
Emulation
Prototyping
Static Tools
Static timing analysis tools Lint-like tools Formal verification tools
Model checking
Build abstract model of design and environment Uses smart exhaustive methods for safety and liveness
tests
Liveness: something good will eventually happen Safety: nothing bad will ever happen
Theorem proving
Uses automatic theorem provers to verify assertions
Inspection as Verification
The fastest, cheapest, and most effective way to detect and remove bugs is by careful inspection of the design and the code Design reviews
Large group review requirements, specifications, assumptions and overall design Smaller groups perform line-by-line review of implementation
Code reviews
Reviews must be done in a collegial atmosphere with the goal of enhanced quality, not to asses designer performance
Prototyping
Use Prototyping when:
You can not wait for the time it takes to find bugs using available simulation techniques
The prototype is just a fast simulator for the
device itself
Adversarial Testing
The designers tests have the goal to show that the system will work
Adversarial Testing uses a verification team of experts in testing all kinds of designs Goal: develop tests to show that the system will fail Report failures, and test cases to design team
Sub-Block Simulation
1. Use automated response checking
Not appropriate for designer to check waveforms by eye How many times will it be done? Use of automated test to build macro block testbench Use assertions in code to test assumptions
Testbench
The testbench For each component
Is the model of its external world Must generate (all) legal input sequences Must check output sequences Must alert the designer and log discrepancies between expected and actual results
Assume simple I/O relationships Input transaction data types, sequences Output transaction data types, sequences
Input Stimulus
Generate all legal sequences of inputs Look at functionality of DUT Check corner cases Achieve 100% coverage
Output Checking
Check for legal sequences of outputs Look at functionality of DUT Check corner cases Check input/output relationships
Timing plan for each sub-block Clocking, handshaking Timing budgets, per-cycle latency budget Are the sub-blocks within their bugets
Block Integration
Integration Steps
Integrating the sub-blocks Top level netlist Final synthesis Final testing Manufacturing testability Scan insertion ATPG Test coverage
Timing Verification
Post synthesis timing
Wrappers for each sub-block as needed (for signal compatibility before/after synthesis)
After synthesis every wire is a bit
Macro Testbench
Design is more complex
Generating Testbenches
Not simple do scripts Complex state machines:
Loop
Generate stimulus
Get output Check results
Log results
Change stimulus parameters
Simple Example
Simulate Busses
DUT
Simulate ROM
Address Bus
Register File
Data Bus
I/O Bus
Also, supply data values Check address ranges Also, r/w timing Overwriting data Also, response to asynchronous events Response to out of range data
I/O
I/O Testbench
Help!
Use existing models for bench components
Have a test team, with their own test library Take library components and enhance them with checking/logging functions
Bus functional models
Need to have statistical bounds on input/output timing Use random generators for stimulus sequences
Use C/C++ models and co-simulation for bench Need to have a master bench controller to coordinate I/O behaviors on all components
Types of Coverage
Statement Coverage
Branch Coverage
Condition Coverage
Path Coverage
Trigger Coverage
Toggle Coverage