Question triplicated, because the root cause of th...
# sky130
Question triplicated, because the root cause of this problem is the existence of a competence boundary between caravan, xschem, and sky130 maintainers.
Open PDKs installs all those libraries in /usr/share/pdk . The caravel_user_project_analog github project was made with this in mind, I guess. Any other installation without this path won't work without modifications.
We are getting the same problem with the efabless Open Galaxy virtual machine. The library paths are something else. I really like the Cadence Virtuoso approach of a cds.lib file with the used paths. It can be even set with variables As far as I know, ngspice and xschem doesn't work with variables for paths, so it is a problem.
xschem can work with variables for paths, but ngspice doesn't. But the example analog user project design was made before path variables were implemented in xschem, which is probably the root of the issue.
@Luis Henrique Rodovalho in Xschem schematics never contain absolute paths, any component instance is referenced by a name, it can be just
. It is up to the project manager to set up a consistent structure for the project. Xschem initialization file (xschemrc) defines a list of paths:
set XSCHEM_LIBRARY_PATH /path/a:/path/b:/path/c
if schematic references a component as
the actual location in the filesystem is found by searching the XSCHEM_LIBRARY_PATH, so one of:
, or
, or
The first succesfull match is taken. If your
is upgraded, say to
, you can use a unix symlink
and have your design automatically use the new library. Or you can search and replace all occurrences of cmoslib/ to cmoslib2/ in xschem schematics. (xschem files are just plain ascii, you don't need fancy tools to rename referenced libraries). Again this is a project management decision. Also note that since xschemrc is a tcl file you can use variables:
set XSCHEM_LIBRARY_PATH ${PDK_ROOT}/xschem/:.....
to use a tcl global variable, or
set XSCHEM_LIBRARY_PATH $env(PDK_ROOT)/xschem/:.....
to use a shell variable.