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.
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.
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.
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. )
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
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.
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.
Now we want to run the simulation. From the main palette, select
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
If the simulation is incorrect, you should go back to DA and fix
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
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
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
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.
Use of Accusim is covered in another tutorial.
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
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
Note: you can see the delay in the change of
output for the corresponding change in input.
Another way to do simulation is to use the
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.
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
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:
//Set the input as a clock.
After creating the do file, start QuickSim
and OPEN SHEET the desired cell. Then select
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.
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.