next up previous contents
Next: Commercial version Up: First Steps Previous: Eye diagram plots.

The calculator window

     

The waveform calculator which you can see in the picture below is a UPN calculator which can perform unary and binary calculations on the simulation results (waveforms): +,-,*,/, FFT, LOG, DIFF, INT, y**2 , and so on are implemented.

You can start the calculator dialog by selecting 'calculator*' in the   plotwindow menu.


 
Figure 3.10: Calculator window
\fbox{
\includegraphics{calculator.ps}
}

Each line contains either an operator or a simulation result (waveform). Global waveforms like ONOISE and INOISE can be used as well to compute noise results as well as any other results. Before filling out the lines, make sure that the kind of result you want to compute (tran, dcsweep. ac, ac ph) is chosen correctly in the switchbox in the lower part of the calculator window. By default, transient simulation is chosen. Filling out the lines is easy: selecting a voltage or current can be done via mouseclick. First, choose whether you want to compute a voltage or a current in the second switchbox (node or terminal : voltage or current). Then , click the 'choose' button at the left side of the line you want to fill out. Afterwards, you can select a net or a terminal.

Selecting a terminal means that you can select a voltage source or a device whose terminal currents have been saved using 'save cont curs'. In SPICE3, you need to execute 'save cont curs' prior to simulation to save the currents through elements like resistors and transistors. Otherwise, only the currents through voltage sources are saved, which means that voltage sources may be selected at any time. If you did 'save cont curs' which causes the contact boxes to be displayed in yellow (instead of in red), you can select these yellow contact boxes to process the current flow value through these contact boxes.

After selecting a node or a terminal, the node or terminal name will be displayed in the appropriate line:

'V(1) tran' will appear if you have chosen to plot voltages, node 1 , and transient simulation.  

'V(aliasname) tran' will appear if have chosen a net with an alias. Instead of displaying the net number, the alias name is displayed in brackets. This feature is very useful when running the calculator in batch mode or when the circuit is still under development.

As described later, the contents of the calculator can be saved and restored. When defining very complex expression, it can be very annoying to re-define them as soon as you have modified the circuit, which will probably change the net numbers. So, if you run into this problem, please give an alias name to the nodes which you are interested in, and you will not need to redefine calculator contents in case of changes in your circuit.

After having filled out as many lines as you need (20 lines are hopefully enough), click the 'plot' button. The filled out lines will be interpreted, and the result will be plotted into the plot window.

For example, if your input is
V(1) ac
V(2) ac
two lines will appear in the plot window which show the ac magnitude voltages at nodes 1 and 2.
V(1)
V(2)
+
only one line will appear in the plot window which shows the sum of the voltages at nodes 1 and 2. V(1) tran
V(2) tran
+
V(3) tran
shows the sum of the transient simulation results voltages at nodes 1 and 2 and the voltage at node 3.
V(1) acph
V(2) acph
+
V(3) ac
V(4) ac
*
shows the sum of the ac phases at nodes 1 and 2 and the product of the ac magnitudes at nodes 3 and 4. You can mix ac and acph in the same calculator window when you want to plot ac phases and ac magnitudes in the same plot window. What is not allowed is mixing ac and tran simulations, for example, because
a) it makes no sense
b) due to the different vector lengths of ac and tran simulation results, this can lead to unpredictable results.

V(1) tran
V(2) tran
-
V(3) tran
V(4) tran
-
*
Shows the product of the difference voltages at nodes 1 and 2 and nodes 3 and 4.

V(1) tran
V(2) tran
-
V(3) tran
V(4) tran
-
*
pow2
FFT hemm

shows the fast Fourier transformation of the power of two of the product of the difference voltages at nodes 1 and 2 and nodes 3 and 4. The waveform to be transformed will be Hemming-windowed before the fft is executed.

.
.
.
It is a UPN calculator, indeed.

Since SPICECAD version 1.5, some new features have been added to the calculator.


next up previous contents
Next: Commercial version Up: First Steps Previous: Eye diagram plots.
Martin Maschmann
1999-10-10