Add two simple Skywater PDK examples, inverter and ISCAS85 C7552

This commit is contained in:
Holger Vogt 2025-02-05 16:09:39 +01:00
parent 0c4347bf19
commit 6bcedb6463
3 changed files with 89306 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,30 @@
* simple examples using Skywater PDK
PDK sources:
https://github.com/google/skywater-pdk
http://opencircuitdesign.com/open_pdks/
Examples are: a simple inverter, and a benchmark circuit ISCAS85 C7552 with ca. 15k transistors.
These examples serve as low level starters with given ngspice netlist. If you are to design a circuit,
you will be better off with a GUI atop ngspice like XSCHEM, see
http://repo.hu/projects/xschem/xschem_man/tutorial_run_simulation.html and many other web sites and videos.
How to run the circuits in ngspice:
Edit the input files for correcting the path to the Skywater library, as it is user and OS specific.
Create a file .spiceinit in your HOME directory (or in this project directory).
It should contain the following statements:
set num_threads=8 ; number of physical core in your machine
set ngbehavior=hsa ; set compatibility for reading PDK libs
set skywaterpdk ; skip some checks for faster lib loading
set ng_nomodcheck ; trust the models, don't check the model parameters
unset interactive ; run scripts without interruption (default)
set nginfo ; some more info
option KLU ; select KLU solver over Sparse 1.3 solver
Run the simulation by calling
ngspice skywater_inverter.net
A plotting alternative in addition to the internal graphics is gnuplot.

View File

@ -0,0 +1,34 @@
* SkyWater PDK
* simple inverter
* Path to the PDK, to be set by you, the user
*.include "D:\Spice_general\skywater-pdk\libraries\sky130_fd_pr\latest\models\corners/tt.spice"
*.lib "D:\Spice_general\skywater-pdk\libraries\sky130_fd_pr\latest\models\sky130.lib.spice" tt
.lib D:\Spice_general\open_pdks\sky130\sky130A\libs.tech\combined\sky130.lib.spice tt
* the voltage sources:
Vdd vdd gnd DC 1.8
V1 in gnd pulse(0 1.8 0p 200p 100p 1n 2n)
* calling the inverter subcircuit
Xnot1 in vdd gnd out not1
.subckt not1 a vdd vss z
xm01 z a vdd vdd sky130_fd_pr__pfet_01v8_hvt l=0.15 w=0.99 as=0.26235 ad=0.26235 ps=2.51 pd=2.51
xm02 z a vss vss sky130_fd_pr__nfet_01v8 l=0.15 w=0.495 as=0.131175 ad=0.131175 ps=1.52 pd=1.52
c3 a vss 0.384f
c2 z vss 0.576f
.ends
* simulation command:
.tran 1ps 10ns 0 10p
.control
run
rusage time
set xbrushwidth=3
plot in out
*gnuplot interm in out
.endc
.end