Docsity

Using Xilinx ISE Tools for Logic Circuit Design: A Lab Guide for ECE 241 Students, Lab Reports of Electrical and Electronics Engineering

Toggle sidebar
bg1
ECE 241
Logic Circuit Lab Lab #2; Page 1/4
Spring 2004
Using the Xilinx ISE Tools
Due: By 6:00pm on Wednesday February 18.
1 Introduction
You can build moderately complex logic circuits of up to several hundred gates wiring the SSI and MSI
IC’s together using methods building on what you saw in Lab 1. However, in practice, engineers rarely
use these methods unless the circuit is fairly small and simple.
Instead logic synthesis programs are often used. The logic circuit can input from a truth table, a
circuit schematic (best for smaller circuits), or using a hardware description language (HDL). Operation
of the circuit is then simulated to make sure the logic design is correct. The next step is typically to
either design a custom VLSI IC (usually only justified for high volume applications or applications
with specialized requirements), or programmed into either a field programmable gate array (FPGA) or
a complex programmable logic device (CPLD). We will learn more about the inner function of FPGA’s
and CPLD’s later on in the semester.
In this lab we will learn how to use the Xilinx Tools to implementand simulate logic circuit designs
from a schematic. We will also learn how to download a design onto the FPGA on the Digilab Boards in
Lab 3.
2 The Xilinx ISE Tools
2.1 Getting a Copy of the Tools
The Xilinx tools are installed on all of the lab stations in the Digital Logic Lab in room 216 Buchanan
Engineering Lab, and you will be able to do all of the lab work needed for this course there.
However, you will find it very useful to install Xilinx tools on your own PC so that you can draw
schematics, perform simulations, and answer the preliminary questions withoutcoming to the lab.
The latest version of the Xilinx SW, both the full and student versions, is 4.2i. You may have re-
ceived the correct student version with your textbook for COE/EE 243. If not, then you may down-
load a free, compatible version from the Xilinx web page. Go to http://www.xilinx.com/
and click on Products, then select Products & Solutions : Design Resources: Free
ISE WebPACK. Schematics produced with this software are compatible with the lab software. An ex-
cellent tutorial for using the WebPACK software is availableat: http://www.xilinx.com/univ/
Beginners_Bk.pdf. Please note: schematics produced under the older software (4.Xi) are not com-
patible with the newer software.
Two useful, although not always current, web sites are the Xilinx University Program web page,
http://university.xilinx.com, and the Xilinx University Resource Center, http://www.
xup.msu.edu.
pf3
pf4

Partial preview of the text

Download Using Xilinx ISE Tools for Logic Circuit Design: A Lab Guide for ECE 241 Students and more Lab Reports Electrical and Electronics Engineering in PDF only on Docsity!

Logic Circuit Lab Spring 2004

Using the Xilinx ISE Tools

Due: By 6:00pm on Wednesday February 18.

1 Introduction

You can build moderately complex logic circuits of up to several hundred gates wiring the SSI and MSI IC’s together using methods building on what you saw in Lab 1. However, in practice, engineers rarely use these methods unless the circuit is fairly small and simple. Instead logic synthesis programs are often used. The logic circuit can input from a truth table, a circuit schematic (best for smaller circuits), or using a hardware description language (HDL). Operation of the circuit is then simulated to make sure the logic design is correct. The next step is typically to either design a custom VLSI IC (usually only justified for high volume applications or applications with specialized requirements), or programmed into either a field programmable gate array (FPGA) or a complex programmable logic device (CPLD). We will learn more about the inner function of FPGA’s and CPLD’s later on in the semester. In this lab we will learn how to use the Xilinx Tools to implement and simulate logic circuit designs from a schematic. We will also learn how to download a design onto the FPGA on the Digilab Boards in Lab 3.

2 The Xilinx ISE Tools

2.1 Getting a Copy of the Tools

The Xilinx tools are installed on all of the lab stations in the Digital Logic Lab in room 216 Buchanan Engineering Lab, and you will be able to do all of the lab work needed for this course there. However, you will find it very useful to install Xilinx tools on your own PC so that you can draw schematics, perform simulations, and answer the preliminary questions without coming to the lab. The latest version of the Xilinx SW, both the full and student versions, is 4.2i. You may have re- ceived the correct student version with your textbook for COE/EE 243. If not, then you may down- load a free, compatible version from the Xilinx web page. Go to http://www.xilinx.com/ and click on Products, then select Products & Solutions : Design Resources: Free ISE WebPACK. Schematics produced with this software are compatible with the lab software. An ex- cellent tutorial for using the WebPACK software is available at: http://www.xilinx.com/univ/ Beginners_Bk.pdf. Please note: schematics produced under the older software (4.Xi) are not com- patible with the newer software. Two useful, although not always current, web sites are the Xilinx University Program web page, http://university.xilinx.com, and the Xilinx University Resource Center, http://www. xup.msu.edu.

Logic Circuit Lab Spring 2004

3 Using the Xilinx ISE Tools

Unfortunately, the specifics change with each version, but the basic steps remain the same.

3.1 Schematic Entry

We will start out using the schematic editor to enter our design and then we will simulate it.

The basic process is as follows:

  1. Click on the Project Navigator to start the software.
  2. Select File - New Project. Assign a project name, and for project location, use d:\projects
    . You may have to create the folder for your projec in the d:\projects directory if Xilinx gives an error stating the folder cannot be found. Next, under the Device Family value, select Spartan2, then for Device value, select xc2s30-6tq144. Finally, select Design Flow value as XST VHDL and click okay.
  3. Next, select Project - New Source. Select schematics as the source type. Type in the filename making sure you don’t use VHDL keywords or operators. Now in the Project Navigator, double click on the schematic entry in the project tree which will open up the schematic capture tool.
  4. From the palette on the right you can select logic gates and symbols.
  5. Don’t forget to add the input and output buffers to your inputs and outputs, respectively. These are needed to map to the FPGA. Leave space for wires.
  6. Select Add - Wires and Input/Output markers to add wires and I/O Terminals.
  7. Save your design and then select Tools - Check Schematic to check your design.
  8. Once you are done you can minimize or close the schematic.
  9. Next you are to synthesize and implement your design. The synthesis tool is run using the process menu by double clicking on the Synthesize branch or by right-clicking on Synthesize and selecting Run. Be sure to check the output window for error messages.
  10. Once you have synthesized the design without errors, you can implement the design by double- clicking on the Implement Design branch or right-clicking and selecting Run.
  11. Now you are ready for functional simulation. The functional simulation allows you to verify the logic of your design but does not include any actual delays because the design has not been mapped onto an FPGA at this stage.
  12. In the Project Navigator window select New Source -^ Test Bench Waveform and assign the input combinations. Now save the waveform for the number cycles desired to run.

Logic Circuit Lab Spring 2004

B Implement as AND-OR network C Implement using all NAND gates D Compare your functional simulation against the truth table for the two implementations of the function. E Compare timing results for each and comment.

6 Schematic Conversion

The following is given as a guide to convert Xilinx 5.1i schematic documents to version 4.Xi which is used in the lab. You probably won’t need to use this, but in case you are using a Xilinx 5.1 compatible tool (such as the Free Webpack tools or the Xilinx 5.1i student version that can be purchased through Prentice-Hall publishing).

  1. Open the schematic in a text editor such as Notepad.
  2. Change the first line from ’Version 6’ to ’Version 5’
  3. Use the find & replace function to replace all the quotations ( ” ) in the file with nothing.
  4. Put quotes around the device name on line 3 ( Make sure it says ”spartan2” ) ( this should be the only instance of quotes in the file ).
  5. Delete all of the lines corresponding to Display commands in the file - the new software uses a different method to display so this is not needed anymore. Some of the display commands are one-liners, but some are multiple lines starting with ”BEGIN DISPLAY” and ending with ”END DISPLAY”. Make sure the single line display references are deleted and for the multiple line display commands, everything from ”BEGIN DISPLAY” to ”END DISPLAY” must be deleted - this means all the commands between these keywords also.
  6. Delete the last 2 values from all the IOMARKER commands. As an example, if you find a line that has ”IOMARKER 3120 880 E R0 28” in it, this should be changed to ”IOMARKER 3120 880 E” by deleting the last two values from the end.

Now the file should open on the lab stations in the schematics editor. You might need to re-insert the IO tags, but all the netnames are preserved so it only takes a second. There might be further inconsistencies that we do not know about yet as projects become more complicated, but so far this works.