Full Simulation Example with Cosmos-Scope

This example demonstrates the basic steps to perform simulation output and view the waveform results using Avant!'s Cosmos-Scope Waveform Viewer.

Input Netlist and Circuit

The input netlist for a BJT diff amplifier is given under Syntax. The individual sections of the netlists are indicated using comment lines. Please refer to Specifying Simulation Input and Controls for information about the individual commands.

Syntax
*file: bjtdiff.sp bjt diff amp with every analysis type
**
*# ANALYSIS:  ac dc tran tf noise new four sens pz disto temp
*# OPTIONS:     list node ingold=2 measdgt=5 numdgt=8 probe post
*# TEMPERATURE: 25
*
* netlist options
.OPTIONS list node ingold=2 measdgt=6 numdgt=8 probe post
* defined parameters
.PARAM rb1x=aunif(20k,1k,30k) rb2x=aunif(20k,1k,30k)
 
* analysis specifications
.TF v(5) vin
.DC vin -0.20 0.20 0.01 sweep monte=3
.AC dec 10 100k 10meghz
.NOISE v(4) vin 20
.NET v(5) vin rout=10k
.PZ v(5) vin
.DISTRO rc1 20 .9 1m 1.0
.SENS v(4)
.TRAN 5ns 200ns
.FOUR 5meg v(5) v(15)
.TEMP -55 150
 
* output specifications
.MEAS qa_propdly trig v(1) val=0.09 rise=1
+                targ v(5) val=6.8  rise=1
.MEAS qa_magnitude max v(5)
.MEAS qa_rmspower  rms power
.MEAS qa_avgv5     avg v(5)
.MEAS ac qa_bandwidth trig at=100k targ vdb(5) val=36 fall=1
.MEAS ac qa_phase find vp(5) when vm(5)=52.12
.MEAS ac qa_freq when vm(5)=52.12
.PROBE dc v(4)  v(5) v(14) v(15)
.PROBE ac vm(5) vp(5) vm(15) vp(15)
.PROBE ac vt(5) vt(15)
.PROBE noise onoise(m) inoise(m)
.PROBE ac z11(m) z12(m) z22(m) zin(m)
.PROBE disto hd2 hd3 sim2 dim2 dim3
.PROBE tran v(4) v(5)  v(14) v(15)
.PROBE tran p(vcc) p(vee) p(vin) power
 
* source statements
VIN 1 0 sin(0 0.1 5meg) ac 1
VCC 8 0 12
VEE 9 0 -12
 
* circuit statements
q1   4  2  6 qnl
q11 14 12 16 qpl
q2   5  3  6 qnl
q21 15 13 16 qpl
rs1   1  2 1k
rs11  1 12 1k
rs2   3  0 1k
rs12 13  0 1k
rc1   4  8 10k
rc11 14  9 10k
rc2   5  8 10k
rc12 15  9 10k
q3   6  7  9 qnl
q13 16 17  8 qpl
q4   7  7  9 qnl
q14 17 17  8 qpl
rb1   7  8 rb1x
rb2  17  9 rb2x
 
* model definitions
.MODEL qnl npn(bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf 
+ cjc=2pf va=50 rc=10 trb=.005 trc=.005)
.MODEL qpl pnp(bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf 
+ cjc=2pf va=50 bulk=0 rc=10)
*
.END

Try using the previous example (linear CMOS amp) to draw a circuit diagram for this BJT diff amplifier. Also, specify parameter values.

Execution and Output Files

This section displays the various output files from a Star-Hspice simulation of the BJT diff amplifier example. The simulation was executed by entering:

hspice bjtdiff.sp > bjtdiff.lis

where the input file is bjtdiff.sp and the output file is bjtdiff.lis. This is a list of the output files that were created, with a brief explanation of their content.

bjtdiff.ic

Initial conditions for the circuit

bjtdiff.lis

Text simulation output listing

bjtdiff.mt0

Post-processor output for MEASURE statements

bjtdiff.st0

Run-time statistics

bjtdiff.tr0

Post-processor output for transient analysis

bjtdiff.sw0

Post-processor output for DC analysis

