Vous êtes sur la page 1sur 48

Introduction to Hspice

2011/10/28 Advisor: Ke-Horng Chen Speaker: Wei-Chung Chen

LAB 912

Content
SPICE Overview Simulation Input and Controls Sources Analysis Types Simulation Output and Controls Graphic tools

Reference: CIC SPICE Note


LAB 912 2

SPICE Overview

Simulation:

Predicting the Circuit/System Characteristic after manufacturing

Circuit simulation:

Physical model Circuit structure Simulation Program with Integrated Circuit Emphasis SPICE tools (HSPICE, Spectre, PSPICE) Steady-State, Transient, and Frequency Domains

SPICE:

LAB 912

Basic Flow for SPICE

LAB 802

Content
SPICE Overview Simulation Input and Controls Sources Analysis Types Simulation Output and Controls Simulation tool & Graphic tools

LAB 912

HSPICE Data Flow


1. Write circuit

3. Awaves tools

2. Simulation the circuit

LAB 912

Net Structure ( SPICE Preferred )

LAB 912

Element and Node Naming Conventions


Either Names or Numbers (e.g. d1 a1 b22) 0 (zero) = Ground

Ignoring trailing Alphabetic Character in Node Number (e.g. 5a=5b=5) Ground may be 0, GND
All nodes = Local .GLOBAL Statement (e.g. .GLOBAL VDD VSS )
LAB 912 8

Element and Node Naming Conventions (Cont.)

LAB 912

Unit and Scale Factors

LAB 912

10

Input Control Statement: .option

LAB 912

11

Input Control Statement: .option (cont)


.option

method = gear

Most stable Analog Switching regulator, using gear algorithm


.option

method = trap

Highest accuracy Lowest simulation time Best for CMOS digital circuit
LAB 912 12

Input Control Statement: .temp

.Temp statement:

No Specifying Defaulting 25C for HSPICE

LAB 912

13

Library Input Statement

LAB 912

14

Input Control Statement: .alter

LAB 912

15

Input Control Statement: .alter (contd)

LAB 912

16

Description of MOSFET

LAB 912

17

Hierarchical Circuit

LAB 912

18

Hierarchical Circuit (cont)

LAB 912

19

Content
SPICE Overview Simulation Input and Controls Sources Analysis Types Simulation Input and Controls Simulation tool & Graphic tools

LAB 912

20

DC, AC Sources

LAB 912

21

Transient Sources

Transient sources statement:


Pulse (PULSE Function) Sinusoidal (SIN Function) Exponential (EXP Function) Piecewise Linear (PWL Function)

LAB 912

22

Pulse Source Function

LAB 912

23

Sinusoidal Source Function

LAB 912

24

Piecewise Linear Source Function

LAB 912

25

Voltage and Current Controlled Elements

LAB 912

26

Content
SPICE Overview Simulation Input and Controls Sources Analysis Types Simulation Output and Controls Simulation tool & Graphic tools

Reference: CIC Note LAB 912

27

Analysis Types & Orders

LAB 912

28

DC Sweep & DC Small Signal Analysis

LAB 912

29

DC Sweep & DC Small Signal Analysis (cont)

LAB 912

30

AC Sweep & AC Small Signal Analysis

LAB 912

31

AC Sweep & AC Small Signal Analysis (cont)

LAB 912

32

Transient Analysis

LAB 912

33

Transient analysis (Cont.)

LAB 912

34

Content
SPICE Overview Simulation Input and Controls Sources Analysis Types Simulation Output and Controls Simulation tool & Graphic tools

Reference: CIC Note LAB 912

35

Output Files Summary (HSPICE)

LAB 912

36

Output Statement

LAB 912

37

Content
SPICE Overview Simulation Input and Controls Sources Analysis Types Simulation Output and Controls Simulation tool & Graphic tools

Reference: CIC Note LAB 912

38

Simulation tool-Hspice
Open XXX.sp
()

Open XXX.lis
()

(1st step)

LAB 912 39

Graphic tools-Awaves
menu
(1st step) ()

Tool button

Waveform data

waveform
LAB 912 40

Result browser
Step1: Analysis type Step2: Instant name and hierarchy Set X axis
Step5:
LAB 912 41

Design name
Step3: Step4:

Data name and data type

Awaves Windows

log

42

Example
(1) op.sp.op 1 (2) ac.sp.ac- (1) op.sp op.list DC operation point (3) dc.sp.dc-dc (2) ac.sp ac.ac0 Frequency Analysis (4) tr.sp.tran-

(3) (4)

dc.sp tr.sp

dc.sw0 tr.tr0

DC Sweep Transient response

LAB 912

43

XXX.list

(1)concluded (2)mos

(2) (3) (4) (5) (6) (7) (8)

(3)Ids (4)VGSVDS (5)VTH (6)VGS-VTH (7)gm (8)1/rDS


LAB 912

(1)

44

dc.sp / op.sp / ac.sp


dc.sp op.sp ac.sp

VDrain VGate

VIN AC 1V

VOUT

VSS
LAB 912

VSS

45

tr.sp
VDD

a
inv0

b
inv1

MP0 MN0

d Cout

VSS

LAB 912

46

Appendix: SPICE Instructions

DC Analysis:

.dc temp -40 120 10 .dc Vdrain 0 5 0.1 sweep VGate 3 5 0.1

AC Analysis

.ac dec 10 1 10G .ac dec 10 1 10G sweep temp -40 120 10 .probe vdb(XXX) vp(XXX)
.tran 1n 100u .tran 1n 100u UIC .tran 1n 100u sweep temp -40 120 20
LAB 912 47

Transient Analysis:

Thanks for your attention!

LAB 912

48

Vous aimerez peut-être aussi