hspice tutorial - the university of texas at dallasmxl095420/ee6306/hspice_tutorial.pdf · hspice...

20
HSPICE TUTORIAL HSPICE TUTORIAL Department of Electrical Engineering The University of Texas at Dallas Updated on February 2nd 2010 Contents Introduction H t St How to Setup How to Run Hspice How to Run WaveView Example 1 Example 2 A di 1 Appendix 1 Appendix 2 Slide # 2

Upload: duongdien

Post on 09-Sep-2018

245 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

HSPICE TUTORIALHSPICE TUTORIAL

Department of Electrical Engineeringp g g

The University of Texas at Dallas

Updated on February 2nd 2010

Contents

Introduction

H t S tHow to Setup

How to Run Hspice

How to Run WaveView

Example 1p

Example 2

A di 1Appendix 1

Appendix 2

Slide # 2

Page 2: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

Introduction

This tutorial introduces the Hspice and SpiceExplore/WaveViewer to perform some basic circuitSpiceExplore/WaveViewer to perform some basic circuit simulations.

• Hspice

Circuit Simulator

• SpiceExplore/WaveViewer

Hi h R l ti W f ViHigh Resolution Waveform Viewer

Slide # 3

How to Setup

Slides(#4 ~ 5) show how to setup environment for starting Hspice and SPICE Explorer/WaveView.Hspice and SPICE Explorer/WaveView.

• First of all, log on to the UNIX workstation using your user ID and Password.

Aft l i C l Wi d d t• After logging on, open a Console Window and create a directory called “project” in your home directory. The project directory is to store process parameters and Hspice source files.

Slide # 4

Page 3: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

How to Setup

• Launch a web browser and visit the course website to download a TSMC 0.35um technology model file for Hspice simulationHspice simulation.

Cli k th M d l D l d d th “ t t”Click the Model Download and save the “cmos.txt”

file in your “project” directory.

Slide # 5

How to Run Hspice

Next, let us learn how to run Hspice

• Open the Console Window and type the following command.

“You have to do this every time you want to start Hspice”.

• Type the following command in your UNIX prompt to• Type the following command in your UNIX prompt to run Hspice with source file “example1.sp”.

Slide # 6

Page 4: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

How to Run Hspice

• Hspice will read “example1.sp” and run the simulation. A l fil “ l 1 li ” ill b t d ft thA log file “example1.lis” will be generated after the simulation.

• “hspice job concluded” will be shown if the simulation is done properly.

Slide # 7

How to Run Hspice

• If you see error message something like the following,If you see error message something like the following, you should open the generated “.lis” file in order to check what is an error.

Slide # 8

Page 5: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

How to Run SPICE Explorer/WaveView

SPICE Explorer/WaveView provides a convenient graphical interface to display, analyze, and print results of Hspice simulations.

• Type “source /home/cad/synopsys_2007.12/testprofile” “You have to do this every time you want to startYou have to do this every time you want to start

SPICE Explorer/WaveView ”.• Type “sx &” for SPICE Explorer or “wv &” for WaveView

in a command prompt. A new window will be shown ifin a command prompt. A new window will be shown if your environment is set correctly.

SPICE Explorer gives an overview of the circuit your spice file describes and views the waveforms you p ysimulated.WaveView could only view the waveforms you

simulated. This tutorial will focus on WaveView.

Slide # 9

Start Window of WaveView

WaveViewWindow

Slide # 10

Page 6: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

How to Run WaveView

• Click “File” and “Import Waveform File” or use shortcut “ctrl+o”. An “Open Waveform Files” window will be shown.

Open WaveformOpen WaveformWindow

Choose “Waveform Files.*”

• Select “example.sw0” and click “OK” in Open Waveform window.

Slide # 11

How to Run WaveView

• After that, the waveform file will be shown.

Opened Waveform List

WaveformSignal

SelectionWindow

Waveform Browser

• Double click “i1(m1)” to open waveform.

Slide # 12

Page 7: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

Example 1

The following figures show an example regarding to NMOS Transistor DC Operation. Left one shows a schematic, and right one is a text file associated with the schematicright one is a text file associated with the schematic.

Slide # 13

Example 1

To create “.sp” file, open a UNIX Console Window and type “nedit” or “pico” in your command prompt Both of them arenedit or pico in your command prompt. Both of them are well-known text editors in UNIX environment.

After opening a text editor, type the previous example source code and save as “example1.sp”.

Next, run Hspice.

If the simulation is successful, run WaveView and check the result waveform.

Slide # 14

Page 8: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

Example 1

The following provides a brief explanation about the “example1 sp” source code:example1.sp source code:

• The first line of the source file can be read by Hspice asThe first line of the source file can be read by Hspice as a comment. However, WaveView reads the first line as the title of the simulation.

• There are 3 elements in the circuit: “m1”, “vgs”, and “vds” Note that Hspice syntax is NOT case sensitive;vds . Note that Hspice syntax is NOT case sensitive;

e.g. vgs=vGS=Vgs

Slide # 15

Example 1

• You should give each node a name. you can use any number for node name assignment or give somenumber for node name assignment or give some meaningful names for the important circuit nodes such as “vin” and “vout”.

• The node with name “0” is used as global ground terminalterminal.

• Please remember adding an empty line after “ end” inPlease remember adding an empty line after .end in the source file, otherwise Hspice will run abnormally.

Slide # 16

Page 9: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

Example 1

There is some useful information in the “.lis” file.

• Open the “example1.lis” file and check DC Operating Point and MOS Operation Information.

Slide # 17

DC Operating Point MOS Operation Information

Example 2

The following figures show an example of a source code and schematic for Differential Amplifier with Resistive LoadsLoads.

Slide # 18

Page 10: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

Example 2

The simulation result of Differential Amplifier with Resistive Loads.

Result from .DC Analysis

Slide # 19

Examples 2

Check DC operating point, transfer characteristics, and MOS operation information, using the “example2.lis” file.

DC Operating Point

Result from .TF Analysis

MOS Operation InformationTransfer Characteristics

Slide # 20

MOS Operation Information

Page 11: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

Appendix 1: What is a Source File?

An ASCII text file called source file is needed to use with Hspice. Usually the source file has extension “.sp”. However there is no limitation in the file extensionHowever there is no limitation in the file extension.

Normally the source file contains circuit descriptionNormally the source file contains circuit description, simulation options, and simulation control. Please refer to “Hspice Manual” for the use of Hspice syntax in the source file You could find some example source files in thisfile. You could find some example source files in this tutorial latter.

ASCII mode must be used to upload the source files from PC to your UNIX account, otherwise Hspice cannot read th fil tl

Slide # 21

the source files correctly.

Appendix 2Appendix 2

Hspice Manual - A Quick Start

Slide # 22

Page 12: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

Hspice Feature

Slide # 23

Type of Analysis

DC Analysis

Slide # 24

Page 13: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

Type of Analysis

AC Small Signal Analysis (1)

Slide # 25

Type of Analysis

AC Small Signal Analysis (2)

Slide # 26

Page 14: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

Type of Analysis

Transient Analysis

Analysis at Differential Temperatures

Slide # 27

Convergence

Slide # 28

Page 15: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

Input Format

Slide # 29

Circuit Description

Slide # 30

Page 16: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

Syntax of Hspice

This section provides a quick start of using Hspice, and syntax is simplified for beginner. Advanced and Detailed informationshould be referred to “Hspice Manual”should be referred to Hspice Manual .

Passive and Active Element

Slide # 31

Syntax of Hspice

Slide # 32

Page 17: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

Syntax of Hspice

Slide # 33

Syntax of Hspice

Independent Source Elements

Slide # 34

Page 18: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

Syntax of Hspice

Slide # 35

Syntax of Hspice

Slide # 36

Page 19: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

Syntax of Hspice

Dependent Source Elements

Slide # 37

Syntax of Hspice

Analysis

Slide # 38

Page 20: Hspice Tutorial - The University of Texas at Dallasmxl095420/EE6306/Hspice_Tutorial.pdf · HSPICE TUTORIAL Deppggartment of Electrical Engineering The University of Texas at Dallas

Syntax of Hspice

Slide # 39