The default account setup for the class should allow you to run HSPICE without any further configuration. To verify this, type:

Similar documents
Elad Alon HW #1: Circuit Simulation EECS 141 Due Thursday, Aug. 30th, 5pm, box in 240 Cory

Experiment 2 Introduction to PSpice

Introduction to PSpice

Engineering 3821 Fall Pspice TUTORIAL 1. Prepared by: J. Tobin (Class of 2005) B. Jeyasurya E. Gill

NGSPICE- Usage and Examples

Mentor Analog Simulators

ECE 201 LAB 6 INTRODUCTION TO SPICE/PSPICE

A Short SPICE Tutorial

ECE 532 Hspice Tutorial

1.3 An Introduction to WinSPICE

EECE 488: Short HSPICE Tutorial. Last updated by: Mohammad Beikahmadi January 2013

UNIVERSITY OF CALIFORNIA College of Engineering Department of Electrical Engineering and Computer Sciences

EECS 312: Digital Integrated Circuits Lab Project 1 Introduction to Schematic Capture and Analog Circuit Simulation

Introduction to Full-Custom Circuit Design with HSPICE and Laker

INTRODUCTION TO CIRCUIT SIMULATION USING SPICE

EECE 488: Short HSPICE. Tutorial. Last updated by: Mohammad Beikahmadi January Original presentation by: Jack Shiah

Introduction to SwitcherCAD

Simulation Using WinSPICE

MultiSim and Analog Discovery 2 Manual

Lab 3: Circuit Simulation with PSPICE

Laboratory Lecture 4

Introduction to Pspice

A Brief Handout for Introduction to

An Introductory Guide to Circuit Simulation using NI Multisim 12

Experiment #1 Introduction to SPICE

Well we know that the battery Vcc must be 9V, so that is taken care of.

Experiment #1 Introduction to SPICE

MOSFET: Mxxx nd ng ns nb modelname W=value L=value Ad As Pd Ps

Mor M. Peretz Power Electronics Laboratory Department of Electrical and Computer Engineering Ben-Gurion University of the Negev, ISRAEL

HSPICE (from Avant!) offers a more robust, commercial version of SPICE. PSPICE is a popular version of SPICE, available from Orcad (now Cadence).

Tsung-Chu Huang. Department of Electronic Engineering National Changhua University of Education /10/4-5 TCH NCUE

HSPICE. Chan-Ming Chang

WinSpice. The steps to performing a circuit simulation with WinSpice are:

Introduction to LT Spice IV with Examples

Lab 2: Basic Boolean Circuits. Brittany Duffy EE 330- Integrated Electronics Lab Section B Professor Randy Geiger 1/31/13

Introduction to SPICE. Simulator of Electronic devices

Lecture 7: SPICE Simulation

14:332:223 Principles of Electrical Engineering I Instructions for using PSPICE Tools Sharanya Chandrasekar February 1, 2006

Figure 1. Main window (Common Interface Window), CIW opens and from the pull down menus you can start your design. Figure 2.

SPICE 4: Diodes. Chris Winstead. ECE Spring, Chris Winstead SPICE 4: Diodes ECE Spring, / 28

Lab #2 First Order RC Circuits Week of 27 January 2015

Laboratory #2 PSpice Analyses

I1 19u 5V R11 1MEG IDC Q7 Q2N3904 Q2N3904. Figure 3.1 A scaled down 741 op amp used in this lab

Analog Electronic Circuits Lab-manual

Using LTSPICE to Analyze Circuits

ET 304A Laboratory Tutorial-Circuitmaker For Transient and Frequency Analysis

EE320L Electronics I. Laboratory. Laboratory Exercise #6. Current-Voltage Characteristics of Electronic Devices. Angsuman Roy

Chapter 12: Electronic Circuit Simulation and Layout Software

Introduction to NI Multisim & Ultiboard Software version 14.1

EE 320 L LABORATORY 9: MOSFET TRANSISTOR CHARACTERIZATIONS. by Ming Zhu UNIVERSITY OF NEVADA, LAS VEGAS 1. OBJECTIVE 2. COMPONENTS & EQUIPMENT

UC Berkeley, EECS Department

Tutorial #5: Emitter Follower or Common Collector Amplifier Circuit

