<@U016EM8L91B> in this your <commit> the following...
# sky130
s
@Tim Edwards in this your commit the following line:
append XSCHEM_LIBRARY_PATH :${PDK_ROOT}/${PDK}/libs.tech/xschem
is removed from xschemrc, since it is said that this already present line:
append XSCHEM_LIBRARY_PATH :[file dirname [info script]]
does the job, However if a symlink to the
:${PDK_ROOT}/${PDK}/libs.tech/xschem/xschemrc
is placed in a project directory the
[info script]
returns the location of the link and not the location of the target script. I think this is ok since it adds the project directory to the search paths. I have accepted a PR from a user to add the line:
append XSCHEM_LIBRARY_PATH :${PDK_ROOT}/${PDK}/libs.tech/xschem
at the bottom of the xschemrc in xschem_sky130 repo, so the xschem sky130 device symbols will be found.
l
Hi @Stefan Schippers, the change was made to prevent the PDK path from being listed twice in the "Choose symbol" window. I don't think one should create a symlink to the PDK's xschemrc file. That is not portable at all on another system. Instead, it would be better to create an xschemrc file in the project directory that sources the PDK's xschemrc file. In fact, that's what we are doing for all analog projects at Efabless :) This way the project xschemrc can use
PDK_ROOT
and
PDK
if set, and if not, try to find the PKD's installation directory. Here's our template repository we recommend to use: https://github.com/efabless/sky130_ef_ip__template/blob/main/xschem/xschemrc Could you please suggest this approach to the user and, if applicable, revert the patch?
s
OK, thank you for explaining the preferred approach.
👍 1
One question. Why adding a:
source .../share/pdk/sky130A/libs.tech/xschem/xschemrc
in project dir xschemrc is more portable than a:
ln -s  .../share/pdk/sky130A/libs.tech/xschem/xschemrc
? one case I see when this is more portable is if env vars are used: PDK_ROOT and PDK, so the source line becomes:
source $env(PDK_ROOT)/$env(PDK)/libs.tech/xschem/xschemrc
is that the reason? (in addition to allowing local custom configurations in project xschemrc, which is also a good reason to use the
source
line).
l
Yes exactly 👍 In the xschemrc example I sent above,
PDK_ROOT
and
PDK
are used to source the PDK's xschemrc file. This xschemrc actually does a few more things: - It adds the project directory to
XSCHEM_LIBRARY_PATH
to prevent absolute paths in the schematic - It recursively sources dependencies under the
ip/
folder (if they exist)