Stefan Schippers
12/15/2024, 9:38 AMappend 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.Leo Moser
12/15/2024, 12:56 PMPDK_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?Stefan Schippers
12/15/2024, 1:02 PMStefan Schippers
12/15/2024, 1:15 PMsource .../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).Leo Moser
12/16/2024, 8:20 AMPDK_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)