Lab - 06 - Timing Simulation & Design Implementation (Combinational Logic)
Lab - 06 - Timing Simulation & Design Implementation (Combinational Logic)
Islamabad
Digital System Design LAB
Name of Student:
Roll No.:
Date of Experiment:
Marks obtained:
Remarks:
Instructor’s Signature:
2. Resources Required
• A Computer
• Xilinx ISE
• Spartan 2 or Spartan 3 board
3. Introduction
Xilinx is the largest vendor in the programmable logic market. Its FPGAs are the most widely
used in the world. Currently its FPGAs are divided mainly in 3 families: Virtex-7(most
powerful), Kintex-7(mid-range) & Artix-7(least powerful) where 7 represents the current
generation. Initially there were only two, High Power (Virtex series) and High Volume
(Spartan Series). Spartan 3 has been one of the most widely used FPGA ever made and
currently many educational institutions use it to teach Digital Logic Design to its students.
a) Spartan 2
Synthesis and Design Implementation are two keywords that have been interchangeably used
to define the same process. In essence, Synthesis is a generic term used to explain this process
for programmable logic devices while Design Implementation is the term specifically used
by FPGA vendors like Xilinx to explain the same process.
Timing (post-Place and Route) simulation is a highly recommended part of the HDL design
flow for Xilinx® devices. Timing simulation uses the detailed timing and design layout
information that is available after Place and Route. This enables simulation of the design, which
closely matches the actual device operation. Performing a timing simulation in addition to a
static timing analysis will help to uncover issues that cannot be found in a static timing analysis
alone. To verify the design, the design should be analyzed both statically and dynamically.
Note: Timing Simulation is done once the Design Implementation has been completed.
4.2 UCF (pin locations file – created using PACE- PinOut Area Constraints Editor)
a)Spartan 3E b)Spartan 2
5. Design Implementation
a) Spartan 3E Starter Kit (Digilent Inc. – programmed through USB port)
1. Open Xilinx ISE. Goto File/New Project. Create a new project named Mux4x1. Choose
HDL as top-level source type.
4. Add a new Verilog Module and write the code, mentioned above, in it.
6. Open Assign Package Pins under User Constraints. Choose Yes on the next Dialog box to
get the following window.
7. Everything on the board is connected to the FPGA. The pin locations (pin-outs) can be
seen on the board under the respective item (in brackets) e.g
8. Enter the values as mentioned in the UCF file given in the previous section. (Students are
strongly encouraged to try their own combinations)
9. Save the file and chose XST Default < > in the next dialog box.
10. Run (or Rerun) by right-clicking on the Synthesize – XST then Implement Design then
Generate Programming File.
11. Before programming the FPGA, it is recommended that you perfom Timing Simulation
first. (See next section for instructions)
12. Open Configure Device (iMPACT) under Generate Programming File. Use first option
(JTAG) and press finish to add your device automatically to iMPACT.
14. Right click on XC3S500E and choose Program. Click on OK and you device is
programmed as indicated by XC-Done LED (it glows) on the board.
15. The PROG button can be used to remove configuration from the FPGA manually. The
XC-Done LED stops glowing after pressing the PROG button. You can reprogram the FPGA
using Step 14.
The process is identical to the steps used for Spartan 3 kit barring a few steps. XESS Corp.
provides XSTOOLs for configuring their boards. It has GXSTEST & GXSLOAD which run
separately from Xilinx ISE.
1. Run GXSTEST and choose XSA-200 and click TEST. The device must successfully pass
the test. Check the connections if it fails.
2. Open Xilinx ISE. Goto File/New Project. Create a new project named Mux4x1. Choose
HDL as top-level source type.
5. Follow Step 4 to Step 11 given for Spartan 3E. For pin-out values you have to check the
constraints file XSA+XST3-pins.xls. A sample UCF file is given in the last section.
6. Run GXSLOAD and choose XSA-200. Goto the project directory and locate Mux4x1.bit.
Drag the the file to GXSLOAD and drop on FPGA/CPLD.
7. Click on load and your device is programmed as indicated by DP pin of main 7 Segment
display of the board. This board also has a PROG button which removes the configuration
from the board manually.
2. If after saving your Verilog module file, it doesn’t appear in the Implementation mode, check
other modes to find it. It is usually placed in Behavioral Simulation mode.
3. When found, right-click the file, choose its properties and change Association from
Simulation Only to Synthesis/Imp + Simulation.
4. If not found in any mode then it might not be added to the project, right click your project
and choose Add Source to add the file to your project manually. Make sure to choose the right
Association in the dialog box that appears after adding the file.
4. Go back to the Implementation mode and follow the remaining procedure for your issued
board.
2. Create a file named Stimulus with type as Test Bench Waveform. Finish this task and in
the next dialog box choose Combinational under Clock Information. Change nothing else.
3. In this file, you can set values of inputs as you like. Experiment a bit!
4. In the Processes tab, run Xilinx ISE Simulator/Simulate Post-Place & Route Model.
Home Work:
Implement a 2x1 Mux on Spartan 3E board. Also perform its timing simulation. Submit the
code, synthesis report and wave files in the next lab. Implementation will be checked in the
next lab.
Hint: Only your code and UCF will change a little bit, the rest of the process is same.
Note:
a) This assignment must be submitted before the next lab.
b) The assignment submitted must be in proper format as instructed by the teacher to get
maximum marks.
c) Marks will be deducted on late submissions.
d) Cheating or using any unfair means will award ZERO marks.
Q.3 Write the names of all the processes involved in logic synthesis.
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________