what is the operation you were doing before the error?
s
what is the operation you were doing before the error?
m
Just made an inverter based off sky130 components
And I followed your video for the installation. I think my Ngspice is not able to find the files. Because the error seems to be with the simulator.
s
Yes but the dialog box is an error message from xschem. This should be fixed, if simulator fails xschem should just report the error. So i am trying to reproduce the same situation, even by inserting syntax errors in the ngspic commands...
m
Hey Stefan, I just reinstalled the Xschem using the video you made about Xschem+sky130 pdk
The previous error is gone. Now I get error with Ngspice where it just can't find libraries.
s
@User Thanks to your bug report i have fixed the xschem error. This error does not happen always but it was a bug in xschem. I have pushed a commit to github, so if you update and rebuild xschem (
git pull
and
[sudo] make install
) the first problem is gone. I can not tell about the ngspice error. This is probably related to ngspice not being able to find the models. Ensure the '`.lib`' instruction in the netlist is pointing to the correct location of models. Thank you for reporting the problem!.
m
That's awesome. Thanks again, I will try fixing the Ngspice error
s
If you send me the .sch circuit and/or the netlist i can try here,
m
Okay lemme send that.
s
Great! thanks. User feedback is really important, good for discovering bugs -:)
😁 1
m
Here's the spice netlist I have. I followed the steps that were about patching the sky130_fd_pr_ngspice
And that's the error. While I have checked that these files exist in the.directory mentioned.
I think it's worth mentioning that when I installed sky130pdk, the folder was created at usr/local/share/pdk/sky130A
s
please go to the directory containing the netlist (in the .xschem/simulation directory) and create a .spiceinit file with following content:
Copy code
set ngbehavior=hsa
set ng_nomodcheck
then try again the 'Simulate' button...
And next, do not include the skywater-pdk directory, you should do a :
Copy code
.lib /usr/local/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice tt
m
Okay, just did these steps. Waiting for the results. Also I should mention I am really grateful for all the help. I am very new to all this, so I sure am making a lot of mistakes. Thank you
IT WORKED 🥳🎊
s
You can press 'q' on the component defining the models and replace the .lib with the line i posted above.
👍 1
m
IMG_20211114_164520.jpg
s
getting better!
Thank you for reporting the xschem bug!
😁 1
m
Yeah, I am glad I could find something that helped
Wow. I spend like 2 days on this. Finally worked I am so happy 😂
Thanks again Stefan
s
you are welcome.
😁 1
a
@User: why isn't the comparability mode printed while @User is running the example?
m
@User is def because of the options I have set in the configure tools for simulation. I changed it a bit as per instructions by. Stefan in his installation video.
s
@User, i don't understand the question. What are you referring to? Thank you
@User, you are probably referring to this line printed while ngspice is running?
Compatibility modes selected: hs a
this is printed if you create a
.spiceinit
file in the directory where the netlist is created and simulator is running (Typically
~/.xschem/simulations
if not changed by user). the
.spiceinit
file is just 2 lines to specify some behaviour about model syntax and Hspice-like compatibility:
Copy code
set ngbehavior=hsa
set ng_nomodcheck
This file also allows ngspice to speed up model parsing considerably.