Sue Example

Home
Sue
Sue Example
IRSIM
Netgen
Magic
Pplot
Mosis
Search
Contact

  • A Step-by-Step Example : Schematic of CMOS inverter

     

    In this example, we use basic Magic drawing command to layout the inverter.

    Start Sue from the Unix prompt:

     

    prompt> sue

     

    A window should come up which looks something like this

     

     

    Understanding the display window:

     

    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 you wish to edit. The "S" means that you are editing a "Schematic", as opposed to an ICON. Also, in parenthesis, you will see spice displayed. This means that you are currently in spice simulation mode.

     

    Down the right side of the window are several small Library List boxes. The top one 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 Library List Boxes (Lib List) are typically used to display the Icons for various library elements. In this example the mspice and devices libraries are shown.

     

    Drawing Schematic:

     

    Pull down the File menu and select new schematic. This will bring up the File Select box. Note that you could have also used the hot key Ctrl-n to bring up this menu as well. Save file as "inv", or any other name you like. Click the OK. You should now see "inv" in the upper right Schematic List box, and in the title bar at the top of the window. The title bar tells you that you are editing "inv".

    • Select "pmos"from mspice Lib List box. Move the mouse over the blank grey area in the middle and click left mouse button. This drops the PMOS into your schematic. Repeat procedure for "nmos".  You can use move command from Edit menu (or press m from keyboard) to move transistors in the blank area.

           You should see something like this:

     

           Notice that the numbers displayed (2 for PMOS and 1 for NMOS) indicate widths of the transistors.

    • To change width, double-click on the transistor and enter new width in W box. You can also name transistors in Name box.  Press Done. 

    • To connect transistors together, press w or select "Add wire" from Edit dropdown menu.  Select point from where you want to draw wire. Drag mouse over to other point and right-click on the other point to connect.

    • To add input and output, select "input" from device Lib List box.  Drop the input port into schematic. Connect input port to gates of both transistors. Double click on the input port and enter "in"or any other name for the input in the dialog box. Press Done. Repeat procedure to add output port by selecting "output" from device Lib List box.

           Your schematic should look something like this:

     

    • We need to connect M1 (PMOS) to Vdd and M2 (NMOS) to Gnd.  To add Vdd and Gnd, select "global" from devices list. Drop it into schematic. You can rotate it by pressing r or selecting "rotate" from Edit menu. Double-click on the global and name it as "Vdd". Connect M1 and Vdd using wire. Repeat procedure for adding "Gnd".

    •  To save the schematic, press Ctl+s or select save from File menu.

            This completes our inverter schematic. The complete schematic should look like this:

     

     


    Extracting Simulation Files

     

    Spice netlist:

    Select “SPICE Netlist” or press Shift+n from Sim menu on the panel. This will write spice netlist for you. You can run this netlist with HSPICE.

     

    .Sim File:

    Sue opens in Spice mode by default (indicated by (spice) on top). To generate .sim file, you need to tell SUE, and its netlister, that we want to use the IRSIM simulator, and as such generate a ".sim" file. To do this, select "change simulation mode" from the Sim menu. The Change Simulation Mode box should pop up. Click on "sim" for Netlist Type. Notice that Properties automatically updates. Click Done. To build .sim, press Shift+n or select SIM Netlist from Sim menu. This will build inv.sim file. Use IRSIM to simulate this .sim file and see if it is working the way you wanted it to be.


  • Oklahoma State University