bjtdiff.ac0

Post-processor output for AC analysis

bjtdiff.ma0

Post-processor output for AC analysis measurements

Using Cosmos-Scope to View Star-Hspice Results

The following steps show how to use the Avant! Cosmos-Scope Waveform Viewer to view the AC, DC, and transient analysis results from the BJT diff amplifier simulation. Refer to previous examples to see a sample of .lis , .ic, and .st0 files.

Viewing Star-Hspice Transient Analysis Waveforms

1. Invoke Cosmos-Scope.

Scope can be invoked from a UNIX command: % cscope. On a Windows-NT system, Scope can be opened by choosing the Programs > (user_install_location)> Cosmos-Scope.

2. Open the Open Plotfiles dialog box: File > Open > Plotfiles.

3. In the Open Plotfiles dialog box, in the Files of Type fields, select the Hspice Transient (*.tr*) item.

4. You will see bjtdiff.tr0 in the menu. Click on it and click Open. The Signal Manager and bjtdiff Plot File windows are displayed.

5. While holding down the Ctrl key, select the v(4), v(5), and ITPOWERD(power) signals.

6. Click on Plot from the bjtdiff Plot File window.You will see three cascaded plots. To see three signals in one plot, right-click on the name of top-most signal to get a Signal Menu.

7. From the Signal Menu, select Stack Region > Analog 0.

8. Repeat Step 6 for next top-most signal.

9. You will see a plot similar to one below, Transient Analysis Result: Plot of v(4), v(5), and ITPOWERD(power).

Figure F-8: Transient Analysis Result: Plot of v(4), v(5), and ITPOWERD(power)

Viewing Star-Hspice AC Analysis Waveforms

1. Close the transient waveforms. From the Signal Manager dialog box, select bjtdiff(1) and click on Close Plotfiles. This closes all transient plots.

2. In the Signal Manager, click on Open Plotfiles.

3. In the Open Plotfiles dialog box, in the Files of Type fields, select the Hspice AC (*.ac*) item.

4. You will see bjtdiff.ac0 in the menu. Click on it and click Open. The bjtdiff Plot File windows are displayed.

5. While holding down the Ctrl key, select the dim2(mag) and dim3(mag) signals.

6. Click on Plot from the bjtdiff Plot File window.You will see two cascaded plots. To see two signals in one plot, right-click on signal dim2(mag) to get a Signal Menu.

7. From the Signal Menu, select Stack Region > Analog 0. You will see a plot similar to the one below, AC Analysis Result: Plot of dim2(mag) and dim3(mag) from bjtdiff.ac0.

Figure F-9: AC Analysis Result: Plot of dim2(mag) and dim3(mag) from bjtdiff.ac0

Viewing Star-Hspice DC Analysis Waveforms

1. Close the AC waveforms. From the Signal Manager dialog box, select bjtdiff(1) and click on Close Plotfiles. This closes all AC plots.

2. In the Signal Manager, click on Open Plotfiles.

3. In the Open Plotfiles dialog box, in the Files of Type fields, select the Hspice DC (*.sw*) item.

4. You will see bjtdiff.sw0 in the menu. Click on it and click Open. The bjtdiff Plot File windows are displayed.

5. While holding down the Ctrl key, select all signals.

6. Click on Plot from the bjtdiff Plot File window.You will see four cascaded plots. To see four signals in one plot, right-click on the name of the top-most signal to get a Signal Menu.

7. From the Signal Menu, select Stack Region > Analog 0.

8. Repeat Steps 6 and 7 for next two top-most signals. You will see a plot similar to one below, DC Analysis Result: Plot of v(14), v(15), v(4), and v(5) from bjtdiff.sw0.

Figure F-10: DC Analysis Result: Plot of v(14), v(15), v(4), and v(5) from bjtdiff.sw0

The Cosmos-Scope User's and Reference Manual includes a full tutorial, information on the various Scope tools, and reference information on the Measure tool. For more information, please see the Scope Manual or visit the Avant! website at:

http:// www.avanticorp.com

 

 

 

Star-Hspice Manual - Release 2001.2 - June 2001