Lecture 4: Robust Analog Circuit Sizing Under Process Variations

@luk036

2022-10-12

📝 Abstract

The lecture focuses on the robust sizing of analog circuits under process variations. It analyzes the challenges that arise when designing analog circuits at the 20nm process node, including double-patterning, layout-dependent effects, new local interconnect layers, and the use of FinFET transistors. The lecture stresses the importance of designing circuits with robustness in mind by factoring in process variations in the specification requirements. The lecture presents the concept of formulating the analog circuit sizing problem and identifies the difficulties involved, such as the high level of flexibility and susceptibility to variations. The lecture also explores various approaches to computer-aided design (CAD) for analog circuits, including knowledge-based and optimization-based techniques. The lecture discusses emerging techniques in geometric programming (GP), introducing a new method for solving robust GP problems using the affine arithmetic and the ellipsoid technique. An example of CMOS two-stage operational amplifier design demonstrates the application of the robust geometric programming approach.

🔑 Keywords

  • Analog circuit 模拟电路
  • Design for robustness 鲁棒性设计
  • Worst-case scenarios 最坏情景
  • Affine arithmetic 仿射运算
  • Convex programming 凸规划
  • Geometric programming 几何规划
  • Posynomial 正项式 (Positive + polynomial)
  • Ellipsoid method 椭球法

🗺️ Overview

  • Challenges of 20nm Analog Design

  • Design for variability

  • Design for robustness

  • Analog circuit sizing problem formulation

  • Robust geometric programming

  • Affine arithmetic for worst case scenarios

  • Design examples

📖 Introduction

Costs 28nm 20nm


Fab Costs 3B 4B - 7B Process R&D 1.2B 2.1B - 3B Mask Costs 2M - 3M 5M - 8M Design Costs 50M - 90M 120M - 500M

: Fab, process, mask, and design costs are much higher at 20nm (IBS, May 2011)

Challenges at 20 nm

  • Double-patterning aware

  • Layout-dependent effects

  • New local interconnect layers

  • >5,000 design rules

  • Device variation and sensitivity

  • New type of transistor - FinFET

👫 Double Patterning

img

Overlay Error (Mask Shift)

  • Parasitic matching becomes very challenging

    img

Layout-Dependent Effects

Layout-Dependent Effects> 40nmAt 40nm>= 28nm
Well Proximity Effect (WPE)xxx
Poly Spacing Effect (PSE)xx
Length of Diffusion (LOD)xxx
OD to OD Spacing Effect (OSE)xx

New Local Interconnect Layers

img

New Transistor Type: FinFET

Width is discrete. You can add 2 fins or 3 fins, but not 2.75 fins.

Design for Robustness

  • Process variations must be included in the specification.

Basic Design Flow

img

Top-down Design Phases

img

Basic Flow of Analog Synthesis

img

Analog Circuit Sizing Problem

  • Problem definition:
    • Given a circuit topology, a set of specification requirements and technology, find the values of design variables that meet the specifications and optimize the circuit performance.
  • Difficulties:
    • High degrees of freedom
    • Performance is sensitive to variations

Main Approaches in CAD

  • Knowledge-based
    • Rely on circuit understanding, design heuristics
  • Optimization based
    • Equation based
      • Establish circuit equations and use numerical solvers
    • Simulation based
      • Rely on circuit simulation

In practice, you mix and match of them whenever appropriate.

Geometric Programming

  • In recent years, techniques of using geometric programming (GP) are emerging.
  • In this lecture, we present a new idea of solving robust GP problems using ellipsoid method and affine arithmetic.

Lecture 04b - Robust Geometric Programming

Outline

  • Problem Definition for Robust Analog Circuit Sizing
  • Robust Geometric Programming
  • Affine Arithmetic
  • Example: CMOS Two-stage Op-Amp
  • Numerical Result
  • Conclusions

