HSPICE

You must have added the hspice information to your .cshrc file. See Setup.

Users Guides and Examples.

Online Users Guide: Provide by Washington University
MOS Characteristic Example

Back to U-MASS Design-Flow

Extraction and Simulation Example

Tools and Models.

Extraction:

1) After extracting your netlist from either the schematic or vertuoso editors you can convert them into true hspice format with the following perl scripts.

schm2spice.pl
lo2spice.pl

Schematic netlist

* net 1 = vdd!
* net 0 = gnd!
* net 2 = /net14
* net 3 = /a
* net 4 = /out
* net 6 = /b
.model model1 pmos level=13
* pmos(0) = /M3
m0 4 6 2 model1 w=2.7e-6u l=200e-9u ad=1.35e-12 as=1.35e-12
+pd=6.4e-6 ps=6.4e-6 FALSE m=1
* pmos(1) = /M2
m1 2 3 1 model1 w=2.7e-6u l=200e-9u ad=1.35e-12 as=1.35e-12
+pd=6.4e-6 ps=6.4e-6 FALSE m=1
.model model2 nmos level=13
* nmos(2) = /M1
m2 4 6 0 model2 w=1.1e-6u l=200e-9u ad=550e-15 as=550e-15
+pd=3.2e-6 ps=3.2e-6 FALSE m=1
* nmos(3) = /M0
m3 4 3 0 model2 w=1.1e-6u l=200e-9u ad=550e-15 as=550e-15
+pd=3.2e-6 ps=3.2e-6 FALSE m=1

example >../schm2spice.pl
Input read from... netlist
Output is in... sch.cir

New netlist: (Note how labeling really helps)

m0 out b net14 vdd pmos w=2.7e-6 l=200e-9 ad=1.35e-12 as=1.35e-12
+pd=6.4e-6 ps=6.4e-6 m=1
m1 net14 a vdd vdd pmos w=2.7e-6 l=200e-9 ad=1.35e-12 as=1.35e-12
+pd=6.4e-6 ps=6.4e-6 m=1
m2 out b gnd gnd nmos w=1.1e-6 l=200e-9 ad=550e-15 as=550e-15
+pd=3.2e-6 ps=3.2e-6 m=1
m3 out a gnd gnd nmos w=1.1e-6 l=200e-9 ad=550e-15 as=550e-15
+pd=3.2e-6 ps=3.2e-6 m=1

2. Now create a spice file which defines the input waveforms and what you want to measure or analyze. The above tutorial should help, but you can use this example, nor.spice to get you started.

************************** NOR GATE *****************************
* The first line is always a comment. Do not put any commands in it.
.options list node post
.include ../models0.25.mod

************************** Netlist ****************************
.include sch.cir

************************** Load ********************************
Cout out gnd 15fF

*** Fixed Voltages
Vdd vdd gnd dc 2.5V

*** Inputs
Va a gnd dc 0 pulse (0 2.5 1.9n .1n .1n 1.9n 4.0n)
Vb b gnd dc 0 pulse (0 2.5 3.9n .1n .1n 3.9n 8.0n)

* Only used to time measurements.
vtrig trigger gnd dc 0 pulse (0 2.5 1.9n .1n .1n 5.9n 8.0n)
ctr trigger gnd 2fF

* Measurements
.measure tran pavgHL AVG power from=1ns to=3ns
.measure tran pavgLH AVG power from=7ns to=9ns
.measure tran tpHL trig v(trigger) val='2.5/2' RISE=1 TARG v(out) val='2.5/2' FALL=1
.measure tran tpLH trig v(trigger) val='2.5/2' FALL=1 TARG v(out) val='2.5/2' RISE=1

.tran 0.001ns 9.0ns
.end

3. Running a simple simulation.

example > hspice nor.spice > log.x

4. You should see a nor.tr0 file in your directory. If not check the log.x file for error messages.

5. To start the viewer enter the following.

example > awaves

6. In the window that comes up select Design - Open ....



7. A new window will come up where you can select your data. For this example the extension is .tr0 but other extensions are used for other types of analysis.




8. The results browser window will let you select (by double clicking) the signals you want to view.



9. After selecting the signals you want you can use the window menu to zoom. For example, select Window - Zoom X.



10. Your cursor will change. Move the mouse under the region of interest. Click and hold as you drag along the x axis. Release to finish the selection.



11. Now you can add a measurement. Select Measure - Point to Point.



12. Click on the fist point and hold as you drag to the second point.



13. You can also check the current of your circuit.



14. In the spice file above there are several .measure statements. If used properly they can automatically generate the data you are most interested in. Notice that I am measuring power and delay. The results of these statements are placed in a nor.mt0 file, which looks like this.

$DATA1 SOURCE='HSPICE' VERSION=' 20'
.TITLE '****************************** nor gate*****************************'
pavghl pavglh tphl tplh temper alter#
4.644e-05 2.993e-05 9.481e-11 1.001e-10 25.0000 1.0000