SUE TUTORIAL - Version 4.1


This document is based on the complete SUE Tutorial.  SUE will simplify your transistor layouts for homework problems and the project.

Table of Contents

SUE Features

Getting Started

Starting Up Sue

Drawing A Schematic Running HSPICE



SUE Features This tutorial will carefully walk you through these features.

Getting Started

1. After logging in to your local workstation, log in to quasar:

% ssh quasar.cs.berkeley.edu

2. Set up your account with the proper paths and environment variables by using the "mmisetup" command:

% eval `/usr/local/etc/mmisetup`

3.  Setting up the tutorials

The manufacturer has provided tutorials for the software, which come with some sample input files. The tutorial files for SUE can be found in the directory /usr/local/mmi/tutorials/sue. If you want to run more tutorials besides this one, you will want to copy them into your account in order to modify them; you can do this in one step by running

% cp -r /usr/local/mmi/tutorials/sue ~

This will create a "sue" directory in your home directory, which will contain the tutorial files for SUE. Once you've copied the files, in SUE, you can use the Tutorial option in the Help menu to access the directions for the respective tutorials.

Starting Up SUE

Now you can run SUE just by typing 'sue' on the command line. A window should come up that looks something like this:

Figure 1.  SUE Window

SUE Screen Layout

On the very top of the window the title bar should say:

              SUE: no_name S <path_to_cell> (spice)

"no_name" means that you have not specified the file (schematic) you wish to edit. The "S" means that you are editing a "Schematic", as opposed to an ICON.  Also, in parenthesis, you'll see spice displayed. This means that you are currently in spice simulation mode.

Next across the top you should see the menu bar which contains the following menu items: File, Edit, View, Sim and Help.     These are pull down menus much like any Mac, or PC application.

Directly to the right of the Help menu is the "SUE Info Bar". It currently says "Welcome to Micro Magic SUE (MMI_SUE4.1.5)". Note that the 4.1.5 refers to the version of SUE you are running.

Icon Library List Boxes

Down the right side of the window are several small Library List boxes.
The top one is the Schematic List Box. This lists all current schematics that have been loaded into SUE. Currently only no_name should be listed.

The next box is the Icon List Box. This Icon Library List box typically displays all of the Icons SUE has loaded for your current schematic. It should be blank for now.

The next two (sometimes only one) Library List Boxes are typically used to display the Icons for various library elements. These are sometimes referred to as "Lib List" boxes in this document. In this example the mspice and devices libraries are shown.

Scroll bars are shown across the bottom and right side of SUE (and are found in the List boxes). These work like the scroll bars in most other applications.

The Help Menu

 Figure 2: Help Menu

Hold down the left mouse button (Button- 1) and drag the cursor over to Help menu and then release the left mouse button. This  will bring up the Help Menu which contains the complete on-line SUE manual. It also contains "about SUE", the "MMI       documentation guide" about all MMI tools and software in distribution, the SUE FAQ, bug reporting and this tutorial!

In addition to providing detailed information on all of SUE's commands, modes, and features, the SUE manual explains the philosophy behind SUE. After finishing this tutorial you should read through the manual. In fact, it would be very useful to read the sections on SUE Philosophy and Selection at this time.

              TIP!    Going back to the Help menu, when you hold down the left mouse button (Button-1)
              over the Help menu, notice that there is a dotted line just before the "about SUE" menu
              item (not shown in the above figure).

              If you release the button while over the dotted line the menu will "tear off". The menu
              then works like any other Xwindow (window manager dependent). It iconifies by clicking
              the little triangle in the top left corner. You can move it by clicking and holding down
              the left mouse button (Button-1) over the top title bar and dragging it around (release
              button to stop). Or you can close the window by holding down the right mouse button
              (Button-3) over the top title bar and selecting Close from the menu that pops up.

              TIP!    You can also just click on the Menu items and the pull down will stay down until
              you click on the desired item.

For now close the Help menu.

Drawing A Schematic

OK, we are now ready to draw a schematic using SUE. We are going to draw a CMOS inverter. The circuit we are going to draw is:

Figure 3: Simple SUE Schematic

Creating a New File

First we will name this file.

              INFO:   Many SUE menu items have "hot" key options for frequently used commands. This is
              to make your work go a lot faster as you get more familiar with SUE.

Once you have popped up the File Select box, a blinking cursor appears in the highlighted "Filename:" area (at the bottom of the dialog box).

Beginning the Schematic

Now to draw our schematic.

Be careful NOT to click the middle mouse button (Button-2) in the Library List box as it will bring up the ICON for editing. Notice that an M has appeared to the left of the "CMOS_inverter" name in the Schematic List box. This tells you that you have modified the current schematic.

If you tried to quit SUE it would first ask you if you wanted to save your changes. Go ahead, try it.

Selecting and Editing Objects

