<@U01QTMG2K8R>  Hi Luis, you mentioned that to spe...
# ieee-sscs-dc-21q3
e
@User  Hi Luis, you mentioned that to speed up xschem+ngspice simulation a custom .lib call was helpful. How do you go about it? Do you comment not needed corners?
l
The skywater PDK comes with testbenches to every primitive device for basic characterization. The standard nfet device testbench can be found here. https://github.com/google/skywater-pdk-libs-sky130_fd_pr/blob/f62031a1be9aefe902d6[…]esd_nfet_01v8/tests/sky130_fd_pr__esd_nfet_01v8__nfet_vth.spice If you clone the repo, you should be able to run this simulation directly with ngspice without xschem. The problem is that it takes a lot time to run the simulation, and it is just a single transistor!
The problem is this line here * Include SkyWater sky130 device models .lib "../../../models/sky130.lib.spice" tt It loads all devices' models, including all kinds of fets, capacitors, resistors. Everything. The actual simulation is very fast. So, you just need to comment this and include some lines like these:
Copy code
.include /usr/share/pdk/sky130A/libs.ref/spi/sky130_fd_pr/sky130_fd_pr__nfet_01v8_lvt__tt.corner.spice
.include /usr/share/pdk/sky130A/libs.ref/spi/sky130_fd_pr/sky130_fd_pr__nfet_01v8_lvt__mismatch.corner.spice

.include /usr/share/pdk/sky130A/libs.tech/ngspice/all.spice

.param mc_mm_switch=0
This example of code is for the LVT nfet and for my installation, which used Open PDKs. Open PDKs creates these folders sky130A/libs.ref/ . Your installation may use a different path.
e
Thanks! I started commenting all libaries that were not tt on the sky130.lib.spice, but your suggestion turns out to be much faster!
l
@Omiya Hassan Take a look at this thread. It explains which files you will need to include in the xschem testbench so they can work. In the efabless Open Galaxy virtual machine, they are located at /ef/tech/SW.2/sky130A folder.
👍 1