I have written a short tutorial on how to set up ngspice simulation in Eeschema. It is available from the ngspice web pages at http://ngspice.sourceforge.net/ngspice-eeschema.html.
Comments and enhancements are welcome!
I have written a short tutorial on how to set up ngspice simulation in Eeschema. It is available from the ngspice web pages at http://ngspice.sourceforge.net/ngspice-eeschema.html.
Comments and enhancements are welcome!
Very nice, Iām getting pumped for V5 release! On that note, you should explicitly state that it is using KiCad 5 to avoid any future confusion.
Sourceforge project sites are currently under maintenance. Please check 10 Minutes! We thank you for your patience!
Over an hour nowā¦ Sourceforge seems to be āunder maintenanceā quite a lot. Consider moving to a more reliable server?
ETA, now I can access it, a very nice intro! A few minor typos, nothing to worry about.
QUOTING the pageā¦
So digital simulation still will need some effort
to become really useful in KiCad/ngspice.
TRUE. But with some minor tweaks disregarding the
total lack of proper delay and features you may have
a fairly usable set of gatesā¦
With a MINIMALIST STANDARD CMOS (pmos/nmos) gates
you CAN do very simple derived combined logic ā¦
This absolute minimalist gates CAN PRODUCE
digital logic resultsā¦
Paul
To make the point all clear.
Symbols are fairly easy to capture and combine
like this simple DERIVED XOR and clock MULTIPLEXER
They DO WORK as expected
XORing and MUXing a clock as example is quite simple
Paul
Donāt underestimate the combinations.
With a proper set of defined FLOPS you can do a lot
This simple definition (with a matching symbol ) of a D-FLOP
already produce usable results.
LIKE
or the more ārefinedā CONSOLE view allow you to
confirm the logic results of the proper trigger
Have fun.
Paul
Iām by no means an expert in any flavor of spice (Iām aware it exists for circuit simulation, but I use spice for cooking ). Would one be able to simulate rise times with either a cap to ground or an inline inductor as part of the output of the gates? Maybe simulate a delay within the gate with carefully placed caps and resistors?
With this CMOS gates you are almost ANALOG .
You can and must define your pulses with proper delay/rise /fall times
or weird things will happen.
REAL LOGIC devices are FAR TOO MUCH COMPLICATED
They have built-in triggers and complex stages that
only a proper model will account.
Nevertheless you can see and confirm the results above by yourself
YOU CAN MIX ANALOG DEVICES AT WILL WITH THIS SIMPLE GATES
Paul
Thanks, it seems nicely written, but I am getting stuck in the early stages, i.e. installation.
It seems that a package called libngspice-kicad āLibrary (shared) for ngspice. Used by kicadā is available from my distribution (Linux MINT 19), but after installation I donāt have a .spiceinit in my home directory or in .config/kicad, or just in .config, or indeed anywhere on my system. It would seem, as might be expected, a default .spiceinit file may not be supplied with the distribution. Your tutorial states āPut the text file named .spiceinit into your home/username directoryā¦ā so I was looking for this file in the sources only to eventually realize that it, along with the two lines that need to be added, are already referred to in the Windows section above which I had until this point ignoredā¦ Anyway, since I have not compiled from source, Iām still not sure whether I need that file or not.
When I run a simulation on my schematic, errors are returned relating to line numbers that do not correlate to the netlist, but which Iām told relate to the āinternalā listing being sent to the spice engine. I have started separate a post on this issue as Iām not sure how to go about troubleshooting this. On the other hand, your example worked just fine which would seem to indicate the simulator is running, despite the .spiceinit file not being present.