Lab 2
gm/ID Lookup Tables
Produce the four gm/ID charts of your PDK from the characterization testbench, see which of them move with the process corner, and size a stage from the lookup tables.
Contents
| Lab 2 at a glance | |
|---|---|
| Goal | Produce the four gm/ID charts of your PDK from the characterization testbench, see which of them move with the process corner, and size a stage from the lookup tables. |
| Reproduces | Chapter 6 (Sections 6.3–6.6, Figures 6.3 and 6.5, Worked example 6.1, Table 6.1) |
| Time | 2 hours |
| Files | labs/lab2: gmid_tb, cs_tb (.sch) per PDK; charts.py, size_cs.py |
Hand calculation
Worked example 6.1 asks for a unity-gain frequency of 50 MHz into 2 pF at \(g_m/I_D\) = 15 V⁻¹. Compute \(g_m\) and \(I_D\), then use the gain chart of Figure 6.3(b) to decide the shortest length that gives \(g_m/g_{ds} \ge 30\) in your PDK.
Steps
- The charts. Run
../../sim.sh gmid_tb.sch: four NMOS devices of W = 5 µm (Lmin, 0.5, 1 and 2 µm) sit in parallel between one gate and one drain source, as in Figure 6.5, and the.saveline keeps the operating point of each at every step of the gate sweep. TheNGSPICEblock computes \(g_m/I_D\), \(I_D/W\), \(f_T\) (with the overlap capacitances in \(C_{gg}\)) and \(g_m/g_{ds}\) for each length, prints them at \(g_m/I_D\) = 15, and writes them tosimulations/gmid.txt.python3 ../charts.pyplots the four charts intosimulations/charts.png. - The slow corner. Run
../../corners.py gmid_tb.sch --corners tt,ssand compare the two rows. Which quantities move by more than 5 %? - Size the stage.
python3 ../size_cs.pyfollows the recipe of Section 6.5 with the course’s tables (tools/data/) and prints W, L and the predicted \(V_{GS}\), gain and \(f_u\). - Simulate the stage.
cs_tb.schholds the transistor of step 3 with an ideal 41.9 µA load, 2 pF and the slow DC servo of Section 6.6, which holds the output at \(V_{DD}/2\). Run../../sim.sh cs_tb.schand compare with the prediction.
Checkpoint
Table 18.3. Lab 2 results (NMOS, VDS = VDD/2, tt, 27 °C).
| Quantity | SG13G2 | SKY130 |
|---|---|---|
| At \(g_m/I_D\) = 15, L = 0.5 µm: \(V_{GS}\), \(I_D/W\) | 0.342 V, 3.26 µA/µm | 0.710 V, 2.98 µA/µm |
| \(f_T\) at \(g_m/I_D\) = 15, L = Lmin / 0.5 / 2 µm | 9.75 / 2.18 / 0.179 GHz | 16.2 / 2.36 / 0.196 GHz |
| \(g_m/g_{ds}\) at \(g_m/I_D\) = 15, L = Lmin / 0.5 / 1 / 2 µm | 16.7 / 26.4 / 32.9 / 40.7 | 22.0 / 130 / 175 / 202 |
| ss corner, L = 0.5 µm: \(V_{GS}\), \(I_D/W\), \(f_T\), gain at \(g_m/I_D\) = 15 | 0.391 V, 3.19 µA/µm, 2.17 GHz, 26.1 | 0.731 V, 2.68 µA/µm, 2.12 GHz, 138 |
size_cs.py: W/L, predicted \(V_{GS}\), gain, \(f_u\) |
18.05/0.75 µm (2 fingers), 325 mV, 30.1, 49.9 MHz | 4.62/0.18 µm, 775 mV, 42.9, 49.9 MHz |
cs_tb: \(V_{GS}\), \(g_m\), gain, \(f_u\) |
311 mV, 633 µS, 30.7, 50.0 MHz | 775 mV, 622 µS, 42.4, 49.4 MHz |
Questions
- The ss corner moves \(V_{GS}\) at a given \(g_m/I_D\) by 49 mV in SG13G2, yet \(f_T\) and the gain move by less than 2 % (by up to 10 % in SKY130). Why is a design that is specified in \(g_m/I_D\) robust against corners, and what does still change?
- The tables predicted \(V_{GS}\) = 325 mV for the SG13G2 stage, and the servo found 311 mV. The tables were built with one 5 µm finger; the stage uses two 9 µm fingers. Which effect of the pitfall in Section 6.6 explains the 14 mV?
- The SG13G2 transistor has 14 times the gate capacitance of the SKY130 one. Read both \(C_{gg}\) values from
size_cs.pyand say what this means for the stage that drives it.
Extension
Add four PMOS devices to gmid_tb.sch (upside down, as in Lab 1) and plot their charts. Then rerun size_cs.py with \(g_m/I_D\) = 20 instead of 15 (edit GM_ID): what happens to the current, the width, the gain and \(f_T\), and does the stage still reach 50 MHz in cs_tb?