Post on 25-Aug-2020
Introduction to Hspice
How to Install and Run
Saied Barati
BSc Computer Engineer, SUT
S_barati@ce.sharif.edu
Introduction to HSpice
Introduction to Hspice
How to Install
Netlist
Circuit Analysis
Introduction to HSpice
• Simulation Program with Integrated Circuit
Emphasis
Developed in 1970’s at Berkeley
Many commercial versions are available
HSPICE is a robust industry standard
Has many enhancements that we will use
• Written in FORTRAN for punch-card machines
Circuits elements are called cards
Complete description is called a SPICE deck
Introduction to HSpice
1) First Download it!
Link:
(Go to Course Home Page!)
Introduction to HSpice
2) Now Crack it!
Note:
HSpice (amoozesh).pdf Page 2-4
Add “license.dat” to “environment variables”
with the name of “LM_License_file”
Introduction to HSpice
Netlist = text-based description of circuit
• netlist does not use symbols or graphical elements
makes it simple to learn but hard to visualize
usually need a companion schematic
• netlist describes
circuit elements (resistors, capacitors, etc.)
power supplies, input voltages, bias currents, etc.
connections between circuit elements
analysis method; defines data to be calculated
Introduction to HSpice
Netlist Structure:
Title (Required)
Circuit
Subcircuit(s)
Device Models
Analysis
Output
.end (Required)
Introduction to HSpice
Simple inverter circuit • ***** Define power supplies and sources *****
V1 1 0 10
R1 1 2 10
R2 2 0 30
R3 2 3 200 V1 VDD 0 5 VPULSE VIN 0 PULSE 0 5 2N 2N 2N 98N 200N ***** Analysis statement ***** .TRAN 1n 300n .END
Introduction to HSpice
First line is title of simulation
→ statements are ignored
First character in every line specifies how HSPICE interprets
the remaining line
First line of a netlist:
Any character
Title or comment line
Subsequent lines of netlist, and all lines of included files:
.(XXXX): Netlist keyword (e.g.: .TRAN 0.5ns 20ns)
C, D, E, F, G, H, I, J, K, L, M, Q, R, S, V, W: Element instantiation
* (asterisk): Comment line (HSPICE)
Introduction to HSpice
• Names begin with the
element key letter
(exception: subcircuits)
• Maximum name length:
1024 characters
First Letter Circuit Element or Source
C capacitor
D diode
I independent current source
V independent voltage source
R resistor
Q
bipolar junction transistor
M MOSFET
Introduction to HSpice
• Resistor
r<name> <terminal 1> <terminal 2> <value>
• Capacitor
c<name> <terminal 1> <terminal 2> <value>
• Diode
D<name> <terminal 1> <terminal 2> <model>
Ex:
R1 n1 n2 20k Type: Resistor Name: R1 Connected nodes: n1, n2 Value: 20kΩ * 2= 40kΩ
D1 a b DMOD Type: Diode Name: D1 Connected nodes: a, b Model: DMOD
Introduction to HSpice
Numbers can be
Integer
Floating point
Introduction to HSpice
Vxx/Ixx n+ n- DC=dcval tranfun
Vxx: Voltage source element name, must begin with V
Ixx: Current source element name, must begin with I
n+, n-: Positive and negative node
DC=dcval: DC source keyword and value (in volts)
Ex: VX 1 0 5V
Introduction to HSpice
Vxx/Ixx n+ n- PULSE v1 v2 td tr tf pw per PULSE: Keyword v1: Initial value of the voltage or current v2: Pulse plateau value td: Delay to the first ramp tr: Duration of the rising ramp tf: Duration of the falling ramp pw: Pulse width per: Pulse repetition period
Timetd tr pw tf
per
v2
v1
Introduction to HSpice
Comment: First letter of line is asterisk (*) → whole line is comment
Dollar sign ($) anywhere on the line → text after is comment
For example: * <comment_on_a_line_by_itself>
-or-
<HSPICE_statement> $ <comment_following_HSPICE_input>
Introduction to HSpice
1) .TRAN <Tstep> <Tstop>
<Tstep>: time step
<Tstop>: End time (duration) of simulation
Ex: .tran 0.02 2.0
2) .DC <source> <vstart> <vstop> <vstep>
<source>: source point
<vstart>: start voltage
<vstop>: stop voltage
<vstep>: voltage step
Ex: .DC Vin 0 1.8 0.1
Introduction to HSpice
Introduction to Hspice
How to Install
Netlist
Circuit Analysis
Introduction to HSpice
Useful links:
http://www.allaboutcircuits.com
http://www.ecircuitcenter.com/SPICEsummary.htm
http://www.tkt.cs.tut.fi/kurssit/8404142/K05/H10/v
lsi/hs_device.html
http://www.ece.uci.edu/docs/hspice/hspice_2001_2
-11.html
http://www.seas.upenn.edu/~jan/spice/spice.exHspi
ce.html