Conduction Characteristics of MOS Transistors (for fixed Vds)! Topic 2. Basic MOS theory & SPICE simulation. MOS Transistor

Topic 2. Basic MOS theory & SPICE simulation

Conduction Characteristics of MOS Transistors (for fixed Vds) Topic 2. Basic MOS theory & SPICE simulation. MOS Transistor

University of Michigan EECS 311: Electronic Circuits Fall 2008 LAB 4 SINGLE STAGE AMPLIFIER

Simulation Guide. The notes in this document are intended to give guidance to those using the demonstration files provided for

ECEN 474/704 Lab 1: Introduction to Cadence & MOS Device Characterization

EXPERIMENT 12: SIMULATION STUDY OF DIFFERENT BIASING CIRCUITS USING NPN BJT

Circuit Simulation Using SPICE ECE222

Using LTspice a Short Intro with Examples

SIMULATION OF A SERIES RESONANT CIRCUIT ECE562: Power Electronics I COLORADO STATE UNIVERSITY. Modified in Fall 2011

.dc Vcc Ib 0 50uA 5uA

THE SPICE BOOK. Andrei Vladimirescu. John Wiley & Sons, Inc. New York Chichester Brisbane Toronto Singapore

Fig. 1-1 show the main window of Orcad Capture. Every project you work on will start from Orcad Capture. Fig. 1-1 Orcad Capture Main window.

Pulsed Power Engineering Circuit Simulation

ES 330 Electronics II Homework # 2 (Fall 2016 Due Wednesday, September 7, 2016)

PSpice Simulation. The target of computer-aided analysis is to determine the circuit currents and voltages everywhere in the circuit.

Prelab 10: Differential Amplifiers

PSPICE T UTORIAL P ART I: INTRODUCTION AND DC ANALYSIS. for the Orcad PSpice Release 9.2 Lite Edition

Lab 7 PSpice: Time Domain Analysis

Lab 5: Multi-Stage Amplifiers

EXPERIMENT 2. NMOS AND BJT INVERTING CIRCUITS

Experiment #6: Biasing an NPN BJT Introduction to CE, CC, and CB Amplifiers

Curve Tracer Laboratory Assistant Using the Analog Discovery Module as A Curve Tracer

Circuit Simulation with SPICE OPUS

Mentor Graphics OPAMP Simulation Tutorial --Xingguo Xiong

Experiment 10 Current Sources and Voltage Sources

EE 105 MICROELECTRONIC DEVICES & CIRCUITS FALL 2018 C. Nguyen. Laboratory 2: Characterization of the 741 Op Amp Preliminary Exercises

ELEC3106 Electronics. Lab 4: EMI simulations with SPICE. Objective. Material. Simulations

Page 1 of 7. Power_AmpFal17 11/7/ :14

The University of Evansville SwitcherCAD III Component Library

Modeling MOS Transistors. Prof. MacDonald

Lab 2: Discrete BJT Op-Amps (Part I)

EE 2274 RC and Op Amp Circuit Completed Prior to Coming to Lab. Prelab Part I: RC Circuit

PSPICE tutorial: MOSFETs

ECEN 325 Lab 7: Characterization and DC Biasing of the BJT

Common-Source Amplifiers

Phy 335, Unit 4 Transistors and transistor circuits (part one)

Lab 3: BJT Digital Switch

Week 9: Series RC Circuit. Experiment 14

Lab 3: Very Brief Introduction to Micro-Cap SPICE

Schematic and Layout Simulation Exercise

5.25Chapter V Problem Set

MOS IC Amplifiers. Token Ring LAN JSSC 12/89

Figure1: Basic BJT construction.

LTSpice Basic Tutorial

E B C. Two-Terminal Behavior (For testing only!) TO-92 Case Circuit Symbol

Chapter 8. Chapter 9. Chapter 6. Chapter 10. Chapter 11. Chapter 7

CHAPTER 6 DIGITAL CIRCUIT DESIGN USING SINGLE ELECTRON TRANSISTOR LOGIC

Transcription:

