Professional Documents
Culture Documents
Verification of
Analog Designs
Smriti Gupta smritig@ece.cmu.edu
Bruce Krogh krogh@ece.cmu.edu
Rob A. Rutenbar rutenbar@ece.cmu.edu
DIGITAL
ANALOG Digital
Methodology
Simulation
Analog Abstraction
Methodology Formal
Simulation verification
Abstraction
Formal
verification 2
Outline
Background
Where does verification fit into analog design flow?
Sizedschematics
Cell Cell parasitics
layout
Cell parasitics for cell/block
for cell models Cell extract& design
backannotate
Redesignif system
Block&chip integrationfails
layout
Estimate
chipparasitics
Interconnectparasitics
Realistic cell models Systemmodel
for integration
System integration
verif. problem
Fab&test
Can we check late for
problems caused when
ideal blocks become real4
Verifying Analog Designs as
Hybrid Systems
Hybrid systems: Interacting discrete-
continuous dynamics
Model checking for hybrid systems
construct a finite-state abstraction of the
continuous dynamics
verify the abstraction reachability or ACTL
specifications
if the verification is inconclusive, refine the
abstraction
Application to Analog Circuits
continuous dynamics: differential or difference
equations
5
CheckMate: Hybrid System
Verification Tool
MATLAB/Simulink model
1. Constructs finite-state
abstraction with
transition relation
based on polyhedral
representations of
continuous
q
flows
q'
abstraction if
p p'
π'1
necessary.
π'2
3. Refines
Polyhedral sets of π
www.ece.cmu.edu/~webk/ 6
Computing Flowpipes for
Continuous Dynamics
Given a set of initial states, the procedure is
to generate a sequence of polyhedra that
contains all state trajectories (flows) from
that set.
0 1 0
E.g. x& 0 0 Features of the
1 x
approach:
1 2 2
Xo
• each polyhedra
: set of initial states
contains flows for ∆tk =
tk+1 − tk
• applies to nonlinear
dynamics
• includes piecewise
constant inputs
• approximation error
can be made arbitrarily7
Illustration Circuit: Tunnel Diode
Oscillator
Verification
question:
For specified device
parameters and
ranges of initial
states, will the
circuit oscillate
Start
I
correctly?
L here
???
VC
From: Walter Hartong, Lars Hedrich, and Erich Barke, “Model Checking Algorithms for
Analog Verification.” Design Automation Conference, 2002, pp. 542-547.
8
Specification as a Finite-State
Machine
Current(0-1e-3A)
VC
Voltage(0-0.5V) IL IL Threshold 2
Threshold 2
Threshold 1 Threshold 1
VC VC
IL
Threshold 2
Threshold 1
Start
IL VC
Threshold 2
Threshold 1
VC
9
CheckMate Model
Current (0-1e-
locati
p7 = current on3
A)
circuit is .7e-3
locati
3
dynamics p3 = current is on2
.3e-3
locati
on1
Voltage (0-0.5V)
thresholds
Checkmate
Model Finite State
Machine 10
Flowpipes and Finite-State
Abstractions
Oscillating Case Non – Oscillating Case
4
x 10 4
x 10
*10 -4
10 locatio 10
n3 9
8 8 locatio
3 4 3 n3
7
6 locatio 6 locatio
Current
Current
n2 5*10-4 n2
4
IC IC
(X2)
(X2)
4
2 S 1 2 S 1
3
Flowpipe Flowpipe
2 2
Approximati Approximati
on
locatio 1 locatio
on
0 n1 0 n1
0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5
Voltage Voltage
(X1) (X1)
11
Flowpipe Detail
Oscillating Case
4 Important points
4
x 10
x 10
n3 approximations dynamically
8
3 4 Flowpipes are conservative,
6 locatio ie,guaranteed to bound real
Current
n2 dynamics
4
IC *10-4
(X2)
2 S 1
Flowpipe
2
Approximati
on
locatio
10
0 n1
0 0.1 0.2 0.3 0.4 0.5
Voltage
(X1)
12
A Real Circuit: Delta Sigma A/D
Converter Digital
fs
Encodin
g
Decimator
Quantizer
Integrator Error (e[n])
1-bit quantizer
compares analog
Z-1 signal to a 0V ref,
outputs +1 or -1
D/A
Decimator
noise
f fB f fB
re re
INPUT: Input signalq. OUTPUT: Input signalq.and
spectrum noise spectrum
15
∆Σ-Modulator: Undesired Behavior
Means What?
Instability Quantizer Overload
Quantizer overload can If signal at the quantizer
cause the discrete-time exceeds a specific
integrators to hit maximum level—circuit
saturation (max voltage no longer exhibits linear
limits). behavior
Quantizer
Integrator Error (e[n])
Z-1
D/A
16
Real Example: 3rd-Order ∆Σ
Modulator
Integrat
or
Quanti
zer
Essential problem:
A higher-order ∆Σ uses more amplifiers to
better suppress noise
But it also more unstable, more prone to
17
How Do We “Test” For
Undesired Behavior?
3rd order ∆Σ Modulator
input
-
+ noise
LPF
18
Criterion 1: Noise in Signal Band
(LPF output) input
Third-Order -
Input + noise
Delta Sigma LPF
Signal Modulator
DC Input
Desired
Signal
Noise
Low SNR
Undesire
d
High
SNR
Time
Samples 19
Criterion 2: Quantizer Overload
Undesire
d
Behavior
Quantizer
Input
Desired
Behavior
Time Samples
20
To Verify the ∆Σ Modulator
Select a reasonable set of initial
(continuous) states
Remember – this isn’t a digital circuit!
Need to start verification from some “sensible” known
region of state space
21
∆Σ Modulator: Selecting the Range
of Initial States
Random
Input
selected
Reached states set of initial states
(no overload) for verification
state
bounds
22
∆Σ Modulator: Building
CheckMate Model
Noise-
Shaping
& LPF Quanti
Filters zer
FSM
Hyperplanes
defining various
regions for the
quantizer input
“zero_threshold
”:x>0
Hyperplane
“overload” : -2 Low Pass
defining the Filter
<x<2
desired region of FSM
the LPF
23
∆Σ Modulator: Modeling
Quantizer as FSM
Hyperplane
defining the
desired region of
the LPF
24
∆Σ Modulator: Modeling
Quantizer as FSM
Quantizer states:
current & previous quantizer output
(inputs to noise-shaping & low-pass filters)
Hyperplane
defining the
desired region of
the LPF
25
∆Σ Modulator: Modeling
Quantizer as FSM
"Avoid" state defines quantizer overload
(reachability specification)
Hyperplane
defining the
desired region of
the LPF
26
Result: CheckMate Reachability
Computations
Quantizer overload
(first violations)
(two views)
quantizer
threshold
Breadth-first reachability (wrt discrete
transitions)
~3 minutes to find first violation at depth 27
Results: Effect of Quantizer
Switching
projection onto
X1-X3 plane