|CS552 Course Wiki: Spring 2008||Main »
Getting started with Mentor
On this page... (hide)
Getting started with Mentor
This file is based on a previous text written by Ashish Thusoo (for CS552 Fall '97), Phil Atkinson (for CS552 Fall '96 and Spring '97), Avinash Sodani (for CS552 Fall '95 and Spring '96), Andreas Moshovos (for CS552 Spring '94), Subbarao Palacharla (for ECE552 Fall '94), Todd Bezenek (for CS552, Spring '98, Fall '98, and Spring '99), Raghav Kaushik (for Fall '99), Sony Pham, Bhavesh Mehta (Fall '03), Saurabh Goyal (for CS552 Fall '04), Andy Phelps (for CS552 '05), and Derek Hower (for CS552 '06).
The Mentor Graphics system is a complete, integrated package for digital system design, simulation and IC layout. In addition, it has a variety of tools related to Printed Circuit Board (PCB) design and analysis. For purposes of CS552, we are interested in the schematic capture and simulation of digital circuits capabilities of Mentor. The components of the system we are going to use are:
The current version of Mentor Graphics is supported on Intel/linux(RedHat 9 and later releases) and SPARC/Solaris 8 (and later releases).
If you do not know what shell you are running skip instructions in the grey box.
Put the following at the end of your
setenv MGC_HOME /s/mentor/MGC_HOME-2004 setenv SDD_ROOT /s/mentor setenv SDD_HOME /s/mentor/2004 setenv ADK /s/mentor/adk setenv MGC_WD $HOME/mentor setenv MGC_LOCATION_MAP $HOME/mentor/.location set path = ($path /s/mentor/bin /s/mentor/MGC_HOME-2004/bin /s/mentor/adk/bin)
Now type the following to your shell (start in your home directory):
% source .cshrc % mkdir mentor % cd mentor % cp /u/k/a/karu/courses/cs552/spring2008/downloads/.location .location
Design Manager or
The window at the center is the navigator window which you can use to browse the filesystem. Since Mentor uses files to store the ob jects of your designs these appear as icons in the Navigator window.
Finally the window on the right side provides shortcuts to various menu options. Depending on which window is currently active it will provide shortcuts to the actions available. If either the Tools or the Navigator window does not show up you can click at the corresponding icons to open a copies of them.
Pressing the mouse's right button opens a menu whose options depend on where the cursor is located. For example you can turn on the scroll bars of the Tools window using the corresponding option. The left mouse button is used to perform actions. For example, in the Tools window, double clicking on a tool icon invokes that tool. We will explain the use of the middle button when talking about Design Architect.
Do not use shell commands to move or copy design objects! Use
Design Architect or
Here are few points regarding
The first thing you need to do if you have not already created a schematic sheet is to open a new one. To do so click on the Open Sheet icon in the session window or alternatively do File > Open > Sheet. Note that while the cursor is over the session window you can use the right mouse button to add scroll bars etc. Due to some bug in the software you might find the Session window blank. To fix this problem, press the right mouse button in the window and select Show Scroll Bars or Hide Scroll Bars.
You will be asked to provide a name for your design in the dialogue box that appears. Enter the name in the Component box (see the Overview file for an explanation of the relations between components and sheets). Include your full path in the name, i.e. if you want to name your design as and_gate then type your_home_path
Then a new window will appear titled:
Schematic#1 and_gate sheet1
This is the window in which you will do the actual drawing. Note also that the session pallette has changed to schematic_add_route which provides shortcuts to various commands that are used in drawing schematics. There are more icons available. To access them press the mouse's right button while the cursor is on the pallette and turn on the scrollbars.
Commands are available from the Session pallette icons or through the menu bar. Common commands include:
Note that all these commands can be activated using function keys also.
To place a component like an AND gate in your design you must first select a library that contains it. For our purposes gen_lib (generic library) is the most useful one. You can see what libraries are available and open them by clicking on the library icon in session pallette. Alternatively, you can see the available libraries by doing Libraries > MGC Digital Libraries > Display Libraries Pallette. The session pallette changes title to "MGC Digital Libraries." Again you have to activate the scrollbars. Using the vertical one search for the "gen lib" option. Note that library names appear in alphabetical order. Click once on the "gen_lib" option and the session pallette will change to "gen_lib" providing you with access to the various components of "gen_lib."
To instantiate a component, for instance
We will now draw the wires for our simple design. To draw a wire you have to access the "Add" menu. Go over the schematic window and click the right button. A menu titled INSTANCE will pop up. Walk down the "Other Menus" option and select the "Add Menu" option. In place of the "instance" menu a new one called "Add" will appear.
To connect the components choose Add > Wire option. Click on a pin ( with mouse's left button) to start the net, and click once to place a vertex, or to connect to another pin. Double click to end the net. Alternately, you can use function key F3 to start the net.
After drawing, press ESC or click on cancel to stop drawing wires.
This will be helpful in making corrections like deleting ob jects, moving them around etc. To select an ob ject click (mouse's left button) on it once and to remove it from to the current selection click on it again. To add other ob jects to the current selection click on them once. Selected ob jects are indicated by being drawn with white dashed line segments.
You can select all ob jcts within an area by dragging out a rectangle with the left button.
Edit > Unselect > All is very useful for unselecting everything. Func- tion key F2 does the same.
You can delete by: Edit > Edit Commands > Edit operations > Delete or using the Delete icon of the session pallette. Similarly you can copy or move objects by : Edit > Edit commands > Edit operations > Copy(or Move) and drag to the new location. You can also use the Copy/Move icons in the session pallette.
To complete our design we have to specify its inputs and outputs. To do so we have to use the "gen lib" parts "portin" and "portout". You can also access them through the menu in the symbol window: Active Symbol Window > Symbol History [c-H] > List. Alternately, you can get them from "gen lib"( see Instantiating Components). You will notice that each "portin" and "portout" has a text label which reads "NET" for every instance. These need to be changed to unique names. To do this open the Schematic menu (right button over the schematic win- dow) and do a Other Menus > Property/Text Menu > Change Val- ues. A Dialog box will appear. Enter as many net names as there are portins and portouts. When you click OK, you will be prompted to click on the nets one at a time. Click on the first label ("NET") to rename it to the first signal name you typed into the dialog box. Continue doing this until all "NET"s have been converted to the names you specified.
You can check if there are any errors in your schematic by doing a Check > Sheet >With Defaults. A new window will appear after a while reporting what the automatic checker has found. This is called a Report window. If your schematic is ok then you should get "
Now that your design is complete you have to save it. For saving the sheet choose File > Save Sheet. If this option is not available then make the schematic window active by clicking once on it.
To print the currently active window (the topmost window with cyan bor- ders) in
Pull down the menu on the left side of the title bar of the schematic window (box with a line in it) and select "Close."
Pull down the menu on the left side of the title bar of the Deisgn Architect window and select "Close".
Find the QuickSimII icon in the Tools window of
From the Setup window click on the "OPEN SHEET" icon or alternatively choose File > Open Sheet. A dialog box will appear with a selection of available sheets. Select your "and_gate" sheet by clicking on it so to to inverse the colors and then click on the OK button. A new window will appear with your schematic in it.
To prepare to view signals you have to specify which of them interest you. You can select a signal by clicking on the wire leading into the port. When you've finished making your selection choose Add > Traces > Selected from the menu accessed through the right button while in the Schematic window. This will cause a Trace window to appear at the bottom of the screen.
Alternatively you can choose Add > Traces > Specified then click on the "Named Signals" button of the dialog box that will appear. You will be then asked to type the names of the signals you are interested in.
Traces correspond to probes placed in your design. Signal stimuli are called "Forces" in QSII. To add a single force, choose Force > Single Value. . . by pressing the right button in the Schematic window. Enter the signal name that you want to stimulate, and specify the value that it should take (0 or 1), and enter the start and stop times ( by default in nanoseconds) to indicate when it should take the aforementioned values. You can force multiple values onto a signal by choosing the Force > Multiple Values. . . menu. Once again, enter the signal name and a list of force values and "times". The time specifies the instant at which the corresponding force value should be applied. Alternately, you can click on the "Stimulus" button in the Session window and then use the ADD FORCE icon to add forces to signals.
You can force clock on a signal choosing Force > Clock. Once again, you enter the signal which you want to put a clock waveform onto. Enter the period of the clock, and the two transition times and values within the clock period. For instance, for a 100ns clock with 50% duty cycle, enter 100 as period, value 1 at time 0 and value 0 at time 50. Clock are alternating signals.
Now that you have traces and forces set up, you are ready to run the sim- ulation. This is done by either clicking on the "Run" button of the Session window or by Run > Simulation, and specifying how many nanoseconds to run the simulation. Alternately, you can simply type "run nnn" with cursor inside the QSII window, where nnn is the number of nanoseconds to run the simulation. You will see traces appear in the trace window.
Choose the Run > Reset. . . menu. Click on the "State" button to reset the state of the simulator back to time=0. If you do not want the results to be saved then uncheck the Save "results. . . " button. Click OK to reset.
You can save any forces you have entered in one of two ways: as a Waveform Data Base (WDB) or as a Force File. A WBD is a compact, binary representation of any set of waveforms. A Force File is human-readable text file which describes what signals are stimulated at what time. You can also create a Force File using any text editor and load it with Force > From File. . . .
To save your forces choose File > Save > Waveform DB. From the dialog box that will appear you can choose the type of the file that is going to be saved.
For printing choose: File > Print > Active Window. Use
When you are done simulating, you can quit QSII by pulling down the menu in the title bar (box on the upper left corner) and choosing "Close."
Hierarchical design is a technique used to simplify the design of the large circuits. For example, to build a 32 bit adder it is easier to construct the adder using 32 full adders. In this section we discuss how to create a symbol for a part that you have designed and then use that symbol to build large circuits.
Suppose you have created a symbol of a full adder and want to use it as the building block when designing the schematic for the 32 bit adder. This can be done by selecting the Choose Symbol icon in the session palette of the Design Architect. Select the symbol you want to instantiate and press OK.
Buses let you represent multiple signal lines without drawing each one of them. This helps in efficient design creation and representation.
On a schematic sheet, you may be required to run individual lines from the bus to either another bus or a component. The easiest way to do this is to just connect the named bus to another wire or bus as normal. A box will prompt you for the bits you want to rip. Enter that value. Doing this takes advantage of the Automatic Ripper. To do the same thing by hand, you nee a component called a bus ripper. This component is available in "gen lib" under the submenu "rip". To connect individual lines of an n bit wide bus you have to use the nX1 ripper. After instantiating the ripper you can go back to the "gen lib" menu by selecting "Back" in the palette window.
To connect the ripper to the bus follow the steps below:
Mentor uses the middle button in an very interesting way. Go over any window and press it. While keeping it pressed try to draw a question mark without a dot. You should see a red line that follows your trace. A help window should pop up...
|Page last modified on January 28, 2008|