SUE lets you do lots of interesting things to the selected object. For example, let's take the nmos transistor you just dropped and rotate it.

To do this make sure the nmos is selected. The transistor should be a different color, i.e. blue, if it is selected.

              TIP!    You can also type u for "undo" to undo your last action. SUE gives you 100
              levels of undo!

You can also move, flip, duplicate, and modify the transistor. All of these features and more are found under the Edit menu. Edit menu features work on the selected object or objects. Once again, you can use either use the menu or the handy hot keys.

OK, let's try another Edit option.

You can also change the properties of the transistors by simply double clicking the left mouse button (Button-1) on the ICON. In fact, double clicking on any object allows you to change its properties.  Change the width, "W", of the nmos to 1, and the width of pmos to 3.  These units are expressed in microns.

Figure 4: Edit Properties pop-up for nmos transistor

The  "input" and "output" ICONs label nodes in your circuit.  To change the input node label, double click on the input icon and type "in".

The "global" ICON generates a global signal for programs like HSPICE.  Duplicate the global icon and label one of them with "gnd", the other "vdd".

Since you have done some work you should now save your circuit.

Do this by selecting Save from the File menu, or type the hotkey ctrl-s.

            INFO:   Vdd and gnd will not only work for SPICE but will also generate the current
            levels (1 or 0) for IRSIM and Verilog.

Your schematic should now look something like:

Figure 5:  Inverter Schematic

Wiring Up the Circuit

     We are now ready to wire up the circuit.

              TIP!    Oh, by the way: You might have noticed that SUE puts a white X at the nearest
              port to your wire. If you like that location then simply double click the left mouse
              button (Button-1) and SUE will wire it up for you.
Figure 6: Wiring by Touch

              TIP!    If at anytime you are in a mode and something goes wrong, you can type Ctrl-c to
              abort that mode. For example, if your wire isn't going the way you want it to, typing
              Ctrl-c will abort that wire.

              TIP!    You should notice that to the right of the Help menu in the menu bar the SUE
              Info bar will tell you what each item will do in that mode. In fact, the SUE Info bar
              gives you lots of help. As you run the mouse down the menu items in the menu bar, it
              tells you what each of them does. For example, click the left mouse button (Button-1) on
              Edit then run down the menu items. Notice that add text says "Add text into the current
              cell". Try it!

         Before going on to the next section save your schematic (hotkey: ctrl-s).

Running HSPICE

Under the "Sim" menu, select "spice netlist".  The netlist of your circuit will be generated in a file called CMOS_inverter.sp.  The contents of the file will look like:

* FILE: CMOS_inverter.sp

* SPICE netlist for "CMOS_inverter" (generated by MMI_SUE4.1.11)

* start main CELL CMOS_inverter
* .SUBCKT CMOS_inverter in out
M_0 out in vdd vdd p W='3*1u' L=lp_min ad='areap(3,sdd)' as='areap(3,sdd)'
+ pd='perip(3,sdd)' ps='perip(3,sdd)'
M_1 out in gnd gnd n W='1*1u' L=ln_min ad='arean(1,sdd)' as='arean(1,sdd)'
+ pd='perin(1,sdd)' ps='perin(1,sdd)'
* .ENDS $ CMOS_inverter

.GLOBAL gnd vdd
.END

Comments are denoted by lines that begin with a *.  The netlist shows the two transistors of the inverter, M_0 and M_1.  The parameters "ad", "as", "pd" and "ps" refer to the area and perimeter of the source and drain - they will be discussed later.  In order to SPICE this circuit, use your favorite editor to add the lines given in red below.
*FILE: CMOS_inverter.sp

* SPICE netlist for "CMOS_inverter" (generated by MMI_SUE4.1.11)

* start main CELL CMOS_inverter
* .SUBCKT CMOS_inverter in out
M_0 out in vdd vdd p W='3*1u' L=lp_min ad='areap(3,sdd)' as='areap(3,sdd)'
+ pd='perip(3,sdd)' ps='perip(3,sdd)'
M_1 out in gnd gnd n W='1*1u' L=ln_min ad='arean(1,sdd)' as='arean(1,sdd)'
+ pd='perin(1,sdd)' ps='perin(1,sdd)'
* .ENDS $ CMOS_inverter

.GLOBAL gnd vdd

Vin in 0 2.5               *input bias
Vdd vdd 0 5                *supply voltage

.INCLUDE '140model'        *source the .MODEL
                           *file and other
                           *paramaters

.OPTION post=2 nomod        *format the output

.OP                        *print the DC operating
                           *point
.DC vin 0 5 .1             *a DC sweep to look at
                           *the transfer function
                           *(Vout vs. Vin)

.END

Follow these instructions to run HSPICE, then plot the the DC transfer characteristic with awaves.  Your plot should look like:

Figure 7.  DC Transfer Curve of CMOS_Inverter