02 ISE Design Suite 14.7 Tutorial
02 ISE Design Suite 14.7 Tutorial
02 ISE Design Suite 14.7 Tutorial
In the course you shall use the Xilinx ISE Environment to simulate, synthesize and
implement your designs.
Xilinx Environment
GUI/Environment: Xilinx ISE 14.7
VHDL Simulator: ISim or ModelSim Student Edition 10.4a
Synthesis: Xilinx XST 14.7Implementation: Xilinx ISE 14.7
Note: Xilinx ISE Webpack 14.7 requires special start-up procedure when used with
Windows 8 or Windows 10.
1. Option 1: When you install Xilinx ISE, it gives you the option to run either 32 or 64-bit
version of the tool. Along with that, it gives you the Command prompt utility to invoke
any of the two versions of ISE. Open utility for the 32-bit version and type ise to start
this version. This procedure will ensure the error free operation of the tool during
simulation, synthesis and implementation.
Option 2: Follow the complete guidelines (file 03 Get Xilinx ISE Webpack 14.6 to work
on Windows8.pdf). The original text refers to ISE Webpack 14.6 and Windows 8, but it
also works for ISE Webpack 14.7 and Windows10.
To work on your PC/laptop, download and install Xilinx Webpack 14.7 following the steps
described in the file 01 ISE Design Suite 14.7 Installation Tutorial.pdf.
(e.g.:C:\Modeltech_pe_edu_10.3c\win32pe_edu\modelsim.exe).
Family : Spartan6
Device : XC6SLX4
Package : TQG144
Speed Grade : -3
Simulator : ISim
Click Finish
Your project should contain at least 1 VHDL source file for your design and 1 VHDL
testbench file. You can:
Use your favorite editor to create the VHDL sources (design + testbench) and then add
them to your project
Create the VHDL sources (design + testbench) from within ISE and then add them to
your project.
To add VHDL sources to the design, right click at the name of the FPGA device (e.g.,
xc6slx4-3tqg144) under Hierarchy and select Add Source. Choose files for the project.
In this tutorial you shall use files fulladder.vhd and its testbench fulladder_tb.vhd.
The next window shows you the files being added to the project and their status.
Then click OK. Your project has been defined. Your project consists in a design
(fulladder.vhd) and in its testbench (fulladder_tb.vhd).
The source file containing the entity myfulladder and its architecture is displayed in the ISE
environment, and in the Hierarchy tab appears as Top Module for the current design.
Remember, in projects containing multiple source files, if one accidentally changes the top
module entity, you can reset it as a top module by right click on a source in Hierarchy, and
select Set as Top Module.
Attention: the parent of the myfulladder entity in the hierarchy is formed by the properties
of the FPGA target device. With this Xilinx environment setup, you must see xc6slx4-
3tqg144. If it does not coincide, this means that you have probably skipped step 6.
Make sure that the proper VHDL libraries are included in the source file header. You now
have 2 alternatives:
1. Edit the VHDL Source Code
2. Use VHDL Language Templates
Then follow the Save, Check, Synthesize & Display steps.
Double click to view its internal organization. You should recognize at least a part of
the declared entity. This is a first method to verify that your code is correct and
implements the desired circuit. Simulation is the topic of a further Section.
Read this schematic as follows:
The 2-input a_b_AND_1_o1 gate implements ab
The 2-input Mxor_a_b_XOR_1_o1 gate implements a XOR b
The 2-input cin_ a_AND_2_o1 gate implements cin(a XOR b)
The 2-input cout1 gate implements ab + cin(a XOR b) that is equivalent to bcin + acin +
ab, i.e. the carry-out
The 2-input Mxor_sum1 gate implements (a XOR b) XOR cin, i.e. the sum.
You have now created the VHDL source for the myfulladder project with no errors.
As an alternative you can create your own testbench file and add it to your project. This
section shows how to create a new test bench file and modify it by editing it with
statements from fulladder_tb.vhd. Follow these steps:
1. Highlight your project as seen in the figure below and then click on the New Source
button
2. In the new dialog box that appears, select VHDL Test Bench from the list of file types
and enter myfulladder_tb as the file name
The default location is the current project directory and can be left as is. Ensure the Add to
Project box is selected and click the Next button. You will then see a screen with your file
name associated to the simulation.
Verify the information in the next few dialog boxes and click Next then Finish.
A new file will be associated with your project in the Hierarchy pane (myfulladder_tb.vhd)
and a skeleton VHDL file with new information will be shown in the Workspace panel on
the right hand side of the screen.
7. Edit the VHDL testbench file. Notice that the entity is already there and that the
architecture is partially filled (the component declaration and instantiation and the interface
signals, though not compliant with the standard used in the course (signalname_s) are
already there). As the design is purely combinational, there is no need for the clock
process. Just paste the stimuli found in fulladder_tb.vhd in the stim_proc process. As an
alternative, open Language Templates by selecting the menu Edit Language
Templates. Navigate in the hierarchy +, to the coding examples: VHDL Simulation
Constructs. Select the desired component in the hierarchy, then right click Use in File.
This step will copy the model code to your source file at the place of your cursor.
If you attempt to close the testbench file in the Workspace panel on the right hand side of
the screen a new window will pop as seen below. Press Yes to ensure you save the file.
Now that you have a testbench in your project, you can perform behavioral simulation on
the design using ISim. The ISE software has full integration with ISim. The ISE software
enables ISim to create the work directory, compile the source files, load the design, and
perform simulation based on simulation properties.
In the view you have either Implementation or Simulation highlighted. Use the
Implementation mode when you want to design a circuit in VHDL. Switch to Simulation
mode when you want to simulate your design.
Clicking on the designs name in Implementation mode opens the VHDL file of the
design.
In this tutorial we will only look at and use Behavioral Simulation (i.e., prior to synthesis).
Behavioural Simulation
ISim is a simulation tool integrated into Xilinx ISE. You can use ISim to debug and verify
your designs.
Click on the radio button for Simulation. Then highlight the top level Testbench. Then
double click Simulate Behavioral Model in Processes Menu.
ISim should now be running, and you should see a window similar to the following:
Move the cursor close to time 0 and zoom in (F8, see later for view commands) until you
obtain a suitable view like the next one:
signals
buses
Running Simulations
You can run a simulation using the simulation toolbar:
Waveform Format
If the timescale of the waveform is such that you cannot read the values of some of the
signals. To zoom in, use the Zoom toolbar:
With more complicated designs, your waveforms will often contain a large number of
signals. To keep your waveform organized and readable, you may wish to group related
signals together. To do so, select the signals you wish to group, right-click and select
New Group
The result is a group of signals that can be hidden when not being used and visible when
needed. Give a name to the new group, e.g. outputs in this case. You can also create
dividers to classify signals. Dont forget to name the new divider:
You will often want to measure the duration of an event, or the time between two events.
One way to do this is by using markers. Markers serve as reference points and can be
used to measure time intervals. The commands in the marker toolbar are:
1. Create Marker
2. Move Cursor to Previous Marker
3. Move Cursor to Next Marker
Clicking on a placed marker will display the time relative to that marker. In the example
below, you can see that signal sum_s stays high for 20 ns. We measured this by placing a
marker when the signal rose to 1 and another one when it fell to 0.
A shortcut is to click on the waveform at the desired time and then drag the mouse curson
to the end point of the interval.
Take a print out by choosing any third party tool to create a PDF file of the waveform.
Here is a sample of the waveform output saved in the PDF file.