Product Documentation
HSPICE/SPICE Interface Reference
Product Version IC23.1, June 2023

2


SPICE Circuit Simulation Interface

This chapter contains the following topics:

Overview

To set up and run a basic simulation using menus and forms, refer to Simulation Environment Help. Here is information specific to running the SPICE simulator:

Example of a SPICE Simulation Run

This section shows an example of input and output files needed for running a SPICE simulation.

The following input and output files are for running the simulation on the inverter shown below:

control file

* Spice control file
.options acct opts nopage limpts=1000 
.width in=80 out=80
[!spice.inp]
[!netlist]
[!spice.sim]
.end

netlist file

* net 1 = vdd! 
* net 0 = gnd!
* net 2 = /OUT
* net 3 = /IN
.MODEL Model1 pmos level=2 vto=-.7 kp=1.5e-05 gamma=.4
+lambda=.03 tox=6.e-07 xqc=.5
* pmos(0) = /1
M$#0 1 3 2 1 Model1 l=2u w=6u
* capacitor(1) = /2
C$#1 2 0 poly 1pf
.MODEL Model3 nmos level=2 vto=.7 kp=3.e-05 gamma=.2 +lambda=.02
+ tox=6.e-07 xqc=.5
* nmos(2) = /0
M$#2 2 3 0 0 Model3 l=2u w=4u

spice.inp file

