next up previous contents index
Next: Operating Range Analysis Up: wrsmanual Previous: Debugging Variables   Contents   Index

Margin Analysis

WRspice has provision for automated operating range and Monte Carlo analysis. Both types of analysis perform repeated simulation runs with varying parameters, and record whether or not the circuit ``worked'' with that parameter set. Writing the code that tests whether the circuit is functioning properly or not is probably the major challenge in applying these analyses. It is usually helpful to have a thorough understanding of how the circuit behaves before performing margin analysis. The margin analysis is one of the later steps in circuit design.

Both types of margin analysis can use a file format which contains the SPICE deck plus executable statements. There are actually two formats recognized, one for compatibility with the JSPICE3 program, and a new format particular to WRspice. Use of one of these formats is the most straightforward method of initiating margin analysis, however there are short-cuts and hooks for more advanced users. The scripting capability is a powerful tool, and in general allows much tedium to be automated.


Stephen R. Whiteley 2022-09-18