Top Banner
COE758 Xilinx ISE 9.2 Tutorial 1 Creating Simple Project
24

COE758 - Xilinx ISE 9.2 Tutorial 1

Feb 09, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: COE758 - Xilinx ISE 9.2 Tutorial 1

COE758 ‐ Xilinx ISE 9.2 Tutorial 1Creating Simple Project g p j

Page 2: COE758 - Xilinx ISE 9.2 Tutorial 1

Start Xilinx ISE software, and press OK on “Tip of the Day” to get to a screen as shown aboveas shown above

2

Page 3: COE758 - Xilinx ISE 9.2 Tutorial 1

Create new project by selecting File‐>New Project New window will openNew window will open.

3

Page 4: COE758 - Xilinx ISE 9.2 Tutorial 1

Project location – select the directory for the projects Project Name – select project name Notice how directory with sameProject Name – select project name. Notice how directory with same project name is added in the Project Location text field.Press Next>

4

Page 5: COE758 - Xilinx ISE 9.2 Tutorial 1

In the Device Properties selection of the device and package is done.In the Device Properties selection of the device and package is done.Family: Spartan3EDevice: XC3S500EPackage: FG320S d 5Speed: ‐5Preferred Language: VHDLKeep the rest of the settings and press Next> 5

Page 6: COE758 - Xilinx ISE 9.2 Tutorial 1

In this window you can either add new source , or leave it for later as it is done in this tutorialdone in this tutorial.Press Next>  several times until finish and press Finish on the last window.

6

Page 7: COE758 - Xilinx ISE 9.2 Tutorial 1

When new project is created source files can be added. Right click on the device and select New Sourcedevice and select New Source.New Wizard window is opened

7

Page 8: COE758 - Xilinx ISE 9.2 Tutorial 1

Select VHDL Module and enter the name of the vhdl source file.Press Next>Press Next>

8

Page 9: COE758 - Xilinx ISE 9.2 Tutorial 1

In this window input and output signals are specified. Notice that for led and switch signals Bus checkbox is selected and size ofNotice that for led and switch signals Bus checkbox is selected and size of the bus is specified. Press Next>

9

Page 10: COE758 - Xilinx ISE 9.2 Tutorial 1

Last window in the wizard shows summary of the source including inputs and outputs for that moduleand outputs for that module. Press Finish to add source file to project.

10

Page 11: COE758 - Xilinx ISE 9.2 Tutorial 1

When source file is added ISE tool window should look as aboveNext step is to add actual processing source codeNext step is to add actual processing source code.

11

Page 12: COE758 - Xilinx ISE 9.2 Tutorial 1

Sample VHDL program 

library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;

Library definitions

entity tutorial isPort ( clk : in  STD_LOGIC;

led : out  STD_LOGIC_VECTOR (7 downto 0);switch : in  STD_LOGIC_VECTOR (3 downto 0));

end tutorial;

Input/Output definitions

architecture Behavioral of tutorial is

signal counter: std_logic_vector(29 downto 0);

begin

process(clk)

counter definition

process(clk)begin

if(clk'Event and clk='1') thenif(switch(0)='1') then

counter<=counter+'1';else 

counter<=counter‐'1';

Counter counting up if switch is on, and countingdown if switch is off. Every addition occurs on everypositive clock edge

end if;end if;

end process;

led(7 downto 0)<=counter(29 downto 22);

end Behavioral;

positive clock edge.

Output of the top bits of counter on LEDsend Behavioral;

12

Page 13: COE758 - Xilinx ISE 9.2 Tutorial 1

When program is written its syntax can be checked by expanding Synthesizeand double clicking on Check Syntax If errors are found double click onand double clicking on Check Syntax. If errors are found, double click on error and correct the mistake. 

13

Page 14: COE758 - Xilinx ISE 9.2 Tutorial 1

When all of the errors were corrected and Synthesis has been completed successfully an assignment of inputs and outputs has to be done. Since y g p pFPGA is already mounted on the development platform inputs and outputs are restricted and have to be specified. Only ones that are used have to be specified in the constraint file.Add new source same way as before but this time select ImplementationAdd new source same way as before, but this time select Implementation Constraint File, and specify name for the constraint file.Press Next> 14

Page 15: COE758 - Xilinx ISE 9.2 Tutorial 1

UCF constraint file is added to the VHDL file. Select constraint file and double click on Edit Constraints (Text)Select constraint file and double click on Edit Constraints (Text)

15

Page 16: COE758 - Xilinx ISE 9.2 Tutorial 1

Enter constraints for the LEDs and Switches that are located in the lower right cornerright corner.Clock signal for all of the designs is connected to pin “C9” on FPGA

16

Page 17: COE758 - Xilinx ISE 9.2 Tutorial 1

When code is debugged and constraint file is correctly entered we can generate a configuration file Right click on Generate Programming File andgenerate a configuration file. Right click on Generate Programming File and select Run.Similarly as before, if errors occur, double click on the error and correct it.

17

Page 18: COE758 - Xilinx ISE 9.2 Tutorial 1

If configuration file is generated successfully we can load it on to the platformplatform.

18

Page 19: COE758 - Xilinx ISE 9.2 Tutorial 1

Expand Generate Programming File, right click on Configure Device (iMPACT) and select Run iMPACT wizard window will open(iMPACT) and select Run. iMPACT wizard window will open.

19

Page 20: COE758 - Xilinx ISE 9.2 Tutorial 1

Select top option of configuring using JTAG and press FINISH.

20

Page 21: COE758 - Xilinx ISE 9.2 Tutorial 1

On the initial iMPACT load wizard will prompt to select configuration files for all of the devices present on the JTAG chain Press Esc key for all of thefor all of the devices present on the JTAG chain. Press Esc key for all of the windows. Right click on the left device which represents Spartan 3E FPGA and select Assign New Configuration File

21

Page 22: COE758 - Xilinx ISE 9.2 Tutorial 1

To load program on the FPGA device, right click on the FPGA icon and select Program Programming properties window will be shownProgram. Programming properties window will be shown.

22

Page 23: COE758 - Xilinx ISE 9.2 Tutorial 1

On the Programming Properties make sure verify is UNCHECKED. Press OK at which point configuration file will be uploaded to FPGAPress OK at which point configuration file will be uploaded to FPGA.

23

Page 24: COE758 - Xilinx ISE 9.2 Tutorial 1

Conclusion

This completes first simple tutorial which included:

•Creating new project•Adding VHDL source fileAdding VHDL source file•Writing simple program involving inputs and outputs with simple internal counter•Creating constraint fileG i fi i fil•Generating configuration file

•Uploading configuration to FPGA device

Second tutorial covers use of internal BlockRAM and a Chipscope Pro embedded f p plogic analyzer which is required for completion of all the labs in the course.

24