Notice: The first line in the .sp file must be a comment line or be left blank.
Notice: HSpice is case insensitive.
Figure 1. The circuit of a Differential Amplifier
SPICE file: "diff_amp.sp"
* Anant Agarwal and Jeffrey
H. Lang, * Foundations of Analog and Digital Electronic Circuits, * Elsevier Inc., 2005. * * pages 382-384 * Examples 7.19 and 7.20 * Fig. 7.62 .OPTION POST M1 n2 IN1 n1 gnd Nch L=0.5u W=1u M2 out IN2 n1 gnd Nch L=0.5u W=1u R1 n2 out 10k Is n1 n3 0.5m Vs1 gnd n3 10V Vs2 n2 gnd 10V Vgnd gnd 0 0V **VIN1 IN1 gnd 2V VIN1 IN1 gnd SIN ( 2V 0.3V 1Meg ) VIN2 IN2 gnd 2V *** MOS Model .model Nch NMOS level=1 .TRAN 0.01us 5us .END |
Use CosmosScope to open the ".tr0" file and
then display the waveforms of "v(in1)", "v(in2)", and "v(out)".
Use your mouse and Drag the signal "v(in1)" to
the place beneath "v(in2)" on the right of the "Graph0" window.
The waveforms of v(in1) and v(in2) will be merged together as shown below.
last update: December 04, 2009