Robust Analog Circuit Sizing Problem

  • Given a circuit topology and a set of specification requirements:
ConstraintSpec.Units
Device Widthm
Device Lengthm
Estimated Areaminimizem
CMRRdB
Neg. PSRRdB
PowermW
  • Find the worst-case design variable values that meet the specification requirements and optimize circuit performance.

Robust Optimization Formulation

  • Consider where
    • represents a set of design variables (such as , ),
    • represents a set of varying parameters (such as )
    • represents the th specification requirement (such as phase margin ).

Geometric Programming in Standard Form

  • We further assume that 's are convex for all .
  • Geometric programming is an optimization problem that takes the following standard form: where
    • 's are posynomial functions and 's are monomial functions.

Posynomial and Monomial Functions

  • A monomial function is simply: where
    • is non-negative and .
  • A posynomial function is a sum of monomial functions:
  • A monomial can also be viewed as a special case of posynomial where there is only one term of the sum.

Geometric Programming in Convex Form

  • Many engineering problems can be formulated as a GP.
  • On Boyd's website there is a Matlab package "GGPLAB" and an excellent tutorial material.
  • GP can be converted into a convex form by changing the variables and replacing with : where

Robust GP

  • GP in the convex form can be solved efficiently by interior-point methods.
  • In robust version, coefficients are functions of .
  • The robust problem is still convex. Moreover, there is an infinite number of constraints.
  • Alternative approach: Ellipsoid Method.

Example - Profit Maximization Problem

This example is taken from [@Aliabadi2013Robust].

  • : Cobb-Douglas production function
  • : the market price per unit
  • : the scale of production
  • : the output elasticities
  • : input quantity
  • : output price
  • : a given constant that restricts the quantity of

