Installing the SkyWater 130nm Design Kit: Difference between revisions
(Created page with "== Prerequisites == Install Magic == Installing the PDK == == Using the PDK SPICE Models ==") |
No edit summary |
||
(15 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
We will install the SkyWater 130nm design kit via the [http://opencircuitdesign.com/open_pdks/ Open_PDKs] scripts. This allows us to install (1) the Google/SkyWater SKY130 PDK from github and compile the timing files, (2) 3rd-party alphanumeric layout libraries, and (3) 3rd-party libraries for the [https://github.com/StefanSchippers/xschem xschem] schematic entry and schematic capture tool. | |||
== Prerequisites == | == Prerequisites == | ||
You need to install <code>python3</code>. If this is not installed in your system, you can download and install the [https://www.anaconda.com/ Anaconda] environment. | |||
To install the files needed by the [http://opencircuitdesign.com/magic/ Magic] layout tool, Magic must be installed. Download Magic [https://github.com/RTimothyEdwards/magic here] or via [https://git-scm.com/downloads git]: | |||
<syntaxhighlight lang="text"> | |||
git clone https://github.com/RTimothyEdwards/magic | |||
</syntaxhighlight> | |||
Then follow the compile and install instructions. | |||
== Installing the PDK == | == Installing the PDK == | ||
After installing Magic, we can now download the PDK via [https://git-scm.com/downloads git]: | |||
<syntaxhighlight lang="text"> | |||
git clone git://opencircuitdesign.com/open_pdks | |||
</syntaxhighlight> | |||
See the full installation instructions at the [http://opencircuitdesign.com/open_pdks/ Open_PDKs website]. | |||
== Using the PDK SPICE Models == | == Using the PDK SPICE Models == | ||
Once you have installed the PDK, we can now use [http://ngspice.sourceforge.net/ ngspice] to plot the transistor transfer and output characteristics. Let us use this [https://github.com/louisalarcon/ee220/blob/master/cidr/skywater-mos-test.sp SPICE deck]: | |||
<syntaxhighlight lang="text" line> | |||
* SKyWater 130nm Test Simulation | |||
.option scale=1e-6 | |||
.lib /usr/local/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice tt | |||
xm01 d1 g1 0 0 sky130_fd_pr__nfet_01v8 l=0.15 w=10 | |||
vds1 d1 0 1.8 | |||
vgs1 g1 0 1.8 | |||
xm02 d2 g2 vdd vdd sky130_fd_pr__pfet_01v8 l=0.15 w=25 | |||
eds2 vdd d2 d1 0 1 | |||
egs2 vdd g2 g1 0 1 | |||
vsup vdd 0 1.8 | |||
.control | |||
* Transfer Characteristics | |||
dc vgs1 0 1.8 0.01 | |||
plot (-i(vds1)) (-i(eds2)) | |||
* Output Characteristics | |||
dc vds1 0 1.8 0.01 vgs1 0.2 1.8 0.2 | |||
plot (-i(vds1)) (-i(eds2)) | |||
.endc | |||
.end | |||
</syntaxhighlight> | |||
Note that by default, the SkyWater 130nm design kit scales the width and length by <math>1\times10^{-6}</math>, so the values entered are in microns. This is reiterated by the directive <code>.option scale=1e-6</code> in line 3. | |||
In Linux systems, by default, the installer places the SPICE models in <code>/usr/local/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice</code>, and is called as a library in line 4. The <code>tt</code> directive indicates that we are using the ''typical'' corner. | |||
When instantiating transistors, we use the '''x''' prefix, e.g. ''xm01'' and ''xm02'' since the model presents the transistors as subcircuits instead of native MOS transistors (usually instantiated using the ''m'' prefix). Line 7 instantiates the NMOS transistor <code>sky130_fd_pr__nfet_01v8</code> with a length of <math>0.15\mathrm{\mu m}</math> and width of <math>10\mathrm{\mu m}</math>, while line 12 instantiates the PMOS transistor <code>sky130_fd_pr__pfet_01v8</code> with a length of <math>0.15\mathrm{\mu m}</math> and width of <math>25\mathrm{\mu m}</math>. | |||
We can then run NGSPICE from the command line: | |||
<syntaxhighlight lang="text"> | |||
$ ngspice skywater-mos-test.sp | |||
</syntaxhighlight> | |||
We then get the following: | |||
<syntaxhighlight lang="text"> | |||
***** | |||
** ngspice-37 : Circuit level simulation program | |||
** The U. C. Berkeley CAD Group | |||
** Copyright 1985-1994, Regents of the University of California. | |||
** Copyright 2001-2022, The ngspice team. | |||
** Please get your ngspice manual from http://ngspice.sourceforge.net/docs.html | |||
** Please file your bug-reports at http://ngspice.sourceforge.net/bugrep.html | |||
** Creation Date: Sun Jul 3 06:59:04 UTC 2022 | |||
****** | |||
Note: Compatibility modes selected: hs a | |||
Warning: m=xx on .subckt line will override multiplier m hierarchy! | |||
Circuit: * skywater 130nm test simulation | |||
option SCALE: Scale is set to 1e-06 for instance and model parameters | |||
option SCALE: Scale is set to 1e-06 for instance and model parameters | |||
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 | |||
Reference value : 0.00000e+00 | |||
No. of Data Rows : 181 | |||
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 | |||
No. of Data Rows : 1629 | |||
ngspice 190 -> | |||
</syntaxhighlight> | |||
Two plots are then generated: (1) the MOS transfer characteristics in Fig. 1, and (2) the MOS output characteristics in Fig. 2. | |||
{| | |||
| [[File:Sky130-MOS-transfer-char.png|thumb|400px|Figure 1: MOS transfer characteristics for the NMOS (red) and PMOS (blue).]] | |||
| [[File:Sky130-MOS-output-char.png|thumb|400px|Figure 2: MOS output characteristics for the NMOS (red) and PMOS (blue).]] | |||
|- | |||
|} |
Latest revision as of 07:18, 21 July 2022
We will install the SkyWater 130nm design kit via the Open_PDKs scripts. This allows us to install (1) the Google/SkyWater SKY130 PDK from github and compile the timing files, (2) 3rd-party alphanumeric layout libraries, and (3) 3rd-party libraries for the xschem schematic entry and schematic capture tool.
Prerequisites
You need to install python3
. If this is not installed in your system, you can download and install the Anaconda environment.
To install the files needed by the Magic layout tool, Magic must be installed. Download Magic here or via git:
git clone https://github.com/RTimothyEdwards/magic
Then follow the compile and install instructions.
Installing the PDK
After installing Magic, we can now download the PDK via git:
git clone git://opencircuitdesign.com/open_pdks
See the full installation instructions at the Open_PDKs website.
Using the PDK SPICE Models
Once you have installed the PDK, we can now use ngspice to plot the transistor transfer and output characteristics. Let us use this SPICE deck:
1 * SKyWater 130nm Test Simulation
2
3 .option scale=1e-6
4 .lib /usr/local/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice tt
5
6
7 xm01 d1 g1 0 0 sky130_fd_pr__nfet_01v8 l=0.15 w=10
8
9 vds1 d1 0 1.8
10 vgs1 g1 0 1.8
11
12 xm02 d2 g2 vdd vdd sky130_fd_pr__pfet_01v8 l=0.15 w=25
13 eds2 vdd d2 d1 0 1
14 egs2 vdd g2 g1 0 1
15
16 vsup vdd 0 1.8
17
18 .control
19 * Transfer Characteristics
20 dc vgs1 0 1.8 0.01
21 plot (-i(vds1)) (-i(eds2))
22
23 * Output Characteristics
24 dc vds1 0 1.8 0.01 vgs1 0.2 1.8 0.2
25 plot (-i(vds1)) (-i(eds2))
26
27 .endc
28
29 .end
Note that by default, the SkyWater 130nm design kit scales the width and length by , so the values entered are in microns. This is reiterated by the directive .option scale=1e-6
in line 3.
In Linux systems, by default, the installer places the SPICE models in /usr/local/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice
, and is called as a library in line 4. The tt
directive indicates that we are using the typical corner.
When instantiating transistors, we use the x prefix, e.g. xm01 and xm02 since the model presents the transistors as subcircuits instead of native MOS transistors (usually instantiated using the m prefix). Line 7 instantiates the NMOS transistor sky130_fd_pr__nfet_01v8
with a length of and width of , while line 12 instantiates the PMOS transistor sky130_fd_pr__pfet_01v8
with a length of and width of .
We can then run NGSPICE from the command line:
$ ngspice skywater-mos-test.sp
We then get the following:
*****
** ngspice-37 : Circuit level simulation program
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University of California.
** Copyright 2001-2022, The ngspice team.
** Please get your ngspice manual from http://ngspice.sourceforge.net/docs.html
** Please file your bug-reports at http://ngspice.sourceforge.net/bugrep.html
** Creation Date: Sun Jul 3 06:59:04 UTC 2022
******
Note: Compatibility modes selected: hs a
Warning: m=xx on .subckt line will override multiplier m hierarchy!
Circuit: * skywater 130nm test simulation
option SCALE: Scale is set to 1e-06 for instance and model parameters
option SCALE: Scale is set to 1e-06 for instance and model parameters
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
Reference value : 0.00000e+00
No. of Data Rows : 181
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
No. of Data Rows : 1629
ngspice 190 ->
Two plots are then generated: (1) the MOS transfer characteristics in Fig. 1, and (2) the MOS output characteristics in Fig. 2.