Tim Edwards | 367711e | 2021-01-27 10:35:12 -0500 | [diff] [blame] | 1 | Attempting to get a valid IRSIM .prm file for the sky130 process |
| 2 | Specifically for the sky130_fd_sc_hd library, but should work with all of |
| 3 | them except for sky130_fd_sc_hvl. |
| 4 | ------------------------------------------------------------------------ |
| 5 | Following directions from the irsim web page. . . |
| 6 | |
| 7 | Get the "getres" script from ~/gitsrc/irsim/lib/calibrate_spice3/ |
| 8 | Change "spice" (with path) to "ngspice" (with path) |
| 9 | Added string.h, stdlib.h, and malloc.h to findr.c to make it compile, |
| 10 | and compiled it. |
| 11 | |
| 12 | Get characteristics from SPICE, cell sky130_fd_sc_hd__nand2_1 |
| 13 | |
| 14 | P device (sky130_fd_pr__pfet_01v8_lvt): 1.00um wide, 0.15um long |
| 15 | N device (sky130_fd_pr__nfet_01v8): 0.65um wide, 0.15um long |
| 16 | |
| 17 | Using 50fF for loading cap (essentially irrelevant) |
| 18 | |
| 19 | Writing these values into "config.txt" (but not using). |
| 20 | |
| 21 | Copy "ckt.spi" to local directory |
| 22 | Substitute values by hand (obvious) |
| 23 | Use ".lib" to get models (sky130.lib.spice) with corner "tt" |
| 24 | Convert "M" to "X" on devices. |
| 25 | |
| 26 | Changed voltage source on ground to 0.01 ohm resistor because ngspice |
| 27 | doesn't like shorted voltage sources. |
| 28 | |
| 29 | Added ".save all". |
| 30 | |
| 31 | Spice models are in |
| 32 | |
| 33 | ~/projects/efabless/tech/SW/sky130A/libs.tech/ngspice/sky130.lib.spice |
| 34 | |
| 35 | Note that the raw file reader expects an ASCII raw file, which in ngspice |
| 36 | requires in ".spiceinit": |
| 37 | |
| 38 | set filetype=ascii |
| 39 | |
| 40 | Running: |
| 41 | |
| 42 | ngspice -b -r spi.out ckt.spi |
| 43 | |
| 44 | Do *not* use "-n" because that suppresses the reading of the .spiceinit file. |
| 45 | |
| 46 | Run: |
| 47 | |
| 48 | ./findr -c 100 -n 0.8,0.18 -p 1.0,0.18 spi.out |& tee resists |
| 49 | |
| 50 | Had to change "findr.c" to replace "vdd" with "v(vdd)" and the same for all |
| 51 | the vouts. |
| 52 | |
| 53 | Success! |
| 54 | |
| 55 | Now: Redo this at all nine corners for low-typ-high voltage and low-typ-high temp. |
| 56 | |
| 57 | Add header. sky130 gate thickness, from sky130_fd_pr__nfet_01v8 model is 4.15E-9 m, |
| 58 | so: |
| 59 | Cox = Eox / Tox = 8.854E-12 F/m * 3.9 / 4.15E-9 = 8.32E-3 F/m^2 = pF/um^2 |
| 60 | |
| 61 | The other cap values need to be looked up and corrected. . . |