Professional Documents
Culture Documents
IP Verification
Tian-Sheuan Chang
Outline
IP Verification
Tian-Sheuan Chang
Verification challenges
Verification process
Verification tools
RTL logic simulation
RTL formal verification
Verifiable RTL good stuff
Verifiable RTL bad stuff
Testbench design
SOC verification
Tian-Sheuan Chang
IP Verification
140
120
100
80
60
40
20
19
98
19
96
19
94
19
92
19
90
19
88
19
86
19
84
19
82
0
19
80
Tian-Sheuan Chang
IP Verification
160
Year
Logic or Functional
35%
Analog Circuit
29%
Noise
28%
Slow Path
25%
Clocking
Tian-Sheuan Chang
IP Verification
23%
Yield
21%
Mixed-Signal Interface
20%
IR Drops
Race Condition
17%
Power
17%
13%
Firmware
4%
Other
0%
10%
20%
30%
40%
50%
60%
70%
$10.7M
Support SW
Physical Design
6,000
Tian-Sheuan Chang
IP Verification
Verification
$4.7M
4,000
Design Planning
IP Dev and Qual
2,000
Spec
0
Re-spin
Original
Tian-Sheuan Chang
IP Verification
Outline
IP Verification
Tian-Sheuan Chang
Verification challenges
Verification process
Verification tools
RTL logic simulation
RTL formal verification
Verifiable RTL good stuff
Verifiable RTL bad stuff
Testbench design
SOC verification
Assertions
Test Plan
Lint Checking
Tian-Sheuan Chang
IP Verification
Test Bench
Simulation
with Assertion
Checking
Functional Coverage
Code Coverage
Verified RTL Code
Verification Plan
Part of early design cycle
Verification takes over 70% of development time
Contents
IP Verification
Tian-Sheuan Chang
Tian-Sheuan Chang
IP Verification
verified
Which features must be exercised under what
conditions and what is the expected response
IP Verification
Tian-Sheuan Chang
Force designers to think through the very timeconsuming process before performing them
Peer review allows a pro-active assessment of the entire
scope
Focus efforts first for area of most needed and greatest
payoff
Minimize the redundant effort
Tracked and managed more effectively
Enable verification tests and testbench early
Enable a separated verification team in parallel to reduce
design cycle
11
Tian-Sheuan Chang
IP Verification
System-Level Features
A subset of an ASIC, a few ASICs, an board design
Minimize the features verified at this level
Limited to connectivity, flow-control and inter-operability
12
Tian-Sheuan Chang
IP Verification
13
Tian-Sheuan Chang
IP Verification
Testbench
One testcase per testbench
Grouping several testcases into a single testbench
Verifying testbenches
Review by other verification engineer
Simulation output log
14
Verification Strategies
Three phases
Subblocks
Tian-Sheuan Chang
IP Verification
Macro
Interface verification between subblocks
Backward compatible (regression test suite)
Method: simulation, code coverage, TB automation, hardware
accelerator
Prototyping
Real prototype runs real application software
Method: emulator, FPGA, ASIC test chip
Bottom up approaches
Locality
Easier and faster to catch bugs at the lower level
15
Tian-Sheuan Chang
IP Verification
Regression testing
Verify that bug fixing wont create new bugs
Run on regular basis
16
Taxonomy
Functional Verification
Timing Verification
Dynamic timing analysis
Dynamic
Simulation based
Require input vectors
No 100% guarantee
Formal/static
IP Verification
Tian-Sheuan Chang
Property
Mathematical proof
No input vectors
100% guarantee
Classifications
Equivalence checking
Model checking
Simulation based
Require input vectors
No 100% guarantee
Used in gate-level simulation
Useful for timing verification of
power-up sequences and
timing exception path, e.g.
asynchronous logic, multi-cycle
paths, false paths,
Semi-/dynamic formal
Simulation based
Check assertions during
simulations
17
Exhaustive search
No input vectors
100% guarantee
No simulation required
Fastest approach
Sometimes pessimistic due to
incorrect timing exceptions
Copyright 2003 All rights reserved
Classification of Verification
Levels of Design Abstraction
Catch the
Specs.
Behavioral
RTL
Netlist
IP Verification
Functional
Specs.
Tian-Sheuan Chang
Validation
Intent
Verification
Equivalence
Verification
18
Equivalence
Verification
Tian-Sheuan Chang
IP Verification
RTL or Netlist
Equivalence
Checking
19
Outline
IP Verification
Tian-Sheuan Chang
Verification challenges
Verification process
Verification tools
RTL logic simulation
RTL formal verification
Verifiable RTL good stuff
Verifiable RTL bad stuff
Testbench design
SOC verification
20
Code coverage
Tian-Sheuan Chang
IP Verification
Tian-Sheuan Chang
IP Verification
Verification IP (VIPs)
Bus functional model (BFM) and bus monitors for
standard protocols
Hardware modeling
Emulation
Prototyping
FPGA
ASIC test chip
22
Inspection as Verification
Fastest, cheapest and most effective to detect
and remove bugs
How
Tian-Sheuan Chang
IP Verification
Line-by-line fashion
At the subblock level
Reviewer should fully understand the implementation
Purpose is to help drive quality and not for performance
assessment
Adversarial Testing
Designer
Focus on proving the design is right
Verification team
Tian-Sheuan Chang
IP Verification
24
Limited Production
Even after robust verification and prototyping, its
still not guaranteed to be bug free
A limited production for new macro is necessary
Tian-Sheuan Chang
IP Verification
1 to 4 customers
Small volume
Reduce the risk of supporting problems
25
Coverage
A metric identifies important:
Structures in a design representation
e.g. HDL lines, FSM states, paths in netlist
Classes of behavior
Transactions, event sequences
IP Verification
Tian-Sheuan Chang
Tian-Sheuan Chang
IP Verification
Code coverage
Line coverage
Branch coverage
Path coverage
Expression Coverage
Toggle Coverage
Functional coverage
27
Coverage (1/2)
Hardware code coverage
Tian-Sheuan Chang
IP Verification
Redundancy removal
Minimize regression test suites
Functional coverage
A user-defined metric that reflects the degree to which functional
features have been exercised during the verification process.
28
Coverage (2/2)
The Coverage First Paradigm
Tian-Sheuan Chang
IP Verification
Functional Coverage
You can achieve 100% code coverage, and still miss
key areas where bugs can be hiding.
It can eliminate the need to write many of the most time
consuming and hard to write tests.
29
Original
Model
PreProcessor
Instrumented
Model
Testbenches
Tian-Sheuan Chang
IP Verification
Simulation engine
Coverage
Metrics
Report
Generator
Metrics
Database
30
Coverage Analysis
Testbench
Tian-Sheuan Chang
IP Verification
Code Coverage
Report
Test Suite
Optimization Report
No
Modify Testbench
Meet ?
Yes
High Quality Testbench
31
Tian-Sheuan Chang
IP Verification
32
Propagation
Tian-Sheuan Chang
IP Verification
Justification
Controllability
vs.
Enumeration
Observability
Increase Observability
Black-box testing vs. white-box testing
Event-Monitors and Assertion Checkers
IP Verification
Tian-Sheuan Chang
34
Tian-Sheuan Chang
IP Verification
34%
9%
8%
7%
6%
4%
Self-Checking Test
11%
Manual Inspection of Simulation Output 7%
Simulation hang
6%
Other
8%
Simulation hang
6%
Other
8%
35
Tian-Sheuan Chang
IP Verification
Assertion Checker
25%
Register Miscompare
22%
15%
PC Miscompare
14%
8%
Manual Inspection
6%
Self-Checking Test
5%
3%
SAVES Check
2%
36
IP Verification
Tian-Sheuan Chang
Assertion Types
Invariant
assert_never(ck,event1, expression, event2)
assert_always(ck,event1, expression, event2)
Liveness
Event 1
Tian-Sheuan Chang
IP Verification
assert_eventually(...)
assert_eventually_always(...)
Event 2
P P P P P P P P
Invariant
time
Other
Event 1
assert_one_hot(...)
event_monitor(...)
Event 2
P
38
Liveness
time
IP Verification
Tian-Sheuan Chang
assert_odd_parity
assert_one_hot
assert_proposition
assert_range
assert_time
assert_transition
assert_unchange
assert_win_change
assert_win_unchange
assert_window
assert_zero_one_hot
assert_always
assert_change
assert_decrement
assert_delta
assert_even_parity
assert_increment
assert_handshake
assert_never
assert_no_overflow
assert_no_transition
assert_no_underflow
39
Assertion-based Verification
Assertion
Design assumption and properties
input should range from 0 to 240
after req raises, gnt is expected within 10 clock cycles
Tian-Sheuan Chang
IP Verification
Approaches
Library based
Open verification library. www.verificationlib.org
Language based
PSL (Sugar), System Verilog DAS (OVA)
Tian-Sheuan Chang
IP Verification
IP / Design Reuse
Assertions validate correct stimulation of IP within
system
Travel with IP
Provide immediate feedback to IP users
Reduce support calls to IP vendors
Document behavior and expectations
41
Benefits of Assertion-Based
Verification
Reduces debugging time
Assertions can continuously monitor internal signals in
the design, catching violations early in the design
process
Documents design
Tian-Sheuan Chang
IP Verification
Monitors I/O
Assertions can be used to verify protocols
Outline
IP Verification
Tian-Sheuan Chang
Verification challenges
Verification process
Verification tools
RTL logic simulation
RTL formal verification
Verifiable RTL good stuff
Verifiable RTL bad stuff
Testbench design
SOC verification
43
Fast Simulation
How to make simulation more productive ?
Make simulation more efficient
Coding style, faster workstation, hardware accelerator
IP Verification
Tian-Sheuan Chang
44
Tian-Sheuan Chang
IP Verification
Performance profiling
To accelerate the simulation
Log files over networking, large log files
Bad memory allocated policy
Regression
Efficiency is the king
Cycle-based, 2-state simulation
Subblock 2
Tian-Sheuan Chang
IP Verification
Macro 2
CHIP
CHIP
46
Emulation
Chip and testbench are in the emulator
for max performance
IP Verification
Tian-Sheuan Chang
Debugging
Phase
Regression
Phase
Verilog
Compilation
Std Vendor
Model
Cycle-based
Model
Signal
Accessibility
Full
Limited
Waveform
Viewing
Frequent
Seldom
Logging
Output
Full
Limited
PLI
C/C++
Debug
mode ON
Debug
mode OFF
47
Visit Minimization
Visit buses instead of bits
Bypass evaluation visits to intermediate logic not in an
active path
Use condition like if()
Tian-Sheuan Chang
IP Verification
48
2-State Simulation
2-state methods in place of X
Zero-initialization finds bugs that X cant
Due to X-state optimism
For more robust power-up verification
Tian-Sheuan Chang
IP Verification
Outline
IP Verification
Tian-Sheuan Chang
Verification challenges
Verification process
Verification tools
RTL logic simulation
RTL formal verification
Verifiable RTL good stuff
Verifiable RTL bad stuff
Testbench design
SOC verification
50
Tian-Sheuan Chang
IP Verification
51
Equivalence Checking
Checking after
Tian-Sheuan Chang
IP Verification
Synthesis
Scan chain insertion
Clock-tree synthesis
Manual modification
Place and route
ECO
52
Cutpoint
Internal cross-design signal equivalence pairs are
referred as cutpoint
Partition large cones of logic into smaller cones
for the proof
Tian-Sheuan Chang
IP Verification
Cutpoints
53
Tian-Sheuan Chang
IP Verification
54
Tian-Sheuan Chang
IP Verification
55
|| mem[idx])
r_nxt_st << 1;
r_nxt_st >> 1;
r_nxt_st;
IP Verification
Tian-Sheuan Chang
//Good
c_nxt_st_test = (a & b | c ^ d) || mem[idx];
case (c_nxt_st_test)
4'b0100: c_nxt_st = r_nxt_st << 1;
4'b1000: c_nxt_st = r_nxt_st >> 1;
default: c_nxt_st = r_nxt_st;
endcase;
56
Outline
IP Verification
Tian-Sheuan Chang
Verification challenges
Verification process
Verification tools
RTL logic simulation
RTL formal verification
Verifiable RTL good stuff
Verifiable RTL bad stuff
Testbench design
SOC verification
57
Tian-Sheuan Chang
IP Verification
Tian-Sheuan Chang
IP Verification
case (d)
2'b00 :
2'b01 :
2'b10 :
default :
endcase
e
e
e
e
=
=
=
=
2'b01;
2'b11;
2'b10;
2'b00;
59
IP Verification
Tian-Sheuan Chang
case (d)
2'b00
2'b0X
2'b01
2bX0
2'bX1
2'b11
2'b1X
2'b10
2'bXX
endcase
:
:
:
:
:
:
:
:
:
e
e
e
e
e
e
e
e
e
60
=
=
=
=
=
=
=
=
=
2'b01;
2'bX1;
2'b11;
2bXX;
2'bXX;
2'b00;
2'bX0;
2'b10;
2'bXX;
X? In Real World
There are no Xs
in the real circuit!
IP Verification
Tian-Sheuan Chang
s[1]
always @(a or b or s)
q
begin
case (s)//synopsys full_case
b
2b11: q = 1'bz;
2b01: q = a;
s[0]
2b10: q = b;
endcase
If s[1] = 0 and s[2] = 0
end
endmodule
we might be SMOKING!
Semantic Mismatch
61
IP Verification
Tian-Sheuan Chang
end // for
hit = | tmp ;
62
Tian-Sheuan Chang
IP Verification
^ {64{cell[5]}}))
^ {64{cell[4]}}))
^ {64{cell[3]}}))
^ {64{cell[2]}}))
^ {64{cell[1]}}))
^ {64{cell[0]}}));
hit = | tmp;
bit-indexing for more and more parallelism -- 3000x faster
hit = pd[cell];
63
Verifiable Subset
Two ways of constructed a design
to make it so simple that there are obviously no deficiencies
to make it so complicated that there are no obvious deficiencies
Tian-Sheuan Chang
IP Verification
IP Verification
Tian-Sheuan Chang
always
assign
begin
case
casex
default
else
end
endcase
endfunction
endmodule
function
if
initial
inout
input
module
negedge
or
output
65
parameter
posedge
reg
tri
tri0
tri1
wire
Copyright 2003 All rights reserved
Unsupported Operators
IP Verification
Tian-Sheuan Chang
operator
example
function
*
/
===
!==
-a
a*b
a/b
a===b
a!==b
unary minus
multiply
divide
equality (0/1/X/Z)
inequality (0/1/X/Z)
66
Asynchronous Principle
Asynchronous - not addressed by RTL verification. Requires:
Protocol verification - Petri net modeling
Failure rate analysis - Circuit analysis
Tian-Sheuan Chang
IP Verification
Asynchronous Principle
A design project must minimize and isolate resynchronization
logic between asynchronous clock domains.
67
Tian-Sheuan Chang
IP Verification
68
False Path
IP Verification
Tian-Sheuan Chang
input s;
input a, b;
output y, z;
wire s, a, b;
wire y, z;
assign y = s ? a : z;
assign z = s ? y : b;
endmodule
a
y
z
b
69
Apparent Feedback
IP Verification
Tian-Sheuan Chang
Fix 1
70
Verifiable case/casex
case/casex practices supporting verifiable RTL
Fully specified case/casex statements
Consistent test signal and constant widths
IP Verification
Tian-Sheuan Chang
71
Tian-Sheuan Chang
IP Verification
Cons
Worse synthesis result (not always true)
Alternative solution exists
Loss of simplicity
Alterative solution has more complicated coding style
72
case/casex Verification vs
Synthesis
IP Verification
Tian-Sheuan Chang
module one_hot(c_hot,c_code);
input [7:0] c_hot;
output [2:0] c_code;
reg [2:0] c_code;
always @ (c_hot) begin
case (c_hot) // synthesis full_case, for synthesis?
8b10000000: c_code = 3b000;
8b01000000: c_code = 3b001;
8b00100000: c_code = 3b010;
8b00010000: c_code = 3b011;
8b00001000: c_code = 3b100;
8b00000100: c_code = 3b101;
8b00000010: c_code = 3b110;
8b00000001: c_code = 3b111;
default:
c_code = 3b000; // or for verification
endcase
end // always (c_hot)
endmodule // one_hot
If default case is used, 3X gates are generated
73
Partially-Specified to FullySpecified
For smaller case statements
minimization savings not worth loss of verifiability
Tian-Sheuan Chang
74
IP Verification
Tian-Sheuan Chang
module one_hot(c_hot,c_code);
input [7:0] c_hot;
output [2:0] c_code;
reg [2:0] c_code;
reg [2:0] c_code0,c_code1,c_code2,c_code3;
reg [2:0] c_code4,c_code5,c_code6;
always @ (c_hot) begin
c_code6 = (c_hot [6]) ? 3b001 : 3b000;
c_code5 = (c_hot [5]) ? 3b010 : 3b000;
c_code4 = (c_hot [4]) ? 3b011 : 3b000;
c_code3 = (c_hot [3]) ? 3b100 : 3b000;
c_code2 = (c_hot [2]) ? 3b101 : 3b000;
c_code1 = (c_hot [1]) ? 3b110 : 3b000;
c_code0 = (c_hot [0]) ? 3b111 : 3b000;
c_code = c_code0 | c_code1 | c_code2 | c_code3 |
c_code4 | c_code5 | c_code6;
end // always (c_hot)
endmodule // one_hot
75
Outline
IP Verification
Tian-Sheuan Chang
Verification challenges
Verification process
Verification tools
RTL logic simulation
RTL formal verification
Verifiable RTL good stuff
Verifiable RTL bad stuff
Testbench design
SOC verification
76
X-state Pessimism
X-state Pessimism - arithmetic
IP Verification
Tian-Sheuan Chang
begin
b = 16b0000000000000000;
c = 16b000000000000X000;
a = b + c;
$display(" a = %b",a);
end
a = 16bXXXXXXXXXXXXXXXX
77
IP Verification
Tian-Sheuan Chang
begin
case (d)
2b00 :
e = 2b01;
2b01 :
e = 2b11;
2b10 :
e = 2b10;
default : e = 2b00;
endcase
$display(" e = %b",e);
end
If d contains an X then e = 2b00
RTL simulation will miss verifying alternate branches
(especially at the start-up sequences)
78
Accuracy impractical
Simulation performance.
Labor content.
Added X-state tests
branch to boolean conversion
Tian-Sheuan Chang
IP Verification
Complex verification
Completeness
Synthesis
79
Tian-Sheuan Chang
IP Verification
...
case (select)
2b01 :
mux = b;
2b10 :
mux = c;
default : mux = 2bX;
endcase
80
X in dont cares
Tian-Sheuan Chang
IP Verification
81
Visit Minimization
Criminals to degrade simulation performance
referencing bits instead of buses
Run-time configuration tests
loops.
IP Verification
Tian-Sheuan Chang
82
IP Verification
Tian-Sheuan Chang
c_ecc_out_1 =
^ (c_in & 40h003ffff893);
GOOD: Parallel
value evaluation
83
Run-Time Configuration
IP Verification
Tian-Sheuan Chang
module fifo(
...
parameter WIDTH = 13;
parameter DEPTH = 32;
parameter ENCODE = 0;
...
function [31:0] encoder;
input [WIDTH-1:0] indata;
begin
if (ENCODE != 0) begin
< calculate encode value based on indata >
end
else
encoder = indata;
End
Use conditional compilation directives `if, `else, `elseif,
`endif instead
84
For-Loops
BAD: Individual bit
visits, loop overhead
IP Verification
Tian-Sheuan Chang
input [N-1:0] a;
output [N-1:0] b;
integer i;
reg [N-1:0] b;
always @ (a) begin
for (i=0; i<=N-1; i=i+1)
b[i] = ~a[i];
end
input [N-1:0] a;
output [N-1:0] b;
assign b = ~a;
GOOD: Parallel
value evaluation
85
BAD:
For-loop
Better:
Concatenation
IP Verification
Tian-Sheuan Chang
input [15:0] a;
output [15:0] b;
integer i;
reg [15:0] b;
always @ (a) begin
for (i=0; i<=15;
i=i+1)
b[15 - i]] =
~a[i];
end
input [15:0] a;
output [0:15] b;
assign b = { a[0], a[1],
a[2], a[3], a[4], a[5],
a[6], a[7], a[8], a[9],
a[10], a[11], a[12],
a[13], a[14], a[15] };
86
For Loop
Simulate slow
from 10X to > 1000X slower than non-for loop versions.
Synthesizes slow
Memory clear
Tian-Sheuan Chang
IP Verification
87
Faithful Semantics
Bad coding style - unequal design information
HDL simulator information not used in synthesis
Synthesis switches not used by simulator.
X state
Tian-Sheuan Chang
IP Verification
Tian-Sheuan Chang
IP Verification
89
Tian-Sheuan Chang
90
Careless Coding
Incomplete sensitivity list
Latch inference
Incorrect procedural statement ordering
IP Verification
Tian-Sheuan Chang
91
Timing Problems
Project-wide policy
#0; delays
Non-blocking assignment delay
Testbench delays
IP Verification
Tian-Sheuan Chang
92
Race Condition
IP Verification
Tian-Sheuan Chang
Race
//file a.v
always @(posedge ck)
begin
b = a;
end
//file b.v
always @(posedge ck)
begin
c = b;
end
No race
//file a.v
always @(posedge ck)
begin
b <= a;
end
//file b.v
always @(posedge ck)
begin
c <= b;
end
93
Testbench Delays
Testbench designers insert delays to offset timing
with respect to clock edges for:
inserting control states
observing states
Tian-Sheuan Chang
IP Verification
94
Tian-Sheuan Chang
IP Verification
Just say no
95
Summary
Code your RTL for synthesis and verification as
well
Verifiable RTL coding styles
IP Verification
Tian-Sheuan Chang
96
Outline
IP Verification
Tian-Sheuan Chang
Verification challenges
Verification process
Verification tools
RTL logic simulation
RTL formal verification
Verifiable RTL good stuff
Verifiable RTL bad stuff
Testbench design
SOC verification
97
Output Interface
Input
Transaction
Generator
Input Interface
Tian-Sheuan Chang
IP Verification
Subblock testbench
98
Output
Transaction
Checker
Tian-Sheuan Chang
IP Verification
Self-checking is recommended
Detect problems as early as possible
Reusable testbench
Devce under test
Automatic
response
checking
stimulus
Referene model
(C/C++,HDL/HVL,
Hardware modeler)
99
Testbench Authoring
An effective testbench
Tian-Sheuan Chang
IP Verification
Concurrency
Encapsulation and abstraction
Self-checking
Automatic test stimulus generation
Reusable components
100
Macro Testbench
Application
Software
Drivers
Tian-Sheuan Chang
IP Verification
HW/SW cosim
Environment
Translator
Application
Bus
Monitor
PCI Bus
Monitor
PCI Bus
Functional Model
PCI Macro
101
Application Bus
Functional Model
CPU
Design
Under Test
RAM
Random
Logic
Bus Interface
Logic
System Bus
Tian-Sheuan Chang
IP Verification
bus monitor
102
Benefits
Tian-Sheuan Chang
IP Verification
103
bus monitor
Tian-Sheuan Chang
IP Verification
functional testing
corner case testing
code coverage
random testing
104
Transaction-based Verification
IP Verification
Tian-Sheuan Chang
105
Tian-Sheuan Chang
IP Verification
Error transactions
An error detected during simulation is recorded.
Concurrency
Out-of-order/pipelined transactions are displayed
106
IP Verification
Tian-Sheuan Chang
107
Behavioral Models
Describe the black-box functionality of a design, required
for all IPs
Benefits
Tian-Sheuan Chang
IP Verification
Cost
Require additional resource to write the behavior model
Maintenance requires additional efforts
Verification IP
A package including well-designed and well
verified BFM/monitor for a specific
protocol/interface
Tian-Sheuan Chang
IP Verification
109
AHB Master 2
APB Slave 1
AHB Master
Protocol Checker
AHB Master
Protocol Checker
AHB Master
Coverage Mointor
AHB Master
Coverage Mointor
APB Slave
Coverage Mointor
Bridge
Tian-Sheuan Chang
IP Verification
AHB Slave
Protocol Checker
AHB Slave
Protocol Checker
AHB Slave
Coverage Mointor
AHB Slave
Coverage Mointor
APB Slave
Coverage Mointor
APB Slave 2
AHB Slave 1
hclk
htrans NSEQ
haddr
A
hwrite
hwdata
DA
hresp
OKAY
hready
SEQ
A+4
SEQ
A+8
SEQ
A+8
DA+4
OKAY
DA+4
OKAY
DA+8
OKAY
AHB Slave 2
Verification Support
Protocol Checker
Monitor the transactions on an interface and check for
any invalid operation
Embedded in the test bench
Embedded in the design
Tian-Sheuan Chang
IP Verification
Performance monitor
Number of transfers, idle cycles...
111
Simulation Management
Pass or Fail ?
Produce a message that the simulation was terminated
normally
SDF Back-Annotation
Tian-Sheuan Chang
IP Verification
Very time-consuming
Invoke the simulation once for multiple testcases
Regression
Tian-Sheuan Chang
IP Verification
Outline
IP Verification
Tian-Sheuan Chang
Verification challenges
Verification process
Verification tools
RTL logic simulation
RTL formal verification
Verifiable RTL good stuff
Verifiable RTL bad stuff
Testbench design
IP Modeling
SOC verification
114
Tian-Sheuan Chang
IP Verification
Functional verification
Timing simulation/verification
Separate internal and external (interface) verification
Analysis: power and timing
out=AxB
Interface
Model
Behavioral
Model
B
S
Structural
Model
116
Interface
out=AxB
Interface
Abstract
Behavioral
Model
Interface
out=AxB
M-Bus
Clock
Structural model
Interface
Tian-Sheuan Chang
IP Verification
Interface
Behavioral model
20
CS
W_En
Data_Bus
16
Addr_Bus
Clock
Detailed
Behavioral
Model
Issues of IP Modeling
Attributes
What is the sufficient set of model attributes?
How are these model attributes validated?
How is the proper application of an abstract model
specified?
Tian-Sheuan Chang
IP Verification
117
Hierarchy
Refinemenet
Customer
Needs
Product
Deliver
System Function
System Function
Tian-Sheuan Chang
IP Verification
Architecture
Architecture
Verification
Behavioral
Behavioral
RTL
Logical Netlist
Abstract
Test
Patern
Layout
Mask
Logical Device
Wafer
Real
Fab
118
F2
F3
F4
F5
F6
Tian-Sheuan Chang
IP Verification
CPU
In 1
MEM
In 2
F1
F2
F3
F4
F5
F6
F1
F2
F3
F4
F5
F6
Co-P
Out 1
CPU
MEM
Co-P
In 1
In 2
Out 1
119
RTL Test
Synthesis
P&R
Integration Test
Tian-Sheuan Chang
IP Verification
RTL Test
Synthesis
P&R
120
IP Modeling
General Modeling Concept
Primary Model Classes:
Behavioral Model
Performance Model
Functional Model
Interface Model
Other Models
Structural Model
Hybrid Model
Tian-Sheuan Chang
IP Verification
System Models
Architecture Models
Hardware Models
Software Models
Executable Specification
Detailed-Behavioral Model
Pseudo-Code
Mathematical-Equation
Model
Abstract-Behavioral Model
Algorithm Model
Logic-Level Model
Assembly code
Gate-Level Model
Micro-Code
Switch-Level Model
Object Code
Circuit-Level Model
Precision Axis
Temporal Precision Axis
Data Precision Axis
Functional Precision Axis
Structural Precision Axis
Software Programming Precision Axis
121
CPU Model
CPU model enable
Estimate software performance
Analyze system trade offs
CPU model
Bus functional model
Tian-Sheuan Chang
IP Verification
Application code
Compile to
host processor
I/O
transactions
Bus
Bus functional Events Hardware
model
simulator
122
System model
Instruction set simulators (ISS)
Co-verification model
Bus Interface model
Tian-Sheuan Chang
IP Verification
Behavioral/RTL model
Design signoff models
Hardware modeling
Gate Level netlist model
Accuracy
Silicon
123
Co-verification model
IP Verification
Tian-Sheuan Chang
Provision of customized
Software Debugger/ARMulator
packages, suitable for dataflow
simulation environments.
Cadence Signal Processing
Worksystem (SPW) and
Synopsys COSSAP Stream
Driven Simulator
124
IP Verification
Tian-Sheuan Chang
Full architectural
functionality and full timing
accurate simulation
Accept process specific
timing and back annotated
timing
Used to sign off design
before committing silicon
Be compiled 'C' code which
enables protection of the
inherent IP and superior
simulation execution speed
over pure HDL models
Generated using ModelGen
125
Tian-Sheuan Chang
IP Verification
126
Intent of ModelGen
Key requirements for ARMs modeling
environment:
IP Verification
Tian-Sheuan Chang
127
ModelGen Source
(MGS)
Tian-Sheuan Chang
IP Verification
Exported State
Programmer model
Nine-value Logic/Full
Supports checkpointing
128
IP Verification
Tian-Sheuan Chang
129
Copyright
2003
All Compiler
rights reserved
VMC: Verilog Model Compiler,
VhMC: VHDL
Model
Tian-Sheuan Chang
IP Verification
Signal
Signal
Frequency
Actual behavioral
Frequency
Behavioral Model
Tian-Sheuan Chang
IP Verification
131
Interface Model
IP Verification
Tian-Sheuan Chang
132
Tian-Sheuan Chang
IP Verification
Block
Internal
Model
VC
Peripheral
Interconnection
VC
Peripheral
Interconnection
133
Power Model
Defines the power specification of the VC
Should be capable of representing both dynamic
power and static power
Tian-Sheuan Chang
IP Verification
IP Verification
Tian-Sheuan Chang
135
Physical Modeling
Physical block implementation of hard, soft and firm VCs.
Two models for hard VCs
Detailed model
Description of the physical implementation of the VC at the polygon
level
The preferred data format is GDSII 6.0.0
Tian-Sheuan Chang
IP Verification
Abstract model
Contains enough information to enable floorplanning, placement, and
routing of the system level chip
Footprint
Interface pin/port list, shape(s), and usage
Routing obstructions within the VC
Power and ground connections
Signature
The preferred data format is the MACRO section of VC LEF 5.1
136
Outline
IP Verification
Tian-Sheuan Chang
Verification challenges
Verification process
Verification tools
RTL logic simulation
RTL formal verification
Verifiable RTL good stuff
Verifiable RTL bad stuff
Testbench design
SOC verification
137
System Verification
It begins during system specification.
Develop system-level behavioral model.
Successful System-Level Verification
IP Verification
Tian-Sheuan Chang
138
IP Modeling
General Modeling Concept
Primary Model Classes:
Behavioral Model
Performance Model
Functional Model
Interface Model
Other Models
Structural Model
Hybrid Model
Tian-Sheuan Chang
IP Verification
System Models
Architecture Models
Hardware Models
Software Models
Executable Specification
Detailed-Behavioral Model
Pseudo-Code
Mathematical-Equation
Model
Abstract-Behavioral Model
Algorithm Model
Logic-Level Model
Assembly code
Gate-Level Model
Micro-Code
Switch-Level Model
Object Code
Circuit-Level Model
Precision Axis
Temporal Precision Axis
Data Precision Axis
Functional Precision Axis
Structural Precision Axis
Software Programming Precision Axis
139
SOC Verification
System
Validate through
Prototype, real chip or FPGA
Methodology
Tian-Sheuan Chang
IP Verification
IP Verification
Tian-Sheuan Chang
141
Interface Verification
Interface: address/data bus. Protocols
permitted sequence of control and data signals
use a bus transaction monitor to check the transaction
Tian-Sheuan Chang
IP Verification
Block 1
Block 2
Block 1 RTL
Interface
Block 2 RTL
Interface
Block 3 RTL
Interface
Block 4 RTL
Interface
Block 3
Block 4
Bus
Transaction
Monitor
System Verification
using Interface Testing (1)
Chip with Point-to-Point Interfaces
Tian-Sheuan Chang
IP Verification
Block1
RTL
Interface
Block3
RTL
Interface
Block1
Block1
RTL
Interface
Block2
RTL
Interface
Block3
Block3
RTL
Interface
Block4
RTL
Interface
Block2
Block2
RTL
Interface
Block4
Block4
RTL
Interface
Simple
Transaction
Checking
143
System Verification
using Interface Testing (2)
Chip with an On-Chip-Bus
IP Verification
Tian-Sheuan Chang
Bus
Functional
Models
(BFMs)
Block 1
Block 2
Block 1 RTL
Interface
Block 2 RTL
Interface
Bus
Transaction
Monitor
Block 3 RTL
Interface
Block 4 RTL
Interface
Block 3
Block 4
144
Insert
Checkers
Tian-Sheuan Chang
IP Verification
Tian-Sheuan Chang
IP Verification
Processor
Memory
Controller
Memory
System Bus
I/O
Interface
Data
Transformation
146
I/O
Interface
ISA
Application Software/
drivers/RTOS
Processor
C/C++
Memory Controller
C/C++
RTL Interface
RTL Interface
Behavioral
Model
Compiler
Memory
C/C++
CHIP
Tian-Sheuan Chang
IP Verification
Other
Peripheral
(RTL)
I/O Interface
(RTL)
Data
Transformation
(RTL)
I/O Interface
(RTL)
Communication
Bus Functional
Model (RTL)
Sequence
Generator /
Analyzer
Communication
Bus Functional
Model (RTL)
147
Application-Based Verification
Run actual applications on the system (a full
functional model).
Major Challenge
RTL Simulation is the bottleneck.
Tian-Sheuan Chang
148
Gate-Level Verification
Tian-Sheuan Chang
IP Verification
149
Sign-Off Simulation
Gate-level simulation, parallel test vectors, full scan
methodology
RTL sign-off problems
Simulation speed is too slow
Parallel vectors with very low fault coverage
Parallel vectors do not exercise all the critical timing paths
Tian-Sheuan Chang
IP Verification
Different Approaches
Formal Verification
Static Timing Analysis
Some Gate-level Simulation
Full Scan plus BIST
150
Rapid Prototyping
FPGA prototyping
Aptix (FPGAs + programmable routing chips
Emulation-based testing
Tian-Sheuan Chang
IP Verification
FPGA-based or processor-based
QuickTurn and Mentor Graphics
Specialized Hardware
for System Verification
System simulation through specialized hardware
systems for verification.
Zycad, IKOS
Tian-Sheuan Chang
IP Verification
Emulation Systems
Non-synthesizable code, especially testbenches, must run the
host machine.
The partitioning of the circuits among numerous FPGAs.
The use of FPGA makes controlling and observing individual
nodes in the circuit difficult.
152