Example - Profit maximization (cont'd)

  • The formulation is not in the convex form.
  • Rewrite the problem in the following form:

Profit maximization in Convex Form

  • By taking the logarithm of each variable:

    • , .
  • We have the problem in a convex form:

class profit_oracle:
    def __init__(self, params, a, v):
        p, A, k = params
        self.log_pA = np.log(p * A)
        self.log_k = np.log(k)
        self.v = v
        self.a = a

    def __call__(self, y, t):
        fj = y[0] - self.log_k  # constraint
        if fj > 0.:
            g = np.array([1., 0.])
            return (g, fj), t
        log_Cobb = self.log_pA + self.a @ y
        x = np.exp(y)
        vx = self.v @ x
        te = t + vx
        fj = np.log(te) - log_Cobb
        if fj < 0.:
            te = np.exp(log_Cobb)
            t = te - vx
            fj = 0.
        g = (self.v * x) / te - self.a
        return (g, fj), t
# Main program

import numpy as np
from ellpy.cutting_plane import cutting_plane_dc
from ellpy.ell import ell
from .profit_oracle import profit_oracle

p, A, k = 20., 40., 30.5
params = p, A, k
alpha, beta = 0.1, 0.4
v1, v2 = 10., 35.
a = np.array([alpha, beta])
v = np.array([v1, v2])
y0 = np.array([0., 0.])  # initial x0
r = np.array([100., 100.])  # initial ellipsoid (sphere)
E = ell(r, y0)
P = profit_oracle(params, a, v)
yb1, ell_info = cutting_plane_dc(P, E, 0.)
print(ell_info.value, ell_info.feasible)

Example - Profit Maximization Problem (convex)

  • Now assume that:
    • and vary and respectively.
    • , , , and all vary .

Example - Profit Maximization Problem (oracle)

By detail analysis, the worst case happens when:

  • ,
  • , ,
  • if , , else
  • if , , else
class profit_rb_oracle:
    def __init__(self, params, a, v, vparams):
        e1, e2, e3, e4, e5 = vparams
        self.a = a
        self.e = [e1, e2]
        p, A, k = params
        params_rb = p - e3, A, k - e4
        self.P = profit_oracle(params_rb, a, v + e5)

    def __call__(self, y, t):
        a_rb = self.a.copy()
        for i in [0, 1]:
            a_rb[i] += self.e[i] if y[i] <= 0 else -self.e[i]
        self.P.a = a_rb
        return self.P(y, t)

🔮 Oracle in Robust Optimization Formulation

  • The oracle only needs to determine:
    • If for some and , then
      • the cut =
    • If for some , then
      • the cut =
    • Otherwise, is feasible, then
      • Let .
      • .
      • The cut =

Remark:

  • for more complicated problems, affine arithmetic could be used [@liu2007robust].

Lecture 04c - Affine Arithmetic

A Simple Area Problem

  • Suppose the points , and vary within the region of 3 given rectangles.
  • Q: What is the upper and lower bound on the area of ?

triangle

Method 1: Corner-based

  • Calculate all the areas of triangles with different corners.
  • Problems:
    • In practical applications, there may be many corners.
    • What's more, in practical applications, the worst-case scenario may not be at the corners at all.

Method 2: Monte Carlo

  • Monte-Carlo or Quasi Monte-Carlo:
    • Calculate the area of triangles for different sampling points.
  • Advantage: more accurate when there are more sampling points.
  • Disadvantage: time consuming

Interval Arithmetic vs. Affine Arithmetic

Method 3: Interval Arithmetic

  • Interval arithmetic (IA) estimation:
    • Let px = [2, 3], py = [3, 4]
    • Let qx = [-5, -4], qy = [-6, -5]
    • Let rx = [6, 7] , ry = [-5, -4]
  • Area of triangle:
    • = ((qx - px)(ry - py) - (qy - py)(rx - px))/2
    • = [33 .. 61] (actually [36.5 .. 56.5])
  • Problem: cannot handle correlation between variables.

Method 4: Affine Arithmetic

  • (Definition to be given shortly)
  • More accurate estimation than IA:
    • Area = [35 .. 57] in the previous example.
  • Take care of first-order correlation.
  • Usually faster than Monte-Carlo, but ....
    • becomes inaccurate if the variations are large.
  • libaffa.a/YALAA package is publicly available:
    • Provides functuins like +, -, *, /, sin(), cos(), pow() etc.

Analog Circuit Example

  • Unit Gain bandwidth
    • GBW = sqrt(A*Kp*Ib*(W2/L2)/(2*pi*Cc) where some parameters are varying

Enabling Technologies

  • C++ template and operator overloading features greatly simplify the coding effort:

  • E.g., the following code can be applied to both <double> and <AAF>:

    template <typename Tp>
    Tp area(const Tp& px, const Tp& qx, const Tp& rx,
            const Tp& py, const Tp& qy, const Tp& ry) {
        return ((qx-px)*(ry-py) - (qy-py)*(rx-px)) / 2;
    }
    
  • In other words, some existing code can be reused with minimal modification.

Applications of AA

  • Analog Circuit Sizing
  • Worst-Case Timing Analysis
  • Statistical Static Timing Analysis
  • Parameter Variation Interconnect Model Order Reduction [CMU02]
  • Clock Skew Analysis
  • Bounded Skew Clock Tree Synthesis

Limitations of AA

  • Something AA can't replace <double>:
    • Iterative methods (no fixed point in AA)
    • No Multiplicative inverse operation (no LU decomposition)
    • Not total ordering, can't sort (???)
  • AA can only handle linear correlation, which means you can't expect an accurate approximation of abs(x) near zero.
  • Fortunately the ellipsoid method is one of the few algorithms that works with AA.

Circuit Sizing for Op. Amp.

  • Geometric Programming formulation for CMOS Op. Amp.
  • Min-max convex programming under Parametric variations (PVT)
  • Ellipsoid Method

What is Affine Arithmetic?

  • Represents a quantity x with an affine form (AAF): where
    • noise symbols
    • central value
    • partial deviations
    • is not fixed - new noise symbols are generated during the computation process.
  • IA -> AA :

Geometry of AA

  • Affine forms that share noise symbols are dependent:
  • The region containing (x, y) is:
    • This region is a centrally symmetric convex polygon called "zonotope".

zonotope

Affine Arithmetic

How to find efficiently?

  • is in general difficult to obtain.
  • Provided that variations are small or nearly linear, we propose using Affine Arithmetic (AA) to solve this problem.
  • Features of AA:
    • Handle correlation of variations by sharing noise symbols.
    • Enabling technology: template and operator overloading features of C++.
    • A C++ package "YALAA" is publicly available.

Affine Arithmetic for Worst Case Analysis

  • An uncertain quantity is represented in an affine form (AAF): where
    • is called noise symbol.
  • Exact results for affine operations (, and )
  • Results of non-affine operations (such as , , ) are approximated in an affine form.
  • AA has been applied to a wide range of applications recently when process variations are considered.

Affine Arithmetic for Optimization

In our robust GP problem:

  • First, represent every elements in in affine forms.
  • For each ellipsoid iteration, is obtained by approximating in an affine form:
  • Then the maximum of is determined by:

img

Performance Specification

ConstraintSpec.Units
Device Widthm
Device Lengthm
Estimated Areaminimizem
Input CM Voltagex
Output Rangex
GaindB
Unity Gain Freq.MHz
Phase Margindegree
Slew RateV/s
CMRRdB
Neg. PSRRdB
PowermW
Noise, FlickernV/Hz

Open-Loop Gain (Example)

  • Open-loop gain can be approximated as a monomial function:

    where and are monomial functions.

  • Corresponding C++ code fragment:

    // Open Loop Gain
    monomial<aaf> OLG = 2*COX/square(LAMBDAN+LAMBDAP)*
         sqrt(KP*KN*W[1]/L[1]*W[6]/L[6]/I1/I6);
    

Results of Design Variables

VariableUnitsGGPLABOurRobust
m44.844.945.4
m3.943.983.8
m2.02.02.0
m2.02.02.1
m1.01.01.0
m1.01.01.0
m1.01.01.0
m1.01.01.0
N/A10.410.312.0
N/A61.961.369.1
pF1.01.01.0
A6.126.195.54

Performances

Performance (units)Spec.Std.Robust
Estimated Area (m)minimize5678.46119.2
Output Range (x )[0.1, 0.9][0.07, 0.92][0.07, 0.92]
Comm Inp Range (x )[0.45, 0.55][0.41, 0.59][0.39, 0.61]
Gain (dB)80[80.0, 81.1]
Unity Gain Freq. (MHz)50[50.0, 53.1]
Phase Margin (degree)86.5[86.1, 86.6]
Slew Rate (V/s)64[66.7, 66.7]
CMRR (dB)77.5[77.5, 78.6]
Neg. PSRR (dB)83.5[83.5, 84.6]
Power (mW)1.5[1.5, 1.5]
Noise, Flicker (nV/Hz)[578, 616]

Conclusions

  • Our ellipsoid method is fast enough for practical analog circuit sizing (take < 1 sec. running on a 3GHz Intel CPU for our example).
  • Our method is reliable, in the sense that the solution, once produced, always satisfies the specification requirement in the worst case.

Comments

  • The marriage of AA (algebra) and Zonotope (geometry) has the potential to provide us with a powerful tool for algorithm design.
  • AA does not solve all problems. E.g. Iterative method does not apply to AA because AA is not in the Banach space (the fixed-point theorem does not hold).
  • AA * and + do not obey the laws of distribution (c.f. floating-point arithmetic)
  • AA can only perform first-order approximations. In other words, it can only be applied to nearly linear variations.
  • In practice, we still need to combine AA with other methods, such as statistical method or the (quasi-) Monte Carlo method.