Electronic – Electronic Circuit Simulator API/Libraries

libraryprogrammingsimulation

Are there any Electronic circuit simulator libraries/API that I can use to construct virtual circuit simulators like SPICE etc? My main research area is not Electronic simulation since I'm a Computer science undergrad so I have to give priority to Software Engineering aspects.

thanks

Best Answer

ummm spice does not really need an api ..... spice simulation file looks something like this

LPFILTER.CIR - SIMPLE RC LOW-PASS FILTER
*
VS  1   0   AC  1   SIN(0VOFF 1VPEAK   2KHZ)
*
R1  1   2   1K
C1  2   0   0.032UF
*
* ANALYSIS
.AC     DEC     5 10 10MEG
.TRAN   5US  500US
*
* VIEW RESULTS
.PRINT  AC  VM(2) VP(2)
.PRINT  TRAN    V(1) V(2)
*
.PROBE
.END

everything is driven by text files in the background and these files are passed to a pspice exe that normally does the rest. The spice engine itself is available with a BSD license so you can tweak it yourself.

Most commercial offerings offer schematic entry, parts libraries and output plotting options.

You can do away with this be passing in a netlist file with the simulation details to an spice engine and get back a text file of results.

So no real api just a command line driven app. Of course you can get the source code and compile it into you own application.

check out wikipedia for more details.