Matt Venn
02/19/2024, 9:13 PMMitch Bailey
02/19/2024, 9:26 PMsky130_fd_pr__res_high_po_0p35 L=1 multi=1 m=1
Tim Edwards
02/19/2024, 10:11 PMres_high_po
without the width suffix? There should only be five resistor types available, in each of the five available widths.Tim Edwards
02/19/2024, 10:12 PMMitch Bailey
02/19/2024, 11:01 PM$PDK_ROOT/$PDK/libs.tech/xschem/sky130_fd_pr/res_high_po.sym
in addition to
$PDK_ROOT/$PDK/libs.tech/xschem/sky130_fd_pr/res_high_po_0p35.sym
$PDK_ROOT/$PDK/libs.tech/xschem/sky130_fd_pr/res_high_po_0p69.sym
$PDK_ROOT/$PDK/libs.tech/xschem/sky130_fd_pr/res_high_po_1p41.sym
$PDK_ROOT/$PDK/libs.tech/xschem/sky130_fd_pr/res_high_po_2p85.sym
$PDK_ROOT/$PDK/libs.tech/xschem/sky130_fd_pr/res_high_po_5p73.sym
Tim Edwards
02/19/2024, 11:21 PMMatt Venn
02/20/2024, 9:12 AMMatt Venn
02/20/2024, 9:12 AMMatt Venn
02/20/2024, 9:14 AMMatt Venn
02/20/2024, 9:17 AMMatt Venn
02/20/2024, 9:17 AMMatt Venn
02/20/2024, 9:18 AMError: unknown subckt: xr20 net1 b0 net8 sky130_fd_pr__res_high_po_0p35 l=0.35 mult=1 m=1
Simulation interrupted due to error!
Matt Venn
02/20/2024, 9:18 AMMatt Venn
02/20/2024, 9:48 AMMitch Bailey
02/20/2024, 11:23 AM0p35
in the model name refers to the width which is fixed for the model. The length is variable and specified by the l
parameter.
Looks like you originally selected the generic model, which Tim says does not have a device generator in magic.
Not sure why the simulation’s failing. You’ve included the model file, right?Matt Venn
02/20/2024, 11:51 AMMitch Bailey
02/20/2024, 12:02 PMStefan Schippers
02/20/2024, 12:19 PM.lib /path/to/pdk/sky130A/libs.tech/combined/sky130.lib.spice tt
and a .spiceinit file in the directory where ngspice is running containing the following lines:
set ngbehavior=hsa
set ng_nomodcheck
I usually place a code.sym element with the following attribute:Stefan Schippers
02/20/2024, 12:19 PMMatt Venn
02/20/2024, 12:26 PMMatt Venn
02/20/2024, 12:27 PMMatt Venn
02/20/2024, 12:29 PMStefan Schippers
02/20/2024, 12:52 PMPDK_ROOT
and PDK
are defined.
If they are not defined some basic search is done to find a pdk in /usr/share/pdk
/usr/local/share/pdk
or ~/share/pdk
.
For sky130 if no PDK
process variant env var is defined sky130A
is assumed.
If a pdk is found it is used and a tcl variable PDK_ROOT
(/path/to/share/pdk) and PDK
(sky130A) is set accordingly (as well as SKYWATER_MODELS
= ${PDK_ROOT}/${PDK}/libs.tech/combined
).
If your PDK installation is not in one of the above standard places just set PDK_ROOT
and `PDK`:
export PDK_ROOT=/path/to/share/pdk
export PDK=sky130A
before launching xschem.
After starting xschem tou can test if SKYWATER_MODELS
was set correctly:
puts $SKYWATER_MODELS
Also ensure in the code.sym
the following is set:
format="tcleval( @value )"
value=".lib $::SKYWATER_MODELS/sky130.lib.spice tt"
The first line ensures the second line will be passed to tcl for variable substitution.
Of course putting the actual path instead of a variable does not require this tcleval() and you can remove the format= line altogether.
fore code.sym normally the value
attribute will be copied verbatim to the netlist. However ngspice does not underdstand variables, so xschem does the substitution before generating the netlist (the value
attribute will be passed to tcl and the resulting calculated path will be written in the netlist).
This manual page explains the open_pdks integration.Matt Venn
02/20/2024, 1:03 PMMatt Venn
02/20/2024, 1:05 PM