Beruflich Dokumente
Kultur Dokumente
1. Start Qsim
From version 11.1, Quartus II provides another simulating tool called Qsim. Qsim is
bundled with both subscript edition and web edition of Quartus II.
Not like the previous simulating tool that provided by Quartus II before version 11.1,
Qsim can not be started directly from Quartus. Users need to run command “quartus_sh
--qsim” from a command window, or in a DOS environment, to invoke Qsim simulation
tools.
When launch the command “quartus_sh --qsim”, make sure the “quartus_sh.exe”
program is either in the current working directory, or in one directory that is included by
the environment Path variable. For example, for web edition Quartus II version 12.0sp1,
the “quartus_sh.exe” program is installed by default under directory of
c:\altera\12.0sp1\quartus\bin. Users either need to go to the above mentioned directory to
launch Qsim, or need to modify the “Path” system environment variable to include the
above mentioned folder so the Qsim can be launched when command prompt is under
any folder.
1): Once Qsim is started, click File>Open Project… . This will pop up an “Open a
Project” window. Then open the Quartus project by choosing a .qpf file in the Quartus
project folder. (Figure 3)
Figure 1: Change Environment Variables
2): Click File>New Simulation Input File to launch waveform editor tool to create input
waveforms for simulation. (Figure 4)
3): Users may need to set up simulation end time by choosing menu command Edit>Set
End Time… from the Waveform Editor window. User may also need to check the option
of “Snap to Grid” from the same Edit menu to make it easier to draw the input
waveforms. (Figure 4)
4): Insert the input and output nodes of the circuit to be simulated by using “Node
Finder” utility. This is done by following these steps: Click Edit>Insert>Insert Node or
Bus… in “Simulation Waveform Editor” to open the “Insert Node or Bus” window. In
the “Insert Node or Bus” window, click button “Node Finder…” to open window “Node
Finder”. In the “Node Finder” window, select an appropriate filter type from the “Filter”
list box, then click the button “List”, this will make the filtered nodes shown in the
“Nodes Found” box. Selecting the nodes to be simulated in the “Node Found” box, and
then use the button “>” to add them to the “Selected Nodes” box. Then click OK close
windows. (Figure 5)
5): Create waveforms for input signals to be used for simulation. After finishing
selecting the nodes to be simulated, users are left with a Waveform Editor window with
selected nodes’ names on the left and their waveforms on the right side of the window.
By default at this stage, the input signals are straight lines of value 0, and output signals
are of unknown values and are marked with a series of X.
If the “Snap to Grid” option has been selected, users can use mouse to select one or more
grid of area of a input signal, and then use tool of “Forcing Low” or “Forcing High” on
the tool bar to create a nice signal waveform. Users can change the grid size by clicking
Edit>Grid Size…. An easy way to create a input waveform is to select an input signal
first by clicking its name on the left side of the window, then click the “Overwrite
Clock” icon on the tool bar, then specify appropriate values for clock period, offset and
duty cycle.
The order of the nodes can be changed by moving them up and down. This is done by
selecting a node and dragging it to a new position.
5. Start Simulation
Start simulation by click Processing>Start Simulation in Qsim window, or click the “Start
Simulator” icon on the tool bar.
Two online PDF tutorial documents are available through the Help menu of Waveform
Editor. One is for VHDL users and another is for Verilog HDL user. The tutorial PDF
document for Verilog users can also be downloaded from the following URL:
ftp://ftp.altera.com/up/pub/Altera_Material/11.1/Tutorials/Verilog/Quartus_II_Simulation
.pdf