IP Verification
IP Verification
Lecture 9 IP Verification
October 2004
A USD$ 475 Million Bug
• Intel’s Pentium Bug in 1994
– 3.3 million transistors on chip
– 1 trillion (1012) cycles were simulated before tape-out
Juinn-Dar Huang
copyright © 2004 1
Verification Challenge (1/3)
• Designs grow as Moore’s Law predicted
• Design productivity has risen 10x since 1990 due
to synthesis
Juinn-Dar Huang
160
140
[email protected]
120
functional verification
IP Verification
60
40
is getting bigger 20
0
80
82
84
86
88
90
92
94
96
98
19
19
19
19
19
19
19
19
19
19
Year
copyright © 2004 2
Verification Challenge (2/3)
• 50% of chips require 1 or more re-spins
• 74% of re-spins are due to functional defects
Juinn-Dar Huang
Reasons of Re-Spins
Firmware 10%
IR Drop 11%
Power 14%
Reason
Yield 23%
[email protected]
Clocking 31%
Noise 33%
Functional 74%
copyright © 2004 4
Glossary
• Verification environment
– commonly referred as testbench (environment)
• Definition of testbench
Juinn-Dar Huang
testbenches
copyright © 2004 5
Verification Reuse
• Verification goal is defect-free
• The macro-level testbenches and suites should
be reusable
Juinn-Dar Huang
copyright © 2004 6
Verification Plan
• Verification plan is part of the design report
• Verification takes over 70% of development time
Juinn-Dar Huang
• Contents
– verification strategy for both subblock- and top-level
– testbench components - BFM, bus monitors, …
– required verification tools
[email protected]
copyright © 2004 7
Benefits of Verification Plan
• Verification plan enables
– developing the testbench environment early
– developing the test suites early
Juinn-Dar Huang
design task
copyright © 2004 8
Verification Strategy
• Three major phases
– subblock verification
• thorough and exhaustive functionality verification
Juinn-Dar Huang
– prototyping
• real prototype runs real software in the real application
IP Verification
• Regression verification
– ensure that fixing a bug will not introduce another bugs
– be performed on a regular basis
copyright © 2004 10
Assertion
• An assertion
– is a statement about a design’s intended behavior
– is also named as property; used interchangeably
Juinn-Dar Huang
copyright © 2004 11
Neither New nor Innovative Idea
• The assertion concept has been adopted to
software engineering for many many years
Juinn-Dar Huang
#include <assert.h>
focuses on interfaces
among IPs Formal
IP Verification
TB Automation
Functional Coverage
copyright © 2004 14
Taxonomy
Functional Verification
Dynamic Formal/Static
Juinn-Dar Huang
copyright © 2004 15
Verification Tools (1/2)
• Simulation
– even-driven: good debug environment
– cycle-based: fast simulation time
Juinn-Dar Huang
• Code coverage
– coverage on RTL structure
– Verification Navigator, CoverMeter
• Hardware Verification Language (HVL)
[email protected]
copyright © 2004 16
Verification Tools (2/2)
• Functional coverage
– coverage on functionality
• Formal property checking
Juinn-Dar Huang
– FPGA
– test chip in silicon
copyright © 2004 17
Verification IPs
• A package including well-designed and well-
verified BFM/monitor for a specific (interface)
protocol
Juinn-Dar Huang
copyright © 2004 18
Code Coverage (1/2)
• Indicate how much of design has been exercised
• Point out what areas need additional verification
• Optimize regression suite runs
Juinn-Dar Huang
copyright © 2004 19
Code Coverage (2/2)
• Types
– statement – branch
– condition – path
Juinn-Dar Huang
– toggle – triggering
– FSM
• Redundancy removal
• Minimize regression test suites
copyright © 2004 20
Verification with Code Coverage
Juinn-Dar Huang
[email protected]
IP Verification
copyright © 2004 23
Adversarial Testing
• For original designers
– focus on proving that the design works correctly
• Separate verification team
Juinn-Dar Huang
copyright © 2004 24
Limited Production
• Even after robust verification and prototyping, it’s
still not guaranteed to be bug-free
• A limited production for new macro is necessary
Juinn-Dar Huang
– 1 to 4 customers
– small volume
– reducing the risk of supporting problems
[email protected]
IP Verification
copyright © 2004 25
Testbench Design
• Auto or semi-auto stimulus generation is preferred
• Automatic response checking is a must
• Powerful pattern generators and function monitors help
Juinn-Dar Huang
• Macro-level testbench
– will be shipped along with the macro so that the customer can
verify the macro in the system design (reusable testbench)
Input Log,
Commands Response Error Report,
[email protected]
User PLI SV
Transactions
TestBuilder ACT
e/Specman 0-in
Vera …
copyright © 2004 26
Example: USB Device Controller
AHB AHB AHB
correctness
Master Slave Bus transaction logging
BFM BFM Monitor coverage
AHB
Juinn-Dar Huang
UTMI I/F
USB
Monitor
IP Verification
USB Bus
Automatic
User USB Response
Commands BFM Checking
copyright © 2004 27
Automatic Response Checking
Device Under
Verification
Juinn-Dar Huang
Automatic
Input
Response
Stimulus
Checking
Reference
Model
[email protected]
(C/C++,
HDL/HVL,
Hardware Modeler)
IP Verification
copyright © 2004 28
Functional Models (1/2)
• Functional (Behavioral) model is required for all
IPs
– fast simulation and integration in system-level designs
Juinn-Dar Huang
copyright © 2004 29
Functional Models (2/2)
• Functional models of different abstractions
– provide tradeoffs between accuracy and simulation
speed
Juinn-Dar Huang
copyright © 2004 30
Timing Verification
• STA is the fastest approach for timing verification
of synchronous designs
– avoiding any timing exceptions is extremely important
Juinn-Dar Huang
• Gate-level simulation
– most useful in verifying timing of asynchronous logic,
multi-cycle paths and false paths
– much slower run-time performance
[email protected]
– gate-level sign-off
IP Verification
copyright © 2004 31
Case Study 1:
16-Bit Embedded DSP Core
RTL Verification Environment
Assembly code
(*.dsp) Verification Environment
Coverage
Juinn-Dar Huang
measured
S/W Tools BDMA ISA by VN
I/F I/F
Execution file
(*.exe) BIST
PM PLL testing
(64Kx24)
[email protected]
DM Interrupt
IP Verification
copyright © 2004 33
Deterministic Verification
100+ deterministic verification suites
• Special functions
Juinn-Dar Huang
• Real code
IP Verification
copyright © 2004 34
Verification for External Interrupts
• One of the hard-to-verification cases
• Generating a complicated external interrupt
sequence is not easy
Juinn-Dar Huang
– highly configurable
– help create non- interrupts
IP Verification
copyright © 2004 35
Instruction Set Simulator (ISS)
• Implement in C
• Cycle-by-cycle accuracy
Juinn-Dar Huang
.. Hardware H.log
IP Verification
ISS I.log
copyright © 2004 36
FPGA Prototyping Board
SEGMENT
Juinn-Dar Huang
IO MEMORY
Unit
PF
AD1847 SPORTs Interface
BDMA
BDMA
DSP CORE MEMORY
[email protected]
Interface
Unit
ISA IDMA
Adatper Interface
IP Verification
BOOT ROM
Unit
PM DM CM
copyright © 2004 37
Application for FPGA Prototyping
• Bass enhancement
AD1847
Juinn-Dar Huang
UDSP-FPGA
[email protected]
IP Verification
copyright © 2004 38
ASIC Prototyping
• More difficult to debug
– lack of observability – limited external pins
– lack of controllability – free-run mode only
Juinn-Dar Huang
[email protected]
IP Verification
copyright © 2004 39
40
MP3 Demo System
copyright © 2004
IP Verification
Juinn-Dar Huang [email protected]
MP3 Player Demo System
Juinn-Dar Huang
[email protected]
CF Card
UDSP-
IP Verification
AC’97
Codec
copyright © 2004 41
Development Kit
7-Seg. LEDs EPP Port
Juinn-Dar Huang
Connectors
[email protected]
Audio
I/F
Flash ROM
IP Verification
UDSP-1600
copyright © 2004 42
Case Study 2:
32-Bit Embedded CPU Core
Design Verification
• Rigorous RTL coding style
– assured by a linting tool
• Verifiable RTL coding style
Juinn-Dar Huang
copyright © 2004 44
Deterministic Verification
• Data processing (ALU,shifter and multiplier)
• Memory access (load, store and swap)
• Branch and interrupt
Juinn-Dar Huang
copyright © 2004 45
Random Code Verification (1/2)
CPU RTL
IP Verification
Information dump
Constraint file
copyright © 2004 46
Random Code Verification (2/2)
• Random code generator
– constrained random instructions generation
• instruction type
Juinn-Dar Huang
• Result comparator
– automatically compare on the fly
IP Verification
• Deterministic verification
– predefined must-verify features
– corner-case verification
• Complete code coverage
[email protected]
– use Vera or e
– functional coverage
• Untimed and Timed ISA models
copyright © 2004 49
Must-Do List (2/2)
• Dynamic ABV
– use assertions intensively throughout the simulation
– use OVL and PSL
Juinn-Dar Huang
• FPGA prototyping
IP Verification
copyright © 2004 50
Untimed and Timed ISA Models (1/2)
• Untimed ISA model
– instruction-level accuracy
– no accurate timing information
Juinn-Dar Huang
copyright © 2004 51
Untimed and Timed ISA Models (2/2)
• System C is a good candidate for above models
– native and trivial for system designers
– good encryption
Juinn-Dar Huang
copyright © 2004 52
RTL Verification Flow
Verification
Vectors
Juinn-Dar Huang
2 Simulation
Code Coverage
Functional Coverage
Dynamic ABV, … 3 Property
Checking
4 Synthesis Gate-Level
[email protected]
RTL Netlist
Equivalence
IP Verification
1 Linting 5 Checking
Rules
Database
copyright © 2004 53