FOSSlab

Chapter 3 of 14 · about 40 min

Schematic and symbol of the op-amp

We create the op-amp: a library, a cell, its schematic with IHP SG13G2 transistors, and its symbol. The circuit is the two-stage Miller op-amp of Allen & Holberg, sized for SG13G2’s 1.2 V core transistors.

The specifications

SpecificationTargetConditions
DC gain A0≥ 55 dBVDD = 1.2 V, CL = 1 pF, IBIAS = 10 µA, input common mode 0.8 V
Unity-gain frequency≥ 15 MHz
Phase margin≥ 55°
Slew rate≥ 10 V/µs
Output offset (follower)within ±5 mV
Power≤ 100 µW

The sizes

DeviceRoleIHP cellW (fingers × width)L
M1, M2input pairsg13_lv_nmos8 µm (4 × 2 µm)1 µm
M3, M4current mirror (load)sg13_lv_pmos8 µm (4 × 2 µm)1 µm
M5tail current sourcesg13_lv_nmos4 µm (2 × 2 µm)2 µm
M8bias (diode)sg13_lv_nmos4 µm (2 × 2 µm)2 µm
M6second stagesg13_lv_pmos80 µm (40 × 2 µm)1 µm
M7second-stage current sourcesg13_lv_nmos20 µm (10 × 2 µm)2 µm
C1 (Cc)Miller compensationcap_cmim24 µm × 24 µm (0.87 pF)
Why (W/L)6 = 10 (W/L)4? M7 carries 5 times M5’s current, i.e. 10 times M4’s. With M6 ten times wider than M4, M6’s gate sits at the same voltage as M4’s drain when both stages are balanced, so there is (to first order) no systematic offset.

1. A library and a cell

  1. Start the Library Manager (fosslab).
  2. File > New library…, name opamp_tut. It appears under Workspace.
  3. Select it and File > New cell… (or Ctrl+N): cell name opamp, tick Schematic, OK. xschem opens on the empty schematic.

2. Draw the schematic

  1. Insert opens xschem’s symbol browser. From the library sg13g2_pr place sg13_lv_nmos.sym and sg13_lv_pmos.sym for M1 to M8, and cap_cmim.sym for C1.
  2. Select each device and press q to set its properties: w (total width), l, ng (number of fingers) from the table, m=1. For C1: w=24.0e-6 l=24.0e-6.
  3. From the library devices: ipin.sym for INP, INN, IBIAS, opin.sym for OUT, iopin.sym for VDD and VSS (set the name with q, property lab). These pins are the cell’s interface.
  4. Connect with wires (w), or with net labels (lab_pin.sym): every label with the same name is the same net. The bulk of the NMOS goes to VSS, of the PMOS to VDD.
  5. Save (Ctrl+s).
The op-amp schematic in xschem
The op-amp in xschem. Each transistor shows its size; the nets are named by labels. The FOSSLab menu (top) links this schematic to its layout, its hierarchy and the verification tools.

3. The symbol

In xschem: FOSSLab > Create/update symbol from pins (or, in the Library Manager, right-click the cell > Create/update symbol from schematic pins). FOSSLab draws a box with the inputs on the left, the output on the right and the supplies on top and bottom. It is an ordinary xschem symbol: open it (Symbol button) and redraw it as the usual op-amp triangle if you like; keep the pins.

The op-amp symbol
The op-amp symbol: + and − inputs on the left, OUT on the right, IBIAS, VDD and VSS on the body.
Library Manager
The Library Manager: library opamp_tut, cell opamp with its views. The dots show which views exist; the ticks, which checks passed.
Stuck? Your teacher can share the reference library (opamp_tut, read only). Right-click any of its cells > Copy cell… puts a copy in your own library.