UNIVERSITY OF CALIFORNIA AT BERKELEY College of Engineering Department of Electrical Engineering and Computer Sciences EE105 Lab Experiments HSPICE Tutorial Contents 1 Introduction 1 2 Windows vs UNIX 2 1 Windows 2 1 1 Connecting From Home 2 1 2 Running HSPICE 2 2 UNIX 2 2 1 Software 2 2 2 Running SSH 2 2 3 Running HSPICE 1 1 2 2 3 3 4 4 3 Simulating Circuits in HSPICE and Awaves 3 1 HSPICE Netlist Syntax 3 2 Examples 3 2 1 Transient analysis of a simple RC circuit 3 2 2 Operating point analysis for a diode 3 2 3 DC analysis of a diode 3 2 4 AC analysis of a high pass filter 3 2 5 Transfer function analysis 3 2 6 Pole zero analysis 3 2 7 The measure command 3 3 Including another file 5 5 6 6 7 8 9 10 10 11 12 4 Using Awaves 4 1 Interface description 4 2 Deleting plots 4 3 Printing plots 4 4 Making a measurement 4 5 Zooming 4 6 Updating a panel 13 13 13 13 13 13 14 5 Syntax Reference 1 14 Introduction This tutorial was written specifically for the EE105 course at UC Berkeley It outlines how to run HSPICE in Windows and UNIX then delves into the details of creating netlists simulating them and using Awaves to plot the results The appendix to this document serves as a syntax reference that may be useful throughout the semester HSPICE is just a program that takes in a netlist a simple text file containing a circuit description and analysis options and outputs the analysis it has done on that circuit An HSPICE netlist typically has a sp extension for example circuit sp Although HSPICE produces many output files the only one that 1 2 WINDOWS VS UNIX 2 you will need to look at is the file with a lis extension for example circuit lis This file contains all of the important results from the HSPICE analysis operating points measurement results error messages everything is in this file Typically after simulating a circuit it s best to check this file first to ensure there were no errors in your netlist The other files that HSPICE generates are used by Avanwaves or Awaves for short Awaves is a program that allows you to graphically plot the results of the analysis that HSPICE did You have to explicitly tell HSPICE to generate the extra files that Awaves needs and we ll show you how to do that in this tutorial Generally when you run Awaves you ll open the sp of the circuit you analyzed Awaves will automatically find the analysis files that it needs and allow you to plot the results of the analysis that you specified in the netlist You can create netlists in any text editor that you like Notepad and Wordpad are common options under Windows and Emacs Vim and Pico are common options under UNIX In this tutorial I m going to assume that you re familiar enough with one of these text editors to use it proficiently under your operating system of choice Most likely you all understand Notepad and or Wordpad If you are working under UNIX and are not familiar with either Emacs Vim Pico or some other text editor I would highly recommend using Pico for now as it is the simplest to use 2 Windows vs UNIX There are two versions of HSPICE you will encounter at UC Berkeley the Windows version and the UNIX version Although any netlists you create will work on both versions using HSPICE in these different operating systems is quite different Both the UNIX and Windows versions are available in the lab and from home This section of the tutorial will show you how to run HSPICE in all of these environments Windows or UNIX at home or in lab 2 1 Windows If you re working in the lab you can skip the Connecting From Home portion of this section Just login to a computer and jump directly into the section on Running HSPICE 2 1 1 Connecting From Home In order to use HSPICE from home in Windows you will need to have Windows XP Professional or a newer version of Windows installed This is because running HSPICE requires the use of a feature called Remote Desktop Connection which is only available on Windows XP Professional and later versions of Windows Follow these instructions to run Remote Desktop Connection 1 Click Start All Programs Accessories Communications Remote Desktop Connection Remote Desktop Connection will start 2 Click Options Local Resources Check the box at the bottom that says Disk Drives Click Options 3 In the Computer box in Remote Desktop Connection type iserver1 eecs berkeley edu Click Connect 4 Login to your EE105 instructional account your named account will also work here The remote Windows desktop will start and you will appear to be working on a lab machine remotely 2 1 2 Running HSPICE We re going to go through a sample HSPICE simulation and analysis in Awaves in order to teach you how to run these programs 1 Start Notepad You can do this either by clicking Start Run typing Notepad and hitting Enter Or you can click Start Programs Accessories Notepad 2 3 WINDOWS VS UNIX 2 Copy the text in Figure 1 into Notepad exactly as it is written this is what we call a netlist EE105 SPICE Tutorial Example 1 Simple RC Circuit vs vs gnd PWL 0s 0V 5ms 0V 5 001ms 5V 10ms 5V r1 vs vo 1k c1 vo gnd 1uF tran 0 01ms 10ms option post 2 end Figure 1 A simple RC circuit netlist 3 Save this file into a folder called Tutorial Name it rccircuit sp Note To ensure the filename has a sp extension be sure to select All Files in the Save as type listbox You can put the filename in quotations if you want to be extra careful 4 Click Start Programs HSPICE V 2004 03 SP1 Hspui V 2004 03 SP1 This is called the HSPICE UI HSPUI for short a graphical user interface to HSPICE Although you can run HSPICE and Awaves individually HPSPUI puts HSPICE Awaves your netlist and the HSPICE output the lis file mentioned earlier in a convenient panel for easy access 5 Click Open and select rccircuit sp using the file browser You ll see that HSPUI automatically picks out the title and picks an output file called rccircuit lis also in the Tutorial directory 6 Click Simulate to simulate the circuit HSPUI will open HSPICE for you and run your netlist through HSPICE producing rccircuit lis and other output files used by Awaves 7 Click Edit LL to view the output from HSPICE This file contains information about the analysis done by HSPICE Typically you would look here for measurement results operating points and error messages You should see no error messages at this time If you do check to make sure you copied the netlist exactly as shown in Figure 1 Once you ve verified there are no error messages close the output …
View Full Document
Unlocking...