Hi All, Do you know how to install xschem, ngspice...
# xschem
m
Hi All, Do you know how to install xschem, ngspice, gaw in Red Hat Linux? I searched for the installation tutorials but they only support Ubuntu Linux. For example, ngspice doesn’t offer pre-complied packages for Linux according to their website: http://ngspice.sourceforge.net/download.html Can I install all these tools in one container?
s
you don't need a containerized install, just install (using the -i believe- rpm package manager) the required libraries. Then go for source build. For Xschem follow instructions here
@User after installing with the redhat package manager the required libs (xorg development libraries, tcl-tk, gtk libraries (for gaw) you should be able to build the software, for xschem:
git clone <https://github.com/StefanSchippers/xschem.git> xschem-src
then
cd xschem-src
and follow instructions in the link above.
for gaw:
git clone <https://github.com/StefanSchippers/xschem-gaw.git> gaw-src
then
cd gaw-src
./configure
make
sudo make install
in typical situations this is the sequence of commands. Ngspice has a very similar procedure as well. The

old video

explains the details for installing xschem, ngspice and gaw, but do NOT follow this old video for skywater-pdk, since now skywater-pdk libraries are instaled via open-pdks as explained in the

second version video

m
Thanks a lot I will try these and get back to you!
@User have you ever tried installing these tools in docker?
s
@User No i usually install EDA tools from source without containers. xschem/gaw/ngspice/magic are quite simple to install. May be more complex design toolchains need a container, i don't know.
m
@User I think the reason is that I use ngspice/magic as part of my flow in one container. We don't have admin access to our machines so having xschem and gaw would be nice as part of one container.
j
hello, I'm trying to install GAW with the method described above (thanks Stefaan), but I get the following message: config.status: error: cannot find input file: `Makefile.in' any ideas?
s
@User the README.md explains the detail. If
./configure
fails as in your case regenerate the automake files by giving this command:
aclocal && automake --add-missing && autoconf
You need to have installed on your system the automake, autoconf and libtool packages
@User I understand. I am using xschem and ngspice without any administrative privilege, by installing the executables in my home directory. I do this because i don't want to cripple the system directories. Using Containers is another possibility, expecially usefull for deploying to many different machines, however i don't have much experience with them.
m
Thanks @User. I think I could get away without gaw and xschem in the same container. But certainly need ngspice. @User and @User do you know how hard is it to add these tools in the same containers (especially xyce or ngspice)
j
Thanks a lot @User, after figuring out not few things it worked I managed to install the open_pdks and all the tools (with the help of your video

https://www.youtube.com/watch?v=KgBLByOkJxA

and its older version), and thus when I open xschem the sky130 cells and the links to the testbenches, but each time I try to descend using the 'e' key, xschem crashes... do you know what could be the reason? I installed the tools in '/usr/local/bin', could it be a permission issue?
I do sudo -i and then run xschem, same issue, so it seems to be something else... ideas or anyone who faced a similar issue?
s
@User, there was a typo in one of the commits. Could you please update xschem (git pull) and rebuild? (make; sudo make install) ? If it again crashes please report again!. Thank you for your report
and never run xschem as root!!! you only need sudo if doing 'make install' to install xschem in system directories. After that you invoke xschem as a normal user. Do not use sudo -i.
j
hello Stefan, thanks a lot for the explanation and the fix, descending and ascending in hierarchies works now
I am trying now to netlist the test_nmos.sch testbench as in your video (

https://www.youtube.com/watch?v=jXmmxO8WG8s&amp;t=1540s

), but it doesn't seem to work, I try to open the netlist using "Edit netlist" but it opens an empty file... what could I be doing wrong, and any advices to debug it?
I tried also with command line setting the netlist name and output path (with a command that works in the efabless environment) but the netlist is not generated... any help would be greatly appreciated!
s
@User may be you don't have 'awk' installed on the system. try in a terminal 'which awk', does it return a path for awk?
j
thx for the reply!
@User yes, it returns /usr/bin/awk
s
@User run xschem from a terminal, then in the terminal, after xschem is started, type
puts $netlist_dir
. Verify you have write permission in that directory.
$netlist_dir
contains the directory where xschem writes the netlist. It can be changed in the 'Simulation' menu.
you can also change netlist_dir in xschemrc file . search for '`set netlist_dir`' in that file.
also verify if some message is printed in the terminal where xschem was started after pressing the 'Netlist' button...
j
hello @User, thanks once more, it was indeed related to permissions now I manage to netlist, but when simulating I get errors related to the spice parameters, I checked the models referenced in the xschemrc and in the testbench and it seems fine, I'm pasting a summary of the messages I receive in case you have any clues what could be wrong **********************************************
No compatibility mode selected! Warning: redefinition of .subckt sky130_fd_pr__nfet_01v8, ignored Warning: redefinition of .subckt sky130_fd_pr__nfet_01v8_lvt, ignored Warning: redefinition of .subckt sky130_fd_pr__pfet_01v8, ignored ... Circuit: **.subckt test_mim_cap Original line no.: 8, new internal line no.: 11849:  Mismatch: 11 formal but 4 actual params. w=10;l=10;mf=1;via4_spacing=1;wc=$;lc=$;num_contacts=$;r1=$;carea=$;cperim=$;r2=$; Original line no.: 8, new internal line no.: 11849: Syntax error: letter [$] Original line no.: 8, new internal line no.: 11849:  Expression err: $ ... Original line no.: 32, new internal line no.: 23965: Undefined number [m] Original line no.: 32, new internal line no.: 23965: Cannot compute substitute  Copies=11854 Evals=23955 Placeholders=8 Symbols=11845 Errors=13 Numparam expansion errors: Run Spice anyway? y/n ?
s
@User please check in your xschemrc file that SKYWATER_MODELS is set correctly. Now the recommended way is to use
open_pdks
installed files, since open_pdks does a lot of patches and fixes to the original
skywater-pdk
files. the definition should look like:
set SKYWATER_MODELS /your/path/to/share/pdk/sky130A/libs.tech/ngspice
Adjust the path according to your installation. Then in your netlist add the correct `.lib`:
.lib $::SKYWATER_MODELS/sky130.lib.spice tt
Or even better to avoid using variables:
.lib /your/path/to/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice tt
If you set the .lib as above it doesn't matter how SKYWATER_MODELS is defined in xschemrc (you are not using it), anyway it is always good to have this variable pointing to the right place.
124 Views