Ngspice throws an error: unknown subckt, whenever ...
# sky130
a
Ngspice throws an error: unknown subckt, whenever I try to simulate a circuit in Xschem. There doesn't seem to be any problem with the netlist. Could anyone help me out?
b
Did you include the spice files of the FETs you are using in xschem?
a
@Booshan Yes, I have included the
all.spice
file in the
code.sym
block with the schematic
b
I am not sure about the
all.spice
file. I use something like this within the
code.sym
block, when I use
nfet_01v8
and
pfet_01v8
.
Copy code
name=TT_model_sky130
format=@value
only_toplevel=true
value="
*.lib ~/open_pdks/sky130/sky130A/libs.tech/ngspice/sky130.lib.spice tt
.param mc_mm_switch=0
.param mc_pr_switch=0
.include ~/open_pdks/sky130/sky130A/libs.tech/ngspice/corners/tt/nonfet.spice

*model
.include ~/open_pdks/sky130/sky130A/libs.tech/ngspice/all.spice
 
*mosfet
.include ~/open_pdks/sky130/sky130A/libs.ref/sky130_fd_pr/spice/sky130_fd_pr__pfet_01v8__tt.corner.spice
.inclued ~/open_pdks/sky130/sky130A/libs.ref/sky130_fd_pr/spice/sky130_fd_pr__nfet_01v8__tt.corner.spice
*mismatch parameters
.include ~/open_pdks/sky130/sky130A/libs.ref/sky130_fd_pr/spice/sky130_fd_pr__pfet_01v8__mismatch.corner.spice
.include ~/open_pdks/sky130/sky130A/libs.ref/sky130_fd_pr/spice/sky130_fd_pr__nfet_01v8__mismatch.corner.spice"
👍 1
a
Thanks a lot, it worked. Apparently, the all.spice file was corrupted during download in my case.