Vicente Osorio
12/19/2023, 5:31 AMsymbols/
- symbol1.sym (e.g.: SR_latch)
- symbol1.sch
- symbol2.sym (e.g.: nor)
- symbol2.sch
testbenches/
testbench_a/
- testbench1.sch
testbench1.sch
declares symbol1 with the following path: ../../symbols/symbol1.sym
.
This way, when I press the netlist
button, xschem tries to generate the netlist but fails because schematic references symbol1 with path ../../symbols/symbol1.sym
, but symbol2 expands just as symbol2.sym
, ignoring the relative path within symbol1.
Is ignoring relative declarations between schematics an expected behaviour?
As a solution, we thought in declaring the path to the symbols inside the schematic. Is there a way to append to XSCHEM_SEARCH_PATH inside a schematic? Or is it strictly necessary to have a specific xschemrc file?
If creating a new xschemrc file is necessary, it should reference gf180mcuD specific xschemrc file. Is there a way of referencing a xschemrc file inside other xschemrc file?
Hope you can help us with this situation.
Best regards,
Vicente Osorio RivasStefan Schippers
12/19/2023, 9:41 PM#### pdk install root
set PDK_ROOT /path/to/share/pdk
#### process variant
set PDK gf180mcuD
#### location of spice models/libs
set 180MCU_MODELS ${PDK_ROOT}/$PDK/libs.tech/ngspice
#### location of gf180mcu stdcells
set 180MCU_STDCELLS ${PDK_ROOT}/$PDK/libs.ref/gf180mcu_fd_sc_mcu7t5v0/spice
#### reset any previous search path definition
set XSCHEM_LIBRARY_PATH {}
#### xschem base symbols, like labels, pins, ideal devices
append XSCHEM_LIBRARY_PATH :${XSCHEM_SHAREDIR}/xschem_library
#### gf180mcu silicon devices
append XSCHEM_LIBRARY_PATH :$PDK_ROOT/$PDK/libs.tech/xschem
#### your design
append XSCHEM_LIBRARY_PATH /path/to/design
where /path/to/design
is the directory immediately above symbols and testbenches
Then load the testbench and if some symbols are missing replace them
then do a force save (ctrl-Shift-S).
Descend into the sub blocks and do a force save as well. This way xschem removes the ../.. in symbol references, since this kind of referencing is dangerous.
For references about library management read this manual page.Stefan Schippers
12/19/2023, 9:46 PMtestbench1.sch
symbol1.sym
should be referenced as symbols/symbol1.sym
symbol2.sym
inside symbol1.sym
should also be referenced as symbols/symbol2.sym
.
The real path on the filesystem is obtained by taking the /path/to/design
defined in the xschemrc and adding the relative reference:
/path/to/design/symbols/symbol1.sym
similarly for all other components used in the design.aquiles viza
12/19/2023, 11:48 PMStefan Schippers
12/20/2023, 11:24 AMsource /path/to/other/xschemrc
aquiles viza
12/20/2023, 12:59 PM