For those of us who are Python users, I would like to highlight a new tool called PyQSPICE. It works with QSPICE’s command-line interface to load QSPICE simulation results into memory for plotting in Python.
This is an open-source project hosted on GitHub. It is not supported by the QSPICE team.
The main module has an explanation in front of each method.
Q:: How to tweak a parameter, run a sim and repeat/loop?
A:: This example is running 2 sims from one next list by changing the netlist “.cir” file with Python regular expression “re” module.
Q:: Why “SJIS” encoding, in the Python module?
A:: See this discussion. The QSPICE uses “Latin-1 Supplement” and many file-encoding judgement routines (checked a couple of standalone encoding detection programs) think it “Shift JIS”, with a probability view point. Just to avoid Python error message, I use the “SJIS” encoding and I know I’m dealing with a file of “Latin-1 Supplement”.
PyQSPICE is very good and I have used it already.
How do I print the dc operating points if I am using PyQSPICE?? I do not see that function in the PyQSPICE class and was hoping if you could please help with that? It will be a good starting point to see dc operating points of all nodes (and currents)
before the PSRR circuit is simulated (or any other AC sim is triggered)
It supports .OP result reading. To make this happens, PyQSPICE now reads “.cir” netlist and extract nodes and elements. Not all elements implemented (logic gates, AD/DA converters), voltage nodes completely sandwiched by those elements will be ignored…for now.
Plot setting lines are consolidated into a method and now we can make our main code clean.
Only the code of “tests/50_OP” is clean for plotting, will update older “tests” examples step-by-step.
The example “tests/50_OP” is showing simple results but it is reading more info from the “.OP” run. Please try “print(df)” to see all the info this new version PyQSPICE reading.