vdd [#vdd!] [#gnd!] dc 5v 
vin [#/IN] 0 pwl 0 0 100ns 5v 150ns 5v 250ns 0

spice.sim file

.tran 1ns 300ns

si.inp file: Used as Input to SPICE

* Spice control file
.options acct opts nopage limpts=1000 
.width in=80 out=80
vdd 1 0 dc 5v 
vin 3 0 pwl 0 0 100ns 5v 150ns 5v 250ns 0
* net 1 = vdd! 
* net 0 = gnd! 
* net 2 = /OUT 
* net 3 = /IN 
.MODEL Model1 pmos level=2 vto=-.7 kp=1.5e-05 gamma=.4 
+lambda=.03 tox=6.e-07 xqc=.5 
* pmos(0) = /1 
M$#0 1 3 2 1 Model1 l=2u w=6u 
* capacitor(1) = /2 
C$#1 2 0 poly 1pf 
.MODEL Model3 nmos level=2 vto=.7 kp=3.e-05 gamma=.2
    lambda=.02 
+ tox=6.e-07 xqc=.5
* nmos(2) = /0
M$#2 2 3 0 0 Model3 l=2u w=4u
.tran 1ns 300ns
.end

si.log file: Produced from the Simulation Run

si version 4.0.55 Wed Apr 18 21:51:31 PDT 1990          (cds2082)
si: Loading user defined simulation run control file "~/.simrc".
si: Loading simulation environment file "/usr/mnt2/hpeter/4.0/group/spice/test2/run1/si.env".
si: Loading simulation capabilities file "/usr/mnt2/hpeter/4.0/etc/skill/si/simcap.ile".
Running simulation in directory: "/usr/mnt2/hpeter/4.0/group/spice/test2/run1".
Running netlist
Begin netlist: Apr 26 11:58:45 1990
simulation library path = ". ~"
simulation library = testLib
library configuration = default
cell = spice.cct2
view = schematic
view list = ("spice" "cmos.sch" "schematic")
stopping view list = ("spice")
End netlist:   Apr 26 11:58:54 1990
Running simin
Running runsim with simulator: "spice"
Begin simulation:    Apr 26 11:58:56 1990
End simulation:   Apr 26 12:02:38 1990
Running simout
Simulation completed successfully.

si.out file: Output of a SPICE Simulation Run

***4/26/90 ***** SPICE 2G.6 3/16/83 ****14:35:31***
* SPICE CONTROL FILE
**** INPUT LISTING  TEMPERATURE = 27.000 DEG C
********************************************************
.OPTIONS ACCT OPTS NOPAGE LIMPTS=1000
.WIDTH IN=80 OUT=80
VDD vdd! gnd! DC 5V
VIN /IN gnd! PWL 0 0 100NS 5V 150NS 5V 250NS 0
* NET 1 = VDD!
* NET 0 = GND!
* NET 2 = /OUT
* NET 3 = /IN
.MODEL MODEL1 PMOS LEVEL=2 VTO=-.7 KP=1.5E-05
GAMMA=.4
+LAMBDA=.03 TOX=6 .E-07 XQC=.5
* PMOS(0) = /1
M/1 vdd! /IN /OUT vdd! MODEL1 L=2U W=6U
* CAPACITOR(1) = /2
C/2 /OUT gnd! POLY 1PF
.MODEL MODEL3 NMOS LEVEL=2 VTO=.7 KP=3.E-05 GAMMA=.2
+ LAMBDA=.02
+ TOX=6.E-07 XQC=.5
* NMOS(2) = /0
M/0 /OUT /IN gnd! gnd! MODEL3 L=2U W=4U
.TRAN 1NS 300NS
.END
****************************************************************
**** MOSFET MODEL PARAMETERS TEMPERATURE = 27.000 DEG C
MODEL1 MODEL3
TYPE PMOS NMOS
LEVEL 2.000 2.000
VTO -0.700 0.700
KP 1.50D-05 3.00D-05
GAMMA 0.400 0.200
LAMBDA 3.00D-02 2.00D-02
TOX 6.00D-07 6.00D-07
XQC 0.500 0.500
**** OPTION SUMMARY TEMPERATURE = 27.000 DEG C
DC ANALYSIS -
GMIN = 1.000D-12
RELTOL = 1.000D-03
ABSTOL = 1.000D-12
VNTOL = 1.000D-06
LVLCOD = 1
ITL1 = 100
ITL2 = 50
PIVTOL = 1.000D-13
PIVREL = 1.000D-03
TRANSIENT ANALYSIS -
METHOD = TRAP
MAXORD = 2
CHGTOL = 1.000D-14
TRTOL = 7.000D+00
LVLTIM = 2
MU = 0.500
ITL3 = 4
ITL4 = 10
ITL5 = 5000
MISCELLANEOUS -
LIMPTS = 1000
LIMTIM = 2
CPTIME = 100000000
NUMDGT = 4
TNOM = 27.000
DEFL = 1.000D-04
DEFW = 1.000D-04
DEFAD = 0.000D+00
DEFAS = 0.000D+00
************************************************************ MOSFET MODEL PARAMETERS  TEMPERATURE = 27.000 DEG C
MODEL1 MODEL3
TYPE PMOS NMOS
LEVEL 2.000 2.000
VTO -0.700 0.700
KP 1.50D-05 3.00D-05
GAMMA 0.400 0.200
LAMBDA 3.00D-02 2.00D-02
TOX 6.00D-07 6.00D-07
XQC 0.500 0.500
**** OPTION SUMMARY TEMPERATURE = 27.000 DEG C
DC ANALYSIS -
GMIN = 1.000D-12
RELTOL = 1.000D-03
ABSTOL = 1.000D-12
VNTOL = 1.000D-06
LVLCOD = 1
ITL1 = 100
ITL2 = 50
PIVTOL = 1.000D-13
PIVREL = 1.000D-03
TRANSIENT ANALYSIS -
METHOD = TRAP
MAXORD = 2
CHGTOL = 1.000D-14
TRTOL = 7.000D+00
LVLTIM = 2
MU = 0.500
ITL3 = 4
ITL4 = 10
ITL5 = 5000
MISCELLANEOUS -
LIMPTS = 1000
LIMTIM = 2
CPTIME = 100000000
NUMDGT = 4
TNOM = 27.000
DEFL = 1.000D-04
DEFW = 1.000D-04
DEFAD = 0.000D+00
DEFAS = 0.000D+00
********************************************************
INITIAL TRANSIENT SOLUTION TEMPERATURE = 27.000 DEG C
NODE VOLTAGE NODE VOLTAGE NODE VOLTAGE
(vdd!) 5.0000 (/OUT) 5.0000 (/IN) 0.0000
VOLTAGE SOURCE CURRENTS
NAME CURRENT
VDD -6.933D-12
VIN 0.000D+00
TOTAL POWER DISSIPATION 3.47D-11 WATTS
********************************************************
OPERATING POINT INFORMATION TEMPERATURE = 27.000 DEG C
**** MOSFETS
M/1 M/0
MODEL MODEL1 MODEL3
ID 6.80E-12 1.93E-12
VGS -5.000 0.000
VDS 0.000 5.000
VBS 0.000 0.000
JOB CONCLUDED
**** JOB STATISTICS SUMMARY TEMPERATURE = 27.000 DEG C
NUNODS NCNODS NUMNOD NUMEL DIODES BJTS JFETS MFETS
4 4 4 5 0 0 0 2
NUMTEM ICVFLG JTRFLG JACFLG INOISE IDIST NOGO
1 0 301 0 0 0 0
NSTOP NTTBR NTTAR IFILL IOPS PERSPA
6. 13. 13. 0. 21. 63.889
NUMTTP NUMRTP NUMNIT MAXMEM MEMUSE COPYKNT
71. 4. 170. 249984 1576 15052.
READIN 0.42
SETUP 0.05
TRCURV 0.00 0.
DCAN 0.18 13.
DCDCMP 0.067 2.
DCSOL 0.067
ACAN 0.00 0.
TRANAN 3.63 170.
OUTPUT 0.00
LOAD 3.067
CODGEN 0.000 1fs 0.
CODEXC 0.000
MACINS 0.000
OVERHEAD 0.07
TOTAL JOB TIME 4.35
********************************************************


Return to top
 ⠀
X