Lecture 05 - 2014 - BEQ-Symbolic Simulation
Lecture 05 - 2014 - BEQ-Symbolic Simulation
Logic Verification
Full-chip functional verification
Full-chip functional to verify the correctness of the
verification design
Slide # 2
1
1
Boolean Equivalence Checking
Latch
Latch
MEM MEM
RTL Schematic
Slide # 3
Approaches
• Step 1 – Extract gate-level model from
transistor-level schematics
¾Explicit – pattern matching + symbolic
analysis
¾Implicit – symbolic simulation/analysis
• Step 2 – Check equivalence between two
(combinational) logic cones
¾OBDD-based approach
¾SAT-based approach
Slide # 4
2
2
Model Extraction
Spice
Netlist ?
Gate Gate RTL
Schematics
• Model extraction
¾Symbolic boolean analysis + pattern matching
¾Need to recognize precharge, self-timed
circuitry, latches, sometimes even memory cells
¾Need to find an “acceptable” gate-level model
9May not be exactly as what the original design intended
¾Useful for testing as well
Slide # 5
Symbolic Analysis
• For each CCC component
¾ consider all lines to the transistor
gates as inputs
¾ consider all lines to the transistor CCC
gates in other components as
outputs
• Steady state response
¾ given a set of input values,
compute steady output values
• Each component behaves like
an independent function block
¾ When extracting, we handle each
component separately
Slide # 6
3
3
Symbolic Analysis of Transistor Network
Slide # 7
Slide # 8
4
4
Construction Gate Level Model 2
X
• 0, 1, Z, X
¾ Z means “no value” 0 1
¾ X means “conflicting
values” Z e
Z 0 1 X
• ENABLE e Z Z Z Z
¾ Acts as an optimistic TSD a a 0 Z 0 0
1 Z 1 1
¾ Can use TSD instead X Z X X
9 The result will be pessimistic
b
• MERGE Z 0 1 X
Z Z 0 1 X
¾ Acts as LUB a
a 0 0 0 X X
b 1 1 X 1 X
X X X X X
Slide # 9
Slide # 10
5
5
Patterns
O
O
F
F G
G F=G?
F=G?
Clk
A
A
B
B
Slide # 11
Slide # 12
6
6
Identify Latch Correspondences
Latch
Latch Latch
…
Latch which?
• Manually or automatically?
• Manually – much overhead to the user
• Automatically -various heuristics are applied
¾Identify a latch point
¾Identify structural similarity
¾Utilizes design information (hierarchy, names, etc.)
Slide # 13
• ATPG-based approach
¾ To prove that the s-a-0 is a redundant fault
¾ Less memory constraint and hence, scale better
• (SAT-based approach)
• OBDD-based approach
¾ More memory constraint
Slide # 14
7
7
Structural Similarity Helps
?= ⇒ ?=
Slide # 15
a a’
8
8
BEQ IS Practical!!
• BEQ is practical
¾ Has been applied to full-chip μ-processors
¾ Commercially available
• BEQ check for “strong equivalence;” however
¾ Consistency may be enough
9 Both behave the same in the care functional space
¾ Equivalence up to limited clock cycles may be
enough
• BEQ will have its difficulty
¾ on memory designs
¾ when there is no structural similarity (on large and
complex cones)
¾ when there is no 1-to-1 latch correspondence
Slide # 17
Symbolic Simulation
9
9
Arrays
Logic
Latch
Latch
Logic
Latch
Memory
Core
Latch
Logic
Logic
Slide # 19
Symbolic Simulation
1 0 0 F(A,B,C,D,E,F,G,H)
C
G G 1
I F D
B
H E E
A
1 1 1
CLK
1 0
Slide # 20
10
10
Why It Is Good For Memories?
• Symbolic simulation of an address A =
[a1,a2,…,an] with a data D = [d1,d2,…,dm]
can cover all memory cells at once
¾ In contrast, imagine you perform 0/1 simulation on
a large memory block
¾ Today, an array easily has millions of cells
• Memories are often custom designs that
contains sequential behavior
¾ Contain dynamic logic
¾ Hard to model at gate-level
¾ LEQ does not apply
Slide # 21
G X 1
I F D
X
X X E
X
1 1 1
CLK
1 0 1 0
11
11
Trajectory Evaluation
• Based on three-value logic: {0,1,X}
A B State of this inverter is a 2-tuple <A,B>
where both A,B can have a value in {0,1,X}
Correct Trajectory
Antecedent
A B Assert: If (A is 0 from 0 to 1)
then (B=1 from 1 to 2)
1 unit delay Consequent
12
12
Incorrect Trajectory
Antecedent
A B Assert: If (A is 0 from 0 to 1)
then (B=1 from 1 to 2)
1 unit delay Consequent
STE Assertion
1 0 0 F(A,B,C,D,E,F,G) when F’ is true
C
G X 1
I F D
B
X E E OBDD
A
1 1 1
CLK
1 0 1 0
Slide # 26
13
13
A Write Assertion Example
Constant Control Values
Symbolic Control Values
Data D2 T0:Initialize What to
T0 be seen?
Address A2 Array[A1]=D1
time T
• At time T,
¾ If (A1 = A2) then Array[A1] = D2
¾ else { Array[A1] = D1 and Array[A2] = D2 }
• Describe how outputs behave based on symbolic
controls during CLK high
• Describe output behavior during CLK low
Slide # 27
STE Methodology
manual
RTL Gate Schematic
Assertions
Slide # 28
14
14
STE = EQ
Automatic
RTL Gate Schematic
Assertions
Slide # 29
Data Data_b
bl blb
C2
Bitline
Write enable
C2 wen
9
C1 iso
4 12 VDD VDD
sa pchg_b
Write enable from L1 latch
Sense line
saen
4 4 unit delays
9 9 unit delays
dout
Slide # 30
15
15
Bit Cell Timing Diagram
C1
C2
bl_pchg_b pchg 14
sa_pchg_b
8
wl
4
saen
12
iso
9
wen
dout D_OLD
TIME
Slide # 31
A Verification Example
RTL model
module(C1,C2,Ain,Bin,Cout)
RTL model
input Ain,Bin,C1,C2;
output Cout;
wire and_out;
Custom-built schemetic implementation
reg A.L1, A.L2, B.L1,B.L2, C.L1, C.L2 VDD
assign and_out = A.L2 & B.L2; Din D
L1
always @(C1 or Ain or Bin or and_out) Dl2out
L2 F
if (C1) C1
y L1
A.L1 = Ain; B.L1 = Bin; C.L1 = and_out; C2
always @(C2 or A.L1 or B.L1 or C.L1) Ein L2
E C1 Fl2out
if (C2) L1
A.L2 = A.L1; B.L2 = B.L1; C.L2 = C.L1; L2 C2
C1
C2 El2out GND
assign Cout = C.L2;
endmodule
Slide # 32
16
16
Verifying The Schematic
t0 t1 t2 t3- t4 t5 t6+ t8 t9
t3 t7
t6
C2 X X
C1 X c1 X
Antecedent
F.L1SN X c X
D.L2out X a X
Derive
E.L2out X b X
C1 & (A&B) |
F.L1SN X c [ c1 & (a & b) | (~c1 & c ) ] X (~C1 & C)
simulation
Symbolic
F.L1SN X X
Check for
[ c1 & (a & b) | (~c1 & c ) ]
Slide # 33
C1 clock
Primary outputs
Bitcell
Address Address matrix
decode logic
Data
conditioning
Data in logic
Feedback
1 wl0
Bitcell Bitcell
Row address
(log n + log m)
Row wl1
decoder n
Address
log m 1
Column Sense amp Sense amp
Word line
Column address Decoder m Din
column decoder
Selects from
Column mux
Array control signals
Read enable
Bitlines
Bitline
Slide # 34
17
17
Results – Motorola Versys2
Array block Bit cells Latches Control logic transistors Assertions runtime (hrs)
A 73,728 1,346 69,000 11–12
B 24,576 1,612 87,500 15–16
C 3,968 357 31,000 15–16
D 24,576 935 44,000 16–17
E 131,072 330 177,500 19–20
F 88,704 445 39,500 12–13
G 50,688 706 156,000 11–12 Validation time
H 71,680 276 60,000 15–16 Array block (person-months) Discrepancies
I 21,824 1,192 27,000 2–3 A 3 4
J 1,024 0 8,950 1.5–2 B 3 6
K 4,096 0 7,900 5–6 C 3 5
L 8,512 0 8,800 5–6 D 3 5
M 256 0 4,500 6–7 E 3 9
N 512 0 1,250 1–2 F 2 6
O 2,096 0 32,400 1–2 G 2 5
P 4,192 0 6,050 4–5 H 3 4
I 2 2
J 1 1
K 2 4
L 2 5
M 2 5
N 1 3
O 1 0
P 1 2
Slide # 35
In Summary
• Symbolic simulation is efficient for
embedded array verification
¾Symbolic addressing covers all space at once
¾Can be used for both logic and functional
verification (for array blocks)
¾Has been applied to very large array designs in
practice
• The methodology is not as rigorous as LEQ
¾LEQ checks for strong equivalence
¾Symbolic simulation checks for consistency
based on a pre-defined range of clock cycles
Slide # 36
18
18