Pyspice is a SPICE pre-processor written in Python, inspired by the Perl SPICE pre-processor spicepp by John Sheahan.
I developed this module as part of my own work and provide it here as a service to the Python and SPICE communities. Additions, suggestions, and usefullness reports are appreciated. It is currently licensed under the GPL.
It was (is currently being) developed with Python 2.4 and uses a few features introduced in 2.4. they relate to (re)sorting the netlist lines.
Here are some key features of "Pyspice":
Â· Each input "card" type has its own object type.
Â· Netlists are converted into an array of type instances.
Â· Netlist order is preserved for readability.
Â· Salient features of pyspice.py:
Â· Parallel capacitors are combined.
Â· Parallel MOSFETs are combined.
Â· Small capacitors are dropped for faster simulation.
pyspice.py [options] [-i infile] [-o outfile]
Use pyspice.py -h for all options.
What's New in This Release:
Â· At least default (pass through) handling of all element types.
Â· NOTE: For combining, this uses a global node name scheme. In other words: subcircuits, libraries, etc. are not in a separate node namespace as they should be, beware.
Â· Changed structure of classes (in LEO), there are base classes that contain common attributes and element classes that define the specific behavior.
Â· This version _should_ work with any netlist and only touch M's and C's, YMMV.
Â· Work is ongoing on the class structure and most important IMO is getting netlist hierarchy implemented.