Hi, I have installed open_pdks but when I launch xschem I get missing symbols (see attached). I have...
d
Hi, I have installed open_pdks but when I launch xschem I get missing symbols (see attached). I have run the open_pdks install with and without --enable-xschem-sky130 but issue is still there. What step could I be doing wrong?
r
I guess the first step would be to check whether you have symbols at the path where the xschem is searching for them ?
d
I thought I had checked that, and I thought I had seen some symbols in that folder, but now looking at it again, I just realized that I am actually missing the entire "devices" folder inside /usr/local/share/pdk/sky130A/libs.tech/xschem/sky130_tests/, i.e. I do have some .sym files inside /usr/local/share/pdk/sky130A/libs.tech/xschem/sky130_tests/ but I don't have the /devices folder inside that... What step is resonsible of creating that /devices folder? (In my case it should be located in /usr/local/share/pdk/sky130A/libs.tech/xschem/sky130_tests/devices)
image.png
r
what you are probably missing is the xschem's devices library. Though it should be there if xschem installed correctly. devices library comes with xschem not from open_pdk. you may want to check your installation of xschem
d
It appears that I do have a /xschem_library inside /usr/local/share/xschem/xschem_library with all those .sym files.
r
for a quick fix you can paste that
devices
folder at
/usr/local/share/pdk/sky130A/libs.tech/xschem/sky130_tests
and try to run the xschem again
d
That fixes it yeah. However it seems to me that I shouldn't have to do this manual copying, so something in the process must have gone wrong. Not sure if this is a Xschem problem or an open_pdks problem
s
Create a directory , then copy the
/usr/local/share/pdk/sky130A/libs.tech/xschem/xschemrc
file in it, then from this directory start xschem, also remove the devices/ directory you copied into sky130_tests, since this would not get the updates.
d
I have the xschemrc file as a symbolic link, rather than as a copy of the file. I did that following @User instructions in a VSDIAT sky130 workshop. Is the symbolic link approach not valid?
image.png
In fact, I am running into a 2nd issue which is when I click on "Simulate" button on Xschem, after having created the Netlist, Simulate doesn't do anything. I wonder if both issues could be related to the symbolic links, since I have a symbolic link for xschemrc and also for .spiceinit. Maybe I should not be doing those 2 symbolic links, as those could be causing the 2 issues?
s
symlink is ok
before starting simulation try to see if typing 'ngspice' in a terminal fires the simulator. If it does not you must provide the full path to xschem. For this go to 'Simulation-> Configure simulators and tols and replace 'ngspice' with the full path
for the xschemrc (file or symlink) check the XSCHEM_LIBRARY_PATH section it should look like this:
Copy code
set XSCHEM_LIBRARY_PATH {}
append XSCHEM_LIBRARY_PATH ${XSCHEM_SHAREDIR}/xschem_library
append XSCHEM_LIBRARY_PATH :$env(PWD)
append XSCHEM_LIBRARY_PATH :/usr/local/share/pdk/sky130A/libs.tech/xschem
append XSCHEM_LIBRARY_PATH :$USER_CONF_DIR/xschem_library
d
typing ngspice in a terminal does fire up the simulator. and these are my Simulator settings in Xscheme atm
And my XSCHEME_LIBRARY_PATH section is like this: ########################################################################### #### XSCHEM SYSTEM-WIDE DESIGN LIBRARY PATHS: XSCHEM_LIBRARY_PATH ########################################################################### #### If unset xschem starts with XSCHEM_LIBRARY_PATH set to the default, typically: # /home/schippes/.xschem/xschem_library # /home/schippes/share/xschem/xschem_library/devices # /home/schippes/share/doc/xschem/examples # /home/schippes/share/doc/xschem/ngspice # /home/schippes/share/doc/xschem/logic # /home/schippes/share/doc/xschem/xschem_simulator # /home/schippes/share/doc/xschem/binto7seg # /home/schippes/share/doc/xschem/pcb # /home/schippes/share/doc/xschem/rom8k #### Flush any previous definition set XSCHEM_LIBRARY_PATH {} #### include devices/*.sym append XSCHEM_LIBRARY_PATH ${XSCHEM_SHAREDIR}/xschem_library #### include skywater libraries. Here i use [pwd]. This works if i start xschem from here. append XSCHEM_LIBRARY_PATH :$env(PWD) append XSCHEM_LIBRARY_PATH :/usr/local/share/pdk/sky130A/libs.tech/xschem # append XSCHEM_LIBRARY_PATH :/mnt/sda7/home/schippes/pdks/sky130A/libs.tech/xschem #### add ~/.xschem/xschem_library (USER_CONF_DIR is normally ~/.xschem) append XSCHEM_LIBRARY_PATH :$USER_CONF_DIR/xschem_library
s
ok, also ensure you have 'xterm' on the system. ngspice is run in a terminal by xschem so you can send commands to it among other things. ensure you have xterm or -->
sudo apt-get install xterm
You can configure the
editor
variable in xschemrc to use another editor like gnome-terminal
d
Ok I didn't have 'xterm'. I just added it with
sudo apt-get install xterm
and that fixed the ngspice firing up issue.
s
start xschem from a terminal (in the dir with the xschemrc symlink) and in the xschem command prompt type:
puts $XSCHEM_SHAREDIR
, ensure this directory exists on the system
and also under this directory
xschem_library/devices
d
% puts $XSCHEM_SHAREDIR /usr/local/share/xschem and that folder is in the system
s
ok you can d a final check into xschem prompt:
foreach i $pathlist {puts $i}
it will print all the search directories, one per line, verify all these are on the system and you have read access (as a regular user) to them
d
% foreach i $pathlist {puts $i} /usr/local/share/xschem/xschem_library /home/darunix/VSDIAT_Courses/PV_Sky130/inverter/xschem /usr/local/share/pdk/sky130A/libs.tech/xschem All those 3 directories are on the system and I think I have read access
Copy code
darunix@darunix-VirtualBox:~/VSDIAT_Courses/PV_Sky130/inverter/xschem$ ll /usr/local/share/xschem/xschem_library
total 420
drwxr-xr-x 2 root root 4096 ene 18 19:00 ./
drwxr-xr-x 5 root root 4096 ene 18 19:00 ../
-rw-rw-r-- 1 root root  479 ene 18 19:00 adc_bridge.sym
-rw-rw-r-- 1 root root  493 ene 18 19:00 ammeter.sym
-rw-rw-r-- 1 root root  286 ene 18 19:00 arch_declarations.sym
-rw-rw-r-- 1 root root  371 ene 18 19:00 architecture.sym
-rw-rw-r-- 1 root root  500 ene 18 19:00 asrc.sym
-rw-rw-r-- 1 root root  463 ene 18 19:00 assign.sym
-rw-rw-r-- 1 root root  302 ene 18 19:00 attributes.sym
-rw-rw-r-- 1 root root  568 ene 18 19:00 bsource.sym
-rw-rw-r-- 1 root root  194 ene 18 19:00 bus_connect_nolab.sym
-rw-rw-r-- 1 root root  231 ene 18 19:00 bus_connect.sym
-rw-rw-r-- 1 root root  865 ene 18 19:00 capa-2.sym
-rw-rw-r-- 1 root root  839 ene 18 19:00 capa.sym
-rw-rw-r-- 1 root root  599 ene 18 19:00 cccs.sym
-rw-rw-r-- 1 root root  563 ene 18 19:00 ccvs.sym
-rw-rw-r-- 1 root root  260 ene 18 19:00 code_shown.sym
-rw-rw-r-- 1 root root  526 ene 18 19:00 code.sym
-rw-rw-r-- 1 root root 3346 ene 18 19:00 conn_10x2.sym
-rw-rw-r-- 1 root root 2403 ene 18 19:00 conn_14x1.sym
-rw-rw-r-- 1 root root  815 ene 18 19:00 conn_3x1.sym
-rw-rw-r-- 1 root root  841 ene 18 19:00 conn_4x1.sym
-rw-rw-r-- 1 root root 1256 ene 18 19:00 conn_6x1.sym
-rw-rw-r-- 1 root root 1542 ene 18 19:00 conn_8x1.sym
-rw-rw-r-- 1 root root  416 ene 18 19:00 connector.sym
-rw-rw-r-- 1 root root  542 ene 18 19:00 connect.sym
-rw-rw-r-- 1 root root 1073 ene 18 19:00 crystal-2.sym
-rw-rw-r-- 1 root root  836 ene 18 19:00 crystal.sym
-rw-rw-r-- 1 root root  479 ene 18 19:00 dac_bridge.sym
-rw-rw-r-- 1 root root  556 ene 18 19:00 delay_line.sym
-rw-rw-r-- 1 root root  426 ene 18 19:00 delay.sym
-rw-rw-r-- 1 root root  850 ene 18 19:00 diode.sym
-rw-rw-r-- 1 root root  685 ene 18 19:00 flash_cell.sym
-rw-rw-r-- 1 root root  292 ene 18 19:00 generic_pin.sym
-rw-rw-r-- 1 root root  314 ene 18 19:00 gnd.sym
-rw-rw-r-- 1 root root 2004 ene 18 19:00 ind.sym
-rw-rw-r-- 1 root root  347 ene 18 19:00 iopin.sym
-rw-rw-r-- 1 root root  337 ene 18 19:00 ipin.sym
-rw-rw-r-- 1 root root  626 ene 18 19:00 isource_arith.sym
-rw-rw-r-- 1 root root 1048 ene 18 19:00 isource_pwl.sym
-rw-rw-r-- 1 root root  536 ene 18 19:00 isource.sym
-rw-rw-r-- 1 root root  639 ene 18 19:00 isource_table.sym
-rw-rw-r-- 1 root root  799 ene 18 19:00 jumper.sym
-rw-rw-r-- 1 root root  308 ene 18 19:00 k.sym
-rw-rw-r-- 1 root root  217 ene 18 19:00 lab_generic.sym
-rw-rw-r-- 1 root root  225 ene 18 19:00 lab_pin.sym
-rw-rw-r-- 1 root root  239 ene 18 19:00 lab_show.sym
-rw-rw-r-- 1 root root  223 ene 18 19:00 lab_wire.sym
-rw-rw-r-- 1 root root  336 ene 18 19:00 launcher.sym
-rw-rw-r-- 1 root root  925 ene 18 19:00 led.sym
-rw-rw-r-- 1 root root  248 ene 18 19:00 netlist_at_end.sym
-rw-rw-r-- 1 root root  553 ene 18 19:00 netlist_not_shown_at_end.sym
-rw-rw-r-- 1 root root  526 ene 18 19:00 netlist_not_shown.sym
-rw-rw-r-- 1 root root  275 ene 18 19:00 netlist_options.sym
-rw-rw-r-- 1 root root  240 ene 18 19:00 netlist.sym
-rw-rw-r-- 1 root root  347 ene 18 19:00 ngspice_get_expr.sym
-rw-rw-r-- 1 root root  418 ene 18 19:00 ngspice_get_value.sym
-rw-rw-r-- 1 root root  355 ene 18 19:00 ngspice_probe.sym
-rw-rw-r-- 1 root root  857 ene 18 19:00 nmos3.sym
-rw-rw-r-- 1 root root  993 ene 18 19:00 nmos4_depl.sym
-rw-rw-r-- 1 root root  965 ene 18 19:00 nmos4.sym
-rw-rw-r-- 1 root root  702 ene 18 19:00 nmos-sub.sym
-rw-rw-r-- 1 root root 1013 ene 18 19:00 nmos.sym
-rw-rw-r-- 1 root root  339 ene 18 19:00 noconn.sym
-rw-rw-r-- 1 root root 1044 ene 18 19:00 npn.sym
-rw-rw-r-- 1 root root  326 ene 18 19:00 opin.sym
-rw-rw-r-- 1 root root 1063 ene 18 19:00 package_not_shown.sym
-rw-rw-r-- 1 root root  996 ene 18 19:00 package.sym
-rw-rw-r-- 1 root root  302 ene 18 19:00 param_agauss.sym
-rw-rw-r-- 1 root root  211 ene 18 19:00 param.sym
-rw-rw-r-- 1 root root  542 ene 18 19:00 parax_cap.sym
-rw-rw-r-- 1 root root  709 ene 18 19:00 pmos3.sym
-rw-rw-r-- 1 root root 1109 ene 18 19:00 pmos4.sym
-rw-rw-r-- 1 root root  712 ene 18 19:00 pmoshv4.sym
-rw-rw-r-- 1 root root  725 ene 18 19:00 pmosnat.sym
-rw-rw-r-- 1 root root  851 ene 18 19:00 pmos-sub.sym
-rw-rw-r-- 1 root root  997 ene 18 19:00 pmos.sym
-rw-rw-r-- 1 root root 1015 ene 18 19:00 pnp.sym
-rw-rw-r-- 1 root root  312 ene 18 19:00 port_attributes.sym
-rw-rw-r-- 1 root root  992 ene 18 19:00 res_ac.sym
-rw-rw-r-- 1 root root 1174 ene 18 19:00 res.sym
-rw-rw-r-- 1 root root 1441 ene 18 19:00 rgb_led.sym
-rw-rw-r-- 1 root root  995 ene 18 19:00 rnmos4.sym
-rw-rw-r-- 1 root root  631 ene 18 19:00 spice_probe.sym
-rw-rw-r-- 1 root root  572 ene 18 19:00 spice_probe_vdiff.sym
-rw-rw-r-- 1 root root  746 ene 18 19:00 sqwsource.sym
-rw-rw-r-- 1 root root  806 ene 18 19:00 switch_ngspice.sym
-rw-rw-r-- 1 root root  625 ene 18 19:00 switch.sym
-rw-rw-r-- 1 root root  619 ene 18 19:00 switch_v_xyce.sym
-rw-rw-r-- 1 root root  821 ene 18 19:00 title-2.sym
-rw-rw-r-- 1 root root  490 ene 18 19:00 title.sym
-rw-rw-r-- 1 root root  356 ene 18 19:00 use.sym
-rw-rw-r-- 1 root root 1276 ene 18 19:00 var_res.sym
-rw-rw-r-- 1 root root 1017 ene 18 19:00 vccs.sym
-rw-rw-r-- 1 root root 1064 ene 18 19:00 vcr.sym
-rw-rw-r-- 1 root root  850 ene 18 19:00 vcvs.sym
-rw-rw-r-- 1 root root  292 ene 18 19:00 vdd.sym
-rw-rw-r-- 1 root root  268 ene 18 19:00 verilog_delay.sch
-rw-rw-r-- 1 root root  517 ene 18 19:00 verilog_delay.sym
-rw-rw-r-- 1 root root  365 ene 18 19:00 verilog_preprocessor.sym
-rw-rw-r-- 1 root root  380 ene 18 19:00 verilog_timescale.sym
-rw-rw-r-- 1 root root  485 ene 18 19:00 vsource_arith.sym
-rw-rw-r-- 1 root root  701 ene 18 19:00 vsource_pwl.sym
-rw-rw-r-- 1 root root  481 ene 18 19:00 vsource.sym
-rw-rw-r-- 1 root root  827 ene 18 19:00 zener.sym
darunix@darunix-VirtualBox:~/VSDIAT_Courses/PV_Sky130/inverter/xschem$ ll /home/darunix/VSDIAT_Courses/PV_Sky130/inverter/xschem
total 32
drwxrwxr-x 2 darunix darunix 4096 ene 20 15:10 ./
drwxrwxr-x 5 darunix darunix 4096 ene 18 19:26 ../
-rw-rw-r-- 1 darunix darunix  407 ene 20 15:11 bsim4v5.out
-rw-rw-r-- 1 darunix darunix 1368 ene 20 14:08 inverter.sch
-rw-rw-r-- 1 darunix darunix  693 ene 20 15:09 inverter.spice
-rw-rw-r-- 1 darunix darunix  676 ene 20 14:08 inverter.sym
-rw-rw-r-- 1 darunix darunix 1248 ene 20 14:19 inverter_tb.sch
-rw-rw-r-- 1 darunix darunix 1242 ene 20 15:10 inverter_tb.spice
lrwxrwxrwx 1 darunix darunix   53 ene 20 10:52 .spiceinit -> /usr/local/share/pdk/sky130A/libs.tech/ngspice/spinit
lrwxrwxrwx 1 darunix darunix   54 ene 20 10:52 xschemrc -> /usr/local/share/pdk/sky130A/libs.tech/xschem/xschemrc
darunix@darunix-VirtualBox:~/VSDIAT_Courses/PV_Sky130/inverter/xschem$ ll /usr/local/share/pdk/sky130A/libs.tech/xschem
total 168
drwxr-xr-x 10 root root  4096 ene 20 11:52 ./
drwxr-xr-x 11 root root  4096 ene 20 10:50 ../
drwxr-xr-x  2 root root  4096 ene 20 11:52 decred_hash_macro/
-rw-rw-r--  1 root root 11355 ene 20 11:52 LICENSE
drwxr-xr-x  2 root root  4096 ene 20 11:52 mips_cpu/
-rw-rw-r--  1 root root  2560 ene 20 11:52 README.md
drwxr-xr-x  2 root root  4096 ene 20 11:52 scripts/
drwxr-xr-x  3 root root  4096 ene 20 11:52 sky130_fd_pr/
-rw-rw-r--  1 root root 79451 ene 20 11:52 sky130_fd_pr.patch
drwxr-xr-x  4 root root 20480 ene 20 11:52 sky130_stdcells/
drwxr-xr-x  3 root root  4096 ene 20 12:57 sky130_tests/
drwxr-xr-x  3 root root  4096 ene 20 11:52 stdcells/
-rw-rw-r--  1 root root 14115 ene 20 11:52 xschemrc
drwxr-xr-x  2 root root  4096 ene 20 11:52 xschem_verilog_import/
darunix@darunix-VirtualBox:~/VSDIAT_Courses/PV_Sky130/inverter/xschem$
s
The symbols in the first directory should be under a devices/ subdirectory,
/usr/local/share/xschem/xschem_library/devices/
d
Any reason why the symbols currently aren't under such a /devices subdirectory? As in, should that subdirectory not be created by the xschem installation itself? Just wondering what is the root cause, was it me doing something wrong during xschem installation procedure, or something else. At the moment I have hacked this issue is by copying the /usr/local/share/xschem/xschem_library folder into /usr/local/share/pdk/sky130A/libs.tech/xschem/sky130_tests, renaming it "devices" (i.e. now I have a /usr/local/share/pdk/sky130A/libs.tech/xschem/sky130_tests/devices with all the symbols inside) since that is where xschem seemed to be looking for the missing symbols initially. But not sure where the issue comes from.
s
no just move all the symbols in
/usr/local/share/xschem/xschem_library
into
/usr/local/share/xschem/xschem_library/devices
My suggestion is to delete all
/usr/local/share/xschem
and all
/usr/share/doc/xschem
and start over with the installation of xschem after doing a
git pull
in the source directory of xschem followed by a
make distclean
followed by a
./configure --debug
(--debug optional) followed by a
make
followed by a
sudo make install
, so we can verify if again the devices directory is not created.
d
thanks for the info & help @User.
👀 1
313 Views