UNIVERSITY OF CALIFORNIA College of Engineering Department of Electrical Engineering and Computer Sciences HW #1: Circuit Simulation NTU IC541CA (Spring 2004) 1 Objective The objective of this homework is to give initial exposure to the circuit simulation software environment that will be used in this course throughout the semester. The Simulation Program with Integrated Circuit Emphasis (SPICE) was developed at UC Berkeley and is one of the most recognized circuit simulation programs. There are numerous books and web resources available for help using this program The supported simulation software for this class is HSPICE (netlist simulator) and its corresponding waveform analyzer, Awaves, both commercial implementations from Synopsys (formerly Avant!). Both of these programs are available on the Berkeley servers, to which all students in the course will receive accounts. If you cannot or do not want to use the Berkeley versions, you are free to use any SPICE software you have available to you but we may not be able to help you if you encounter problems. 2 Getting started 2.1 Verify your account is setup correctly The default account setup for the class should allow you to run HSPICE without any further configuration. To verify this, type: which hspice If it doesn t give an error like Command not found, then you should be ready to go. Additionally, SPICE creates a number of data files, so you should make a separate directory for it. You may want something like mkdir hw1 cd hw1 2.2 Describing a circuit in SPICE In this homework, you will simulate the circuit in Figure 1.1. This circuit is a simple Resistor-Transistor Logic (RTL) inverter using a Bipolar Junction Transistor (BJT). As an aside, this is probably the last time you will see a BJT in this class, since we will focus on MOSFET-based logic. In addition to the BJT

labeled Q1, there are two resistors, RB and RC, and two independent voltage sources, the circled VCC and VIN. The first step toward describing a circuit in SPICE is to label all the nodes. A node is any point in the circuit where two elements are connected. Nodes can be numbers or names, with the only restriction being that the circuit ground should be labeled 0 (ie. the number zero). As shown in the figure, the nodes are labeled: 0, in, base, vcc, and out. A SPICE file has four main components: a title, a set of models, a netlist, and a list of analysis commands. The title is always the first line of the file. Comments can be included elsewhere in the file by prefacing the line with an asterisk (*). The syntax of a SPICE netlist is simple. Just include a line for each element of the circuit. The format of this line depends on the type of element it is. Here s a quick list of the most common circuit elements and their simplified syntax (note that the plus sign is used to indicate the line is continued from the previous one): Resistor Capacitor Inductor Bipolar transistor MOSFET Independent voltage source Rname +node node value Cname +node node value [IC=initial_voltage] Lname +node node value [IC=initial_current] Qname collector_node base_node emitter_node model_name Mname drain_node gate_node source_node bulk_node model_name + [L=value] [W=value] Vname +node node [[DC value] [AC magnitude [phase]] [transient_value] The nodes are just the arbitrary names we picked earlier, but node connections are not enough to uniquely define some circuit elements. For example a BJT also has characteristics like NPN or PNP type, beta, Early voltages, saturation currents, etc. Model cards are separate descriptions of a particular kind of element that hold these characteristics. A model for the BJT is available in ~msheets/pub/ee141/npn.mod and also on the web site. In order to use this model, it has to be included in our SPICE deck (the terms card and deck are throwbacks to the days of punch cards). The transient_value input to a point source can take many forms, the most common of which is a signal pulse. The syntax for this is PULSE( V1 V2 [td [tr [tf [pw [period]]]]] ) where V1 is the initial voltage, V2 is the peak voltage, td is the initial delay time, tr is the rise time, tf is the fall time, pw is the pulse width, and period is the pulse period. We will use the PULSE command in the VIN voltage source to simulate a near-square wave input. The analysis section is used to tell SPICE what you want to simulate. The three main analysis types that are used most often are AC, DC, and transient. An AC analysis is used to examine the behavior of a circuit with frequency as the x-axis. For example, a filter transfer function could be simulated by sweeping from 1 Hz to 1 MHz and observing the Vout/Vin relationship. A DC analysis is used to examine the bias point of a circuit when swept over a variable. For example, the output of a circuit could be simulated as the supply voltage is changed from 2.5 volts to 5 volts or as the temperature varies from 70 degrees C to 100 degrees C. Lastly, the transient analysis is used to examine the behavior of a circuit over a period of time. This will be the most common case in this course. For this circuit, we will examine what happens in the first 30 ns of operation (saving data every 1 ns) when the input pulse on VIN is applied (transient analysis). We will also see what happens when the input is a voltage ramp from 0 to 5 volts with a step increment of 0.1 volts (DC analysis). Note that in a DC analysis the PULSE waveform is ignored, since it is a transient value.

The extra control information specifies how to write the output files (.options post) and to write the operating point of the circuit (.op) into the log file. Below is the entire SPICE file for this homework. Use any text editor (vi, pico, emacs, etc.) to enter it into a file called RTLinv.sp. Alternatively, you may copy the file cp ~msheets/pub/ee141/rtlinv.sp. already typed in, but please make sure you understand all the sections. If you are not using the Berkeley server, you also need to download the npn.mod card from the web site. RTLinv.sp: Simple RTL Inverter.include ~msheets/pub/ee141/npn.mod *netlist--------------------------------------- VCC vcc 0 5 VIN in 0 PULSE 0 5 2NS 2NS 30NS 60NS RB in base 10k Q1 out base 0 NPN RC vcc out 1k *extra control information---------------------.options post=2 nomod.op *analysis--------------------------------------.tran 1ns 30ns.DC VIN 0 5 0.1.END 2.3 Simulating the circuit HSPICE is run from the command line as follows: hspice RTLinv.sp >! RTLinv.out Upon proper completion of the simulation, you should see the following: info: ***** hspice job concluded If it instead says the job was aborted, you should use a text editor to examine the log file RTLinv.out for an error message. Correct the error, and then rerun the HSPICE command.

HSPICE creates a number of output files in the same directory as the SPICE deck: RTLinv.sp is the input netlist (your file) RTLinv.sw0 is the DC sweep data output. (used by awaves) RTLinv.tr0 is the transient data output. (used by awaves) RTLinv.out is the output listing from HSPICE. (look here for errors or text about the circuit) RTLinv.st0 is the simulation run information. (not useful) RTLinv.ic is the information about input to HSPICE (not useful) 2.4 Viewing the results of the transient analysis A separate program is used to graphically observe the output of SPICE. This program uses the Xwindows interface, so you must have an Xserver running on your local machine and have properly configured your user account. Start awaves by entering the following: awaves & Once awaves loads, click on Design/Open. This will open a menu to select which netlist file to display. Your netlist RTLinv.sp should be listed, otherwise, switch to the correct directory using the tab or the arrows. Once you have found your netlist, double -click on RTLinv.sp, which should open the Results Browser. To view the transient waveforms, click on Transient: Simple RTL Inverter and either double click on the waveform you wish to see or right click on the waveform and drag the wave with the center mouse button to the panel you want to display the waveform. Print the waveforms for in and out. 2.5 Viewing the results of the DC analysis Open a new panel for the DC waveform by clicking on Panels/Add. Return to the Results Browser or reopen by clicking Tools/Results Browser. Click on DC: Simple RTL Inverter and display the waveform for out. 2.6 Transforming the RTL gate into a pseudo-nmos inverter In this section, the bipolar transistor will be replaced with a MOS transistor with L=0.25u and W= 100u (refer to Figure 1.2)

First, include a model for a MOSFET transistor by replacing the.include line with the g25.mod library:.lib g25.mod TT A library is a collection of models. The TT on the end of the line specifies to use the Typical NMOS and Typical PMOS model for the transistors. Also available in this same library are Slow versions (SS), Fast versions (FF), and mixtures (SF) and (FS). For the purposes of this class, we will use only the TT version. In this library, NMOS transistors are named N and PMOS transistors are named P. Further edit MOSinv.sp to replace the BJT with a MOSFET: Delete: Q1 out base 0 npn Replace with: M1 out base 0 0 N L=0.25u W=100u Be sure to copy the g25.mod file to your working directory. You can download it from the web page or copy it on the Berkeley servers: cp ~msheets/pub/ee141/g25.mod. 2.7 Simulation and Analysis of the MOS inverter Repeat the analysis steps 2.3-2.5, this time using MOSinv.sp as the input file. 3 Report For your report, all that is required is the following: A printout of the SPICE input files Plot of the transient response of the pseudo-nmos inverter Plot of the DC transfer characteristic of the pseudo-nmos inverter