TUTORIAL: Manage XSCHEM design / symbol libraries
There are 2 ways to describe symbols in xschem,
- first approach: define a XSCHEM_LIBRARY_PATH that is a list of paths to last level directories containing .sym /.sch files
- second approach: define a XSCHEM_LIBRARY_PATH that is a list of paths one level above the directories containing .sym/.sch files
In the first approach a 'npn.sym' symbol placed in a schematic will be saved as 'npn.sym' in the .sch file, when loading back the parent schematic xschem will go through the XSCHEM_LIBRARY_PATH and look for a directory containing npn.sym.
In the second approach the 'npn.sym' will be saved as 'devices/npn.sym' (assuming devices/ is the directory containing this symbol) . This is because the XSCHEM_LIBRARY_PATH is pointing to something like /some/path/xschem_library/ and xschem_library/ contains devices/ (names are just given as examples, any dir name is allowed for xschem_library/ and devices/)
The first approach is preferred by pcb hobbysts, people working on
the second approach is preferred for big designs where a one level
indirection is desired for symbols, so any symbol in xschem is given
as 'libname/symname.sym' instead of just 'symname.sym'
For VLSI / big designs I strongly suggest using the second approach, just as an example i have the following dirs:
~/share/xschem/xschem_library/ containing: devices/ TECHLIB/ ~/xschem_library/ containing: stdcell_stef/ ~/share/doc/xschem/ containing: library_t9/ dram/
then in my xschemrc i have the following:
set XSCHEM_LIBRARY_PATH \