Tutorial #2

Circuit Simulation with Synopsys HSpice
&
Waveform Viewing with Synopsys CosmosScope



Open your design via Cadence Virtuoso Schematic Editor:

$ icfb &

 

 

                                                    >File->Export->CDL

                                            產生spice檔(.sp)

 

Modify the ".sp" file as shown below:

************************************************************************
* auCdl Netlist:
*
* Library Name: mydesign
* Top Cell Name: inv
* View Name: schematic
* Netlisted on: Oct 21 16:30:12 2009
************************************************************************
.lib 'hspice.lib' tt
*.EQUATION
*.SCALE METER
*.MEGA
.PARAM
.OPTION POST
.GLOBAL gnd!
+       vdd!


*.PIN gnd!
*+ vdd!

************************************************************************
* Library Name: mydesign
* Cell Name: inv
* View Name: schematic
************************************************************************

.SUBCKT inv vi vo
*.PININFO vi:I vo:O
MM1 vo vi gnd! gnd! Nch W=220.00n L=180.00n
MM0 vo vi vdd! vdd! Pch W=420.00n L=180.00n
.ENDS

XINV A Y INV
C0 Y gnd! 2E-15F

Vvdd vdd! 0 1.8v
Vgnd gnd! 0 0v

V1 A 0 DC PWL 0, 0V, 100p, 0V, 150P, 1.8V, 1000P, 1.8V, 1050P, 0V, 2000P, 0V, R 0

.MEAS Tran delay-time-fall trig v(A) val=0.9v rise=1
+                          targ v(Y) val=0.9v fall=1
.MEAS Tran delay-time-rise trig v(A) val=0.9v fall=1
+                          targ v(Y) val=0.9v rise=1

.MEAS Tran rise-time trig v(Y) val=0.18v rise=1
+                    targ v(Y) val=1.62v rise=1
.MEAS Tran fall-time trig v(Y) val=1.62v fall=1
+                    targ v(Y) val=0.18v fall=1


.tran 10p 5n

.END

 

                                                              以下是 PWL 使用方法

 

 

Copy the file "hspice.lib" to your current working directory as follows (you only need to do this once):

$ cp /home/iltseng/pub/hspice.lib .

Run HSpice:

$ hspice INV.sp

 

 

Invoke Synopsys CosmosScope in order to view the waveforms:

$ scope &

CosmosScope

 

Open the ".tr0" file by:
    (1) Clicking on "File  -->  Open  -->  Plotfiles..."
    (2) Choosing "Files of Type" as "HSPICE (*.tr*, *.ac*, *.sw*, *.ft*)"
    (3) Clicking on the ".tr0" file (e.g., INV.tr0)
    (4) Clicking "Open"

 

 

Choose the signals to be displayed (e.g., v(a) and v(y) ), and then click "Plot." Note that you may wish to plot v(y) before plotting v(a) so that v(a) will be displayed on the top.

 

Then you will see the waveforms shown on CosmosScope:

 

Change the capacitance value of C0 from 2E-15F to 1E-14F and see if the waveforms will change.

 

Change the capacitance value of C0 from 2E-15F to 2E-14F and see if the waveforms will change.

 


last update: November 19, 2009