I am try to simulate logic gate (sky130_stdcells/n...
# xschem
r
I am try to simulate logic gate (sky130_stdcells/nand2_1.sym), I am able to run the testbench only using absolute path of the model and not the first two path.
Copy code
name=TT_MODELS 
only_toplevel=true
corner=tt

value="
**.lib \\$::SKYWATER_MODELS\\/sky130.lib.spice tt
**.include $::SKYWATER_STDCELLS/sky130_fd_sc_hd.spice
.lib /usr/local/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice tt
.include /usr/local/share/pdk/sky130A/libs.ref/sky130_fd_sc_hd/spice/sky130_fd_sc_hd.spice
For each schematic i have a standard
xschemrc
file, in analog testbench i just need to set corner like:
Copy code
name=CORNER only_toplevel=false corner=tt
but here somethings is going wrong. Where is the mistake?
t
How does your
xschemrc
define
SKYWATER_MODELS
? What do you mean by a "standard"
xschemrc
file? The one in the PDK? My
xschemrc
file, which comes from the PDK, has:
Copy code
set SKYWATER_MODELS ${PDK_ROOT}/${PDK}/libs.tech/ngspice
  set SKYWATER_STDCELLS ${PDK_ROOT}/${PDK}/libs.ref/sky130_fd_sc_hd/spice
  puts stderr "open_pdks installation: using $PDK_ROOT"
  puts stderr "SKYWATER_MODELS: $SKYWATER_MODELS"
  puts stderr "SKYWATER_STDCELLS: $SKYWATER_STDCELLS"
r
Yes... here the file
t
That seems reasonable. Do you happen to have an interfering environment variable
PDK_ROOT
and/or
PDK
?
r
no, i don't have
t
So what does the output netlist from xschem look like? It should be a direct replacement of
SKYWATER_MODELS
. The one thing I do see in your original post is that the dollar sign and the slash are both backslash-escaped in your original source file's
.lib
line, but not in the
.include
line. I'm not sure which one of those is right, but I don't think they can both be right.
r
I was checking today and when I open xschem I get this warning. I think this is the error, how can i resolve it?
here the netlist
t
The problem is not in the xschem output, which looks perfectly fine. However, neither one of the variables in the .sch file is being substituted:
Copy code
*.lib \$::SKYWATER_MODELS\/sky130.lib.spice tt
*.include $::SKYWATER_STDCELLS/sky130_fd_sc_hd.spice
One of those I suspect is due to the backslash-escape. The other may be due to a setting in xschem.
r
i tried to rewrite the path, but i get this issue. with or without backslack. also loading only one for times
t
That's still the same problem; the variable from the schematic is not being substituted by xschem when writing the netlist. But you keep showing .spice files that appear to be hand-edited. So I can't tell exactly what's coming from xschem.
r
@Stefan Schippers any idea on this annoing issue?
s
You have deleted this line in the attributes:
format="tcleval( @value )"
that does the substitution of TCL variables. so above the
value="...."
add the format line.
👍 1
There are example xschem schematics in the open_pdks installation. Best thing is to copy paste the needed elements from the test schematics.