27
Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 Prepared by: Oluwayomi Adamo Class: Project IV University of North Texas

Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

  • Upload
    lamminh

  • View
    238

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 Prepared by: Oluwayomi Adamo Class: Project IV University of North Texas

Page 2: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

FPGA Physical Description

4 5 15 1

14 13 6

312

8

2 117

10 9

1. VGA (HD-15) Monitor Port 2. 9-pin (DB-9) 3. Power Connector 4. A1 Expansion Port 5. A2 Expansion Port 6. B1 Expansion Port 7. PS/2 Port 8. Seven Segment Displays 9. Switches (8) 10. Buttons (4) 11. LEDs (8) 12. Power LED 13. Spartan 3 FPGA Core 14. Program LED (Lit when the FPGA is programmed) 15. JTAG Port (used to program the FPGA)

Page 3: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Programming Xilinx Board (Spartan 3) Tutorial Using

ISE 8.1i Tutorial prepared by Oluwayomi Adamo

Introduction This tutorial shows you how to program Spartan 3 FPGA board using Xilinx ISE 8.1i. As an example, a half adder circuit will be implemented on the Spartan 3 board. The tutorial begins by showing you how to create a new project and how to describe the digital circuit in VHDL. After the circuit’s functionality has been verified, it is then downloaded to the Spartan 3 board for implementation. You are encouraged to try out the examples before embarking on any exercise. Creating a new Project and Source Start the Xilinx ISE 8.1i project navigator by double clicking the Xilinx ISE 8.1i icon on your desktop.

Xilinx ISE 8.1i.lnk Click on File and select New Project

Page 4: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Select a project location and type the name you would like to call your project “HalfAdder”:

Click Next Select the device family, device, package, and speed grade as shown below:

Page 5: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Click Next Click New Source

Select VHDL Module in the New Source Wizard window:

Page 6: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Click Next Specify the inputs and outputs of your design (HalfAdder). This is used to generate a template for your VHDL code.

Click Next

Page 7: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Click Finish if you are satisfied your specifications shown in the summary page

Click Next

Page 8: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Click Next Verify the information on the Project Summary window:

Click Finish.

Double-click on “HalfAdder-Behavioral(HalfAdder.vhd)” tab in the “Sources” pane.

Page 9: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Include an “enable” input in your entity and it should be 1 bit wide. Complete the architectural part of your VHDL code.

Page 10: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Simulating your code Click on the “+” sign beside synthesize – XST and double click on check syntax.

If your code does not have an error, the message “Process ‘Check Syntax’ completed successfully” will be displayed.

Page 11: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Double-click on “Create New Source” in the “Process” pane in the left of the window.

Click on “VHDL Test Bench” and specify the file name for the test bench. Click Next.

Page 12: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Click on the Source with which to associate the test bench.

Verify the summary of your test bench and click Finish. Click Finish if you are satisfied your specifications shown in the summary page.

Page 13: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

At the tb: process portion of the test bench, specify the test cases you will like to verify.

Page 14: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Click on the drop down button at the “Sources” pane window in the left of the window and click on behavioral simulation.

Click on the “+” sign beside ModelSim Simulator .

Double click on “Simulate Behavioral Model”.

Page 15: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Click on the wave tab and undock to view the waveform. Verify the correctness of your waveform.

Page 16: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Congratulation, you have verified your design. It is time to implement on FPGA board.

Page 17: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Implementation Specify the pins you would like the inputs and outputs to be connected to. Double-click on “Assign Package Pins” in the “Process” pane in the left of the window.

Note: You may be asked to save your VHDL code. Your design will be checked for syntax error. If you have any error, make sure you fix them before proceeding.

Click Yes.

Page 18: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Click Yes. The Pace editor is loaded.

You can select “Package View” tab at the bottom of the right pane. The package view gives a better view of the physical FPGA package).

Page 19: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Type in the desired pin names for each signal in the “Design Object List” at the left in the “Loc” column

Click File and Save. Click File and Exit. Note: The following dialog may appear when saving the file:

Click on “Don’t show this dialog again”.

Page 20: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Click Ok. View the UCF file by double-clicking “Edit Constraints (Text)” in the project Navigator window.

Page 21: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Programming the Board In the Project Navigator window, double-click on “HalfAdder-Behavioral (HalfAdder)” tab in the “Sources” pane.

Page 22: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Right-click on “Generate Programming File” in the “Processes” pane. Select “Properties”.

In the Process Properties windows, Select “Startup Options” tab. Change “FPGA Start-UP Clock” to “JTAG Clock”

Page 23: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Click Apply. Click Ok. In the “Processes” window, click on the + sign by “Generate programming file”. Double-click on “Configure Device (iMPACT)”. This opens the iMPACT tool and a wizard for creating a new configuration.

Page 24: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Click Finish.

Page 25: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

“Assign New Configuration File” window opens. Select the name of your select the “.bit” file (HalfAdder.bit).

Click Open.

click Bypass.

Page 26: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

You will now be at the main iMPACT window:

Right-click on the FPGA (“xc3s200”). select “Program”.

Page 27: Programming Xilinx SPARTAN 3 Board - Electrical … · Programming Xilinx SPARTAN 3 Board (Simulation through Implementation) January 2007 . ... Complete the architectural part of

Make sure that “Verify” is not checked.

Click Apply. Click Ok. The FPGA is now being programmed as shown: