EE 564

 

 

Home
Up
DRC Rules
Getting Started
Unix Basics
Overview
DA Tutorial
Quicksim Tutorial
IC Station Tutorial
Accusim Tutorial
Extraction Tutorial
Layout Editing Tips
Hierarchical Design
Mentor FAQ

Related Links
Dr. Mason's Web
UK EE Dept.
UK CoE
UK Home

 

Quicksim Tutorial

This document contains a step-by-step tutorial for simulating an inverter in the Mentor Graphics application Quicksim II.  It covers and the use of 'do' files.  Separate documents continue the tutorial for other Mentor applications.

Opening Quicksim

Digital Simulation

Opening a List Window

Simulation with Dofile


Opening Quicksim

After you have created your schematic, you need to test is functionality by using the digital simulator application Quicksim II.  Go to a command prompt in a command terminal and make sure you are in your working directory and have used the 'swd' command (you only need to use swd once per session, but if you log out, make sure you type this command again before starting a mentor application).  Type the command

        > quicksim <cellname>/ami05 &

where cellname is inv for this tutorial.  

Back to Top  |  Tutorials Page  |  564 Home


Digital Simulation

Once QuickSim II has started, you will want to open your schematic sheet. Then, you will force the inputs and run the simulation to observe the outputs. You will learn how to do a functional test (unit-delay) and a delay simulation. The following steps will guide you through an analysis of your circuit.

  1. From the palette on the right, select
            OPEN SHEET
    and select your inverter cell to open the schematic sheet. If you used the
            > quicksim <cellname>/ami05 &
    command to start Quicksim, you can skip the OPEN SHEET command because your file will already be opened.  However, once in Quicksim you can use this command to open additional sheets.

  1. Next, you need to specify the signal that will be applied to the input(s).  Mentor calls this a force.  First, specify which signal is to be "forced'' by selecting the signal with your mouse.  Simply click on the in port in your schematic.  You should see the wire turn white indicating that it is selected.

NOTE: The default size for the schematic window is sometimes too small to be readable. If this is the case, you can enlarge the window and/or make the schematic fill the window. To make the schematic fill the window, type Shift+F8. You can see from the function key palette at the bottom of the screen that this key is assigned the command ``View All.'' Optionally, you could make the schematic window active and type “view all”. You see that a command window pops up as you type (see Figure 1). Both actions result in the schematic filling the schematic window. (These are also useful in Design Architect and other design tools.)

Figure 1

HERE

  1. Now, from the right-hand main palette, select
        STIMULUS
    to display the stimulus palette.

  1. Next, select the
        ADD FORCE
    icon to add the forces to the selected signal.  The dialog box shown on the right will appear. Make sure the selected signal is in the 'Signal name' in the dialog box.  Note, since we want to create a clock signal on the input, you could have also use the ADD CLOCK icon.

  1. The box lets you enter value-time pairs. As you enter pairs, the dialog box expands to let you enter more pairs. DO NOT use the Enter key between fields; use the Tab key. Enter accepts the values in the dialog box and closes it. Input the following value-time pairs: 
        (0,0), (1,10), (0,20), (1,30), (0,40).

  1. Click on 'OK' to dismiss the dialog box. If the 'OK' button is off the screen, use the TAB key to move to it or press the Enter key to accept the dialog box. 

7.  Now we need to specify which signals to trace.  Select the desired input(s) and output(s), which for this tutorial is in and out.   From the main palette, select
    TRACE

8.  If you want to add additional signals to the trace window, select them in your schematic and then press TRACE palette button. To remove signals, select the signal and press the 'Delete' key on the keyboard.

9.  If you cannot see all of the signals in either the trace or list windows, resize the windows so you can see them all.

10. Unselect all signals with the F2 Function key.

11. Now we want to run the simulation.  From the main palette, select
    RUN > For Time
and enter a time value of 50 ns.  After running the simulation, the trace and list windows will show the results of the simulation run.  In the trace window, you can use the Shift+F8 key to view the entire simulation. You can zoom the Trace window with the '+' and '-' keys on the number keypad (not the main keyboard).  In the window, you can scroll up/down and left/right to view the time of interest. The trace window also allows viewing a certain area by using the VIEW AREA command from the pop-up window in the trace window. You will see that all of the input are tested (1 and 0, in this case) and the output should be the inverter function.  Also note that the output is a dotted line as opposed to the solid lines of the inputs.  This is because the MOSFET produce a resistive logic level.  This is weaker than the forced logic levels of the inputs as the output could combine with other resistive signals to produce a new logic level (as you do with tri-state outputs wired together).

12. If you want to analyze the simulation result, you made add a cursor at a specific time. To do this, from the main palette, select
    DBG GATES > ADD CURSOR
In the dialog box, enter a cursor name (any name) and a specific time. You may use the mouse to drag the cursor to another time position.

13. If the simulation is incorrect, you should go back to DA  and fix your circuit at this time.  If you need to change the wiring on the top level of your schematic, you will need to exit and then restart QuickSim II.  If only the models change (e.g., you change transistor size, etc.), you can use
    File > Load > New Models > All
without exiting QuickSim II.

14. Once the simulation is working, you can save your simulation including your setup, state and waveform.  For now, all we want to save is the waveform which you can do by selecting
    File > Waveform DB > Save 
In the next window, select "results (default)" and type a name for your file, then press 'OK' leaving all other options as their default.  For this tutorial, save your simulation results as '<username>_hw5' in the /class/ee564/save directory by entering
    /class/ee564/save/<username>_hw5
in the box titled pathname.  You won't need to save simulation results for every cell you simulate, but you will need to save some results for Homework problems.  Note: you can also save your waveform by clicking SAVE WDB icon under the stimulus palette. 
To open waveforms that have been saved, choose
    File > Load > Waveform DB
and use the Navigator to choose your waveform file leaving all other options as default, then press 'OK'.  (Note, you may not be able to read files from the /class/ee564/save directory, but you can view any waveforms you save in your home directory).  In the window that opens, choose the waveform names you wish to display and press the TRACE button on the right-hand palette.  The desired waveforms will be displayed.

15. Finally, you can exit QuickSim II. However, for this tutorial, before you exit, do the steps in the next section to see another way to view your simulation results.

Generally, we would also want to also simulate our circuit in the analog simulator, Accusim, before going to the layout step. Accusim is the analog simulator and it will show you rise/fall times and effects caused by different length and widths of your transistors. Hence, while the digital simulation may show that your circuit works functionally, the analog simulator might show that it does not meet delay or rise/fall time requirements due to the actual transistor parameters.  Use of Accusim is covered in another tutorial.

 

Figure 2

Back to Top  |  Tutorials Page  |  564 Home


Opening List Window

Simulations result can also be viewed in table format from the list window rather than viewing waveforms in the trace window which were explained in the section above. 

To get the list window, just select the inputs and outputs and press the LIST palette icon. The results in the list window are displayed in a table form with the values of the input and output to be either 0,1 or X (don't care) and the corresponding time. Whenever a signal changes value, it will be highlighted in green.  

Note: you can see the delay in the change of output for the corresponding change in input.

Back to Top  |  Tutorials Page  |  564 Home


Simulation With Dofile

Another way to do simulation is to use the dofile Although not really necessary for simulating the simple inverter, this can greatly simplify more complex simulations.  It is recommended that you try this on your inverter cell to practice the use of dofiles.

First, you have to create a file called <name_file>.do.  In the do file, reset the simulation, add traces, set force and run the simulation.  These are shown in an example file below which you can pasted into a text file and save to run with your inverter:

EXAMPLE DOFILE
//Prepare the simulation
reset state -discard
del traces -all
del forces -all

set radix binary

//Add traces through do file instead of manually
add trace in
add trace out

//Set the input as a clock. 
set clock period 20
force in 0 0 –r     //signal in starts from 0.
force in 1 10 –r   //in will rise to 1 After 10ns
 
//run the simulation for the given time (in nsec)
run 50

After creating the do file, start QuickSim and OPEN SHEET the desired cell. Then select
    ADD FORCES > From File
input your dofile name and press 'OK'.  QuickSim will simulate the circuit based on your dofile.  Alternatively, you can type the command 'dofile <name>.do' while Quicksim is active and your mouse is resting over the Quicksim window.  This will automatically open a pop-up command window which will run the dofile.  NOTE: Some people have had trouble with the ADD FORCES approach, but just typing the command works reliably.

Back to Top  |  Tutorials Page  |  564 Home