Electric Tutorial 1 – Schematic entry and DC behavior

 

The only way to become a good chip designer is to design chips. This is the first tutorial in which you will use the Electric VLSI Design System to design the 8-bit MIPS microprocessor described in the CMOS VLSI Design book. The tutorials will guide you through mastering schematic entry, layout, simulation, and verification of a complex system. Chip design is a very time-consuming activity, so certain portions of the processor will be provided for you to reduce the tedious work and to illustrate good design style. The design you do in each tutorial will form a component of the microprocessor, so careful work on each tutorial will save you time at the end.

 

This lab guides you through transistor-level circuit design and SPICE simulation. You will draw and simulate schematics.

1.   The Electric VLSI Design System

 

Integrated circuits have become sufficiently complex that Computer-Aided Design (CAD) tools are essential; nobody could design a 100-million transistor chip by hand on a schedule that would complete the chip while it was still interesting. We will use CAD tools for schematic entry, layout, simulation, and verification. Unfortunately, no CAD tools are perfect.

 

The leading industry-standard tool is made by Cadence. It normally sells for six figures per seat, but is available at extremely generous discounts to universities. However, it runs only on Unix and is nearly a full-time job to setup and maintain. Mentor Graphics, Avant! (now Synopsys) also produce professional CAD tools of a similar nature.  The Tanner tools run on NT and are easier to support, but cost more than Cadence for universities! The freely available Magic and Sue tools are popular at many universities, but Magic again is limited to Unix and has a primitive, albeit powerful, user interface. All of these tools have their fair share of bugs.

 

The Electric VLSI Design System is a computer-aided design tool developed by Steve Rubin. It has powerful notions of connectivity, runs on Windows, Unix, and Macintosh, and is very well integrated. It is also GNU-licensed so you may freely download your own personal copy and even modify the source code. The drawback is that many features of Electric are still in development, so the tool crashes more often than you would like and sometimes does unintuitive things. These tutorials are written for Electric 6.08ac (Feb. 24, 2003), which is available precompiled for Windows on the web page.  You may also download newer versions and versions for different operating systems from www.staticfreesoft.com, but the tool changes quickly enough that you are likely to encounter incompatibilities.  Electric has been rewritten in Java since these tutorials were developed.  The new version has many improvements but is not compatible with these tutorials.

 

Be sure to save often so you do not lose too much work.  While Electric rarely corrupts libraries, it is wise to periodically create backups of your library just in case.

 

2.   The WinSpice Simulator

 

For Spice simulation we will use WinSpice which is an off-shoot of the original Berkeley Spice 3. More information at http://www.ousetech.co.uk/winspice2

3.   Getting Started

 

First please download the electric and WinSpice executables from the class web page (under Materials). Make sure you uncompress electric and install WinSoft. Also copy the mipsparts.elib library from the class web page to your account and rename it to Tutorial1_xx where xx are your initials. This library contains many parts of the MIPS processor that are provided to you. You will add your new designs to the library as you work through the tutorials.  Do not modify the parts that were already provided lest you break them in ways that will not become apparent until you put the entire system together.

 

Double-click on Electric to start the program. Dismiss the splash screen. The manual is available for download on the class web page and online at www.staticfreesoft.com. Skim through the following sections:

 

Chapter I: 1-2, 6-9

Chapter II: 1-6

Chapter III: 1-12

 

Don’t worry if it doesn’t all make sense yet. After you complete this tutorial, go back and skim over the sections that you initially found confusing. Refer back to the other chapters of the manual as you need help with specific features of Electric.

4.   Schematic Entry

 

Your first task is to create a transistor-level schematic in order to get some nice IV curves as described in class and in the textbook. Each design is kept in a facet; for example, your schematic will be in the IVcurves{sch} facet. Choose File · Open Library to open your lab1_xx library. Choose Facet · Edit Facet to bring up the Facet dialog. Click New Facet. Enter IVcurves as the facet name and schematic as the view. A new editing window will appear with the title Tutorial1_xx:IVcurves{sch} indicating the library, facet name, and view.

 

 

Electric defines various technologies for schematics and layout. To draw transistor-level schematics, you will need to select the Analog Schematic technology by choosing Technology · Change Current Technology and selecting the schematic, analog technology. This technology file contains basic circuit elements such as transistors, resistors, capacitors, and power and ground.

 

Your goal is to draw a gate like the one shown in Error! Reference source not found.. This schematic represents 5 transistors for which you set the Vgs voltage to 1V, 2V, …5V, and the Vds to 5V and then plot the IV characteristics. Choose Windows · Toggle Grid to turn on a grid to help you align objects. Also zoom out (Windows · Zoom Out)  to fit more in the window.  Left-click on an nMOS transistor symbol in the components menu on the left side of the screen. Left-click on your schematic window to drop the transistor into your layout. Repeat until you have 5 nMOS transistors, and the triangular ground symbol arranged on the page. You may move the objects around by left-clicking and dragging. The transistors default to a width/length value of 2/2 (0.6um length and width for a lambda of 0.3um). Double-click on the nMOS transistors and change their width to 5 (1.5um for lambda of 0.3um).

 

 

Then we need to add the voltage supplies for the 5 Vgs, Vds, and the extra 5 0V supplies used just to be able to plot currents. The voltage supplies are not on the components menu so do Edit · New SPICE Part · DC Voltage Source. You will get a warning message about units having changed, press Use new units to get rid of it. Left click on the schematic window and you will get the symbol for a voltage source:

 

Now you can simply copy (or duplicate) this voltage supply 10 times (you still need to use the menu, you cannot use the mouse buttons which are used for making connections). You will also need to rotate (Edit · Rotate · 90 Degrees Clockwise) as needed (please note the polarity of the voltage sources.

 

Now, make the connections. Left-click on a port such as the gate, source, or drain of a transistor. Right-click on another port to create a wire connecting the ports. Continue until all the blue wiring is completed.

 

Now we need to set-up the correct voltages for the power supplies for Vgs and Vds. Click on the text Voltage = 0V in the middle of the symbol and edit the value 0 to become 1V, …5V accordingly.

 

 

 

Now it’s good if we name the power supplies with meaningful names, such as Vdd, gs1,… gs5, ds1…ds5, dd (no need to have a V in front of the name as this is automatically added by the tool). Double click on each supply and edit the name. Click Apply after each part, and OK at the end.

 

 

This is what you should get.

 

 

 

Use File · Save (Ctrl-s) to save your library. Get into the habit of saving often because Electric crashes fairly often. Also, learn the keyboard shortcuts for the commands you use frequently. If you get a window about new library file creation like below also click Save.

With this we are almost done with the schematic proper. Now we need to prepare for simulation, we’ll us another tool called WinSpice for that. First we need to generate the Spice netlist for WinSpice. We could edit the netlist manually for WinSpice, but to reduce the amount of manual intervention let’s add a few more “components” to our schematic. I wrote “components” because these are not actual circuit elements, but rather abstractions that will get translated into Spice commands. First we want to indicate that we want a DC simulation, do Edit · New SPICE Part · DC Analysis and place the “part” on your schematic. Then click on the Parameters=null and edit the null part to show Vdd 0 5 0.1 (this means we will sweep Vdd from 0V to 5V in 0.1V increments).  Then let’s add 2 more Spice “cards” (commands) to tell Spice that we want to display IV curves. Go to Tools · Simulation (SPICE) ·  Add SPICE Card and add the following commands:

.PRINT DC I(Vds1) I(Vds2) I(Vds3) I(Vds4) I(Vds5)

.PLOT DC I(Vds1) I(Vds2) I(Vds3) I(Vds4) I(Vds5)

.INCLUDE ami06n.m

(please note the . in front of the .PRINT and .PLOT commands, it has to be entered as it is part of the SPICE syntax).

 

 

 

 

 

Now we are finally ready to generate the SPICE deck. Go to Tools · Simulation (SPICE) ·  SPICE Options… and make sure you have the right options chosen (Spice 3 engine, Spice level 3, Standard output, etc.).

 

Now let’s generate the SPICE deck, go to Tools · Simulation (SPICE) · Write SPICE Deck , change the file type to .cir (not the default .spi, WinSpice expects .cir) and press OK

 

Now we can start the simulation by double clicking on the IVcurves.cir icon.

 

You should get a window like this:

 

In order to get familiar with Spice you should first read the tutorial and manual available with WinSpice (in Windows, Start · All Programs · WinSpice · User Manual).

It’s useful to see the SPICE deck generated by electric, in order to do that you can type: edit IVcurves.cir at the WinSpice prompt. A Notepad window should look like this:

 

Now we can finally simulate! Go to File Open on the WinSpice window menu and choose IVcurves.cir

 

Click Open, and if there are no errors you will get (miracle!) a set of nice IV curves. Congrats!

 

Now after all this work let’s try to get the same results with a much simpler circuit. This will show you the value of continuously learning the tools. Open a new schematic facet, let’s call it IVcurves2, then enter the schematic below. The critical difference from the previous example is that we only use one transistor, and the DC analysis is slightly more complex as it sweeps both Vgs and Vds.

 

Generate the Spice deck as before and run WinSpice, you should get the same results as before.

 

That’s all for today folks!