I’ve contributed this new component (STOP) for anyone to use for private or commercial purposes.
This component can stop a simulation before the end time specified in the .tran statement. This occurs on the 0 → 1 rising edge of the “in” input.
The advantages are:
- Shorter simulation execution times.
- Smaller .qraw file sizes.
- Faster access to the post-processing phase when using .meas statements.
- Faster execution of the post-processing phase since the .qraw fie is smaller.
- Only the current .step is STOPped and the next .step parameter is executed next.
This C-block is a derivative of the new feature requested of QSpice based on the AbortSim() feature.
Here is a link to the AbortSim() discussion: Is it possible to stop a simulation step to allow the next step to process without stopping the entire sim?
This C-block is potentially more useful since you can “STOP” a simulation within a .step WITHOUT exiting the entire simulation (such as with exit(3)). In this case, the next .step parameter is executed. This speeds up the overall multi-step simulation. If there are no stepping, the entire simulation is STOPped.
I’ve included this component as a symbol as well. This potentially makes use of the “Symbols & IP” Browser feature of assigning the directory where this symbol is found. From the “Symbols & IP” Browser, you can drag-n-drop the STOP symbol into your schematic with all the inputs and outputs assigned properly.
At this time, if the STOP component is not in the same directory as the schematic, then you need to change the “Library File” field to point to the stop.dll file. [Note: leave off the .dll. This will be automatically added when executing the simulation.]
Here is a simple multi-step simulation using the STOP component to stop only the active step.
Summary
I’ve found this component to be extremely useful. I’ve run a very large stepped simulation that created a 700M+ .qraw file. Using the STOP component to early terminate a step reduced the .qraw file size to 164M+. Using STOP reduced my post-processing time from 280 seconds to 84 seconds.
When this forum allows for uploads of .zip files, I can attach it to this posting.
Len