Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 10/25/16

Similar documents
Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 11/01/17

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 1

Getting started with the Xilinx Project Navigator and the Digilent BASYS 2 board.

The board is powered by the USB connection, so to turn it on or off you plug it in or unplug it, respectively.

TUTORIAL On USING XILINX ISE FOUNDATION DESIGN TOOLS: Mixing VHDL and Schematics

CCE 3202 Advanced Digital System Design

CCE 3202 Advanced Digital System Design

Board-Data Processing. VHDL Exercises. Exercise 1: Basics of VHDL Programming. Stages of the Development process using FPGA s in Xilinx ISE.

Revision: February 27, E Main Suite D Pullman, WA (509) Voice and Fax

Revision: February 27, E Main Suite D Pullman, WA (509) Voice and Fax

Programming Xilinx SPARTAN 3 Board (Simulation through Implementation)

Banks, Jasmine Elizabeth (2011) The Spartan 3E Tutorial 1 : Introduction to FPGA Programming, Version 1.0. [Tutorial Programme]

Laboratory #Intro to Xilinx ISE and CR-2 Kit ECE 332

Nexys 2/3 board tutorial (Decoder, ISE 13.2) Jim Duckworth, August 2011, WPI. (updated March 2012 to include Nexys2 board)

Getting Started with Xilinx WebPack 13.1

EE 1315 DIGITAL LOGIC LAB EE Dept, UMD

Verilog Design Entry, Synthesis, and Behavioral Simulation

Xilinx ISE Synthesis Tutorial

Chip Design with FPGA Design Tools

ECE 4305 Computer Architecture Lab #1

Building Combinatorial Circuit Using Behavioral Modeling Lab

Lab 1: Introduction to Verilog HDL and the Xilinx ISE

Circuit design with configurable devices (FPGA)

and 32 bit for 32 bit. If you don t pay attention to this, there will be unexpected behavior in the ISE software and thing may not work properly!

EE 367 Logic Design Lab #1 Introduction to Xilinx ISE and the ML40X Eval Board Date: 1/21/09 Due: 1/28/09

PALMiCE FPGA Probing Function User's Manual

Xilinx Project Navigator Reference Guide

Xilinx Schematic Entry Tutorial

University of Hawaii EE 361L. Getting Started with Spartan 3E Digilent Basys2 Board. Lab 4.1

TLL5000 Electronic System Design Base Module

Xilinx Tutorial Basic Walk-through

Introduction to WebPACK 6.3. Using Xilinx WebPACK Software to Create FPGA Designs for the XSA Board

TLL5000 Electronic System Design Base Module. Getting Started Guide, Ver 3.4

ECE 491 Laboratory 1 Introducing FPGA Design with Verilog September 6, 2004

Laboratory of Digital Circuits Design: Design, Implementation and Simulation of Digital Circuits Using Programmable Devices

MANUAL XILINX ISE PROJECT NAVIGATOR

Xilinx ISE8.1 and Spartan-3 Tutorial EE3810

Introduction to WebPACK 8.1. Using Xilinx WebPACK Software to Create FPGA Designs for the XSA Board

4. Verify that HDL is selected as the Top-Level Source Type, and click Next. The New Project Wizard Device Properties page appears.

Vivado Walkthrough ECGR Fall 2015

Guide ISE14. ISE 14.2 (Xilinx) Designflow 1/12

Xilinx ISE8.1 and Spartan-3 Tutorial (Prepared by Kahraman Akdemir based on Professor Duckworth's Tutorials updated September 2006)

Active-HDL. Getting Started

Introduction to WebPACK 5.2 for FPGAs. Using Xilinx WebPACK Software to Create FPGA Designs for the XSB-300E Board

Tutorial on FPGA Design Flow based on Xilinx ISE Webpack andisim. ver. 1.0

Nexys 2 board tutorial (Decoder, ISE 12.2) Jim Duckworth, August 2010, WPI. Digilent Adept Programming Steps added by Zoe (Zhu Fu)

CECS LAB 1 Introduction to Xilinx EDA Tools

Introduction to WebPACK 4.1 for CPLDs. Using Xilinx WebPACK Software to Create CPLD Designs for the XS95 Board

Lab 3: Xilinx PicoBlaze Flow Lab Targeting Spartan-3E Starter Kit

ISE Design Suite Software Manuals and Help

Tutorial: Working with the Xilinx tools 14.4

Lecture 5: Aldec Active-HDL Simulator

Converting Hardware Interface Layer (HIL) v1.x Projects to v2.0

To practice combinational logic on Logisim and Xilinx ISE tools. ...

Introduction to WebPACK 6.1. Using Xilinx WebPACK Software to Create FPGA Designs for the XSA Board

Tutorial: ISE 12.2 and the Spartan3e Board v August 2010

Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification

Introduction to WebPACK 4.1 for FPGAs. Using Xilinx WebPACK Software to Create FPGA Designs for the XSA Board

Tutorial: Working with Verilog and the Xilinx FPGA in ISE 9.2i

2001 by X Engineering Software Systems Corp., Apex, North Carolina 27502

EE183 LAB TUTORIAL. Introduction. Projects. Design Entry

1. Downloading. 2. Installation and License Acquiring. Xilinx ISE Webpack + Project Setup Instructions

PlanAhead Release Notes

RTL Design and IP Generation Tutorial. PlanAhead Design Tool

PlanAhead Software Tutorial

Quick Front-to-Back Overview Tutorial

Lab 6: Intro to FPGAs

FPGA Design Flow 1. All About FPGA

Experiment 8 Introduction to VHDL

Tutorial on FPGA Design Flow based on Xilinx ISE WebPack and ModelSim. ver. 2.0

Using XILINX WebPACK Software to Create CPLD Designs

ELEC 204 Digital System Design LABORATORY MANUAL

Advanced module: Video en/decoder on Virtex 5

Implementing a Verilog design into the UWEE CPLD Development Board Using Xilinx s ISE 7.1i Software: A Tutorial

XILINX ISE AND SPARTAN 3AN TUTORIAL

ECT 224: Digital Computer Fundamentals Using Xilinx StateCAD

Xilinx ISE Simulation Tutorial

Tutorial on FPGA Design Flow based on Xilinx ISE Webpack and ModelSim. ver. 1.3

Lab 3. Advanced VHDL

Programmable Logic Design Techniques I

VIVADO TUTORIAL- TIMING AND POWER ANALYSIS

ANADOLU UNIVERSITY DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING. EEM Digital Systems II

Quick Tutorial for Quartus II & ModelSim Altera

Chapter 3. HDL Editor. Introduction. Figure 3-1. HDL Editor Welcome Screen. Introduction 3-1

Parallel Cable III Emulator for the XSB-300E Board

Contents. Appendix B HDL Entry Tutorial 2 Page 1 of 14

Tutorial for Altera DE1 and Quartus II

Introduction to WebPACK 3.1. Using XILINX WebPACK Software to Create CPLD Designs

CSE 591: Advanced Hardware Design and Verification (2012 Spring) LAB #0

DESIGN AND IMPLEMENTATION OF MOD-6 SYNCHRONOUS COUNTER USING VHDL

Tutorial on VHDL Compilation, Simulation, and Synthesis

Tutorial on FPGA Design Flow based on Xilinx ISE Webpack and ModelSim. ver. 1.5

EE 231 Fall Lab 1: Introduction to Verilog HDL and Altera IDE

AccelDSP tutorial 2 (Matlab.m to HDL for Xilinx) Ronak Gandhi Syracuse University Fall

Lab 1 Modular Design and Testbench Simulation ENGIN 341 Advanced Digital Design University of Massachusetts Boston

2 nd Year Laboratory. Experiment: FPGA Design with Verilog. Department of Electrical & Electronic Engineering. Imperial College London.

CPE 626 Advanced VLSI Design Lecture 6: VHDL Synthesis. Register File: An Example. Register File: An Example (cont d) Aleksandar Milenkovic

Lab 6 : Introduction to Verilog

Introduction to Nexys 2 board - Detour Signal Lab

Introduction. About this tutorial. How to use this tutorial

Transcription:

1 Logic Implementation on a Xilinx FPGA using VHDL WWU Linux platform assumed. rev 10/25/16 The following is a general outline of steps (i.e. design flow) used to implement a digital system described with VHDL on a Xilinx FPGA. A more detailed outline is shown later in this document - Create a directory for your design in which the VHDL and other files for this design will be placed. - Start the Xilinx ISE tool suit and create a project. Specify the folder in which the project is to be created and the name of the project (a folder with the project name will be created.) There will be a box in which the type of top level source file is specified. Select HDL as the top design level. - Select New Source on the left tool bar to create a source file (hover over icons to find the right one). Specify VHDL Module as the type. This file will be created in your project s directory. A window will open and allow you to specify a list of signal names and their direction which will be placed in the entity port statement (you don t have to specify I/O signals here, you can just type them in with the editor but entering them will allow ISE to create a complete entity). Note: the editor in ISE can be used to edit VHDL source files or any programming type text editor (not a word processor) can be used. - After creating the VHDL source file synthesize and implement the deisgn. - Create the bitmap file.. - Download the bitmap file to the FPGA using Impact. Test your design. These notes assume that the reader has done schematic oriented design using the Xilinx ISE software. VHDL source file details The VHDL file (or files) must be in plain text format that conforms to VHDL syntax standards. If your design has multiple VHDL files, one must be the top level module and all external inputs/outputs, i.e. connections to the FPGA, must be made to signals declared in the entity port statement of that top level VHDL file. There are two ways to specify the pin numbers associated with each signal named in the entity port statement. Either they are declared in the VHDL source file using attribute assignments or they are defined in a.ucf constraints file. On the next page is shown an example file that creates an XOR gate with the FPGA pin connections defined using attribute statements (This file can be found at /home/classes/engr433/example_vhdl/myxor_behav_w_pins.vhd). Note that the first attribute statement essentially defines a data type for the others. Also note that the pin numbers shown here may not be the correct pin numbers for the FPGA board you are using, so change them as needed (An x3cs1200e part in a ft256 package, i.e. it has 256 pins, is assumed here).

2 Library ieee; Use ieee.std_logic_1164.all; Entity myxor is port(x,y : in std_logic; h : out std_logic); attribute LOC : string; attribute LOC of x : signal is "R16"; -- sw0 attribute LOC of y : signal is "R15"; -- sw1 attribute LOC of h : signal is "H14"; -- led0 End myxor; Architecture myxorbehav Of myxor is Begin h <= x xor y; End myxorbehav; If an input or output signal is a bus, i.e. a vector, rather than having a separate LOC statement for each individual signal in the bus you will just have one LOC statement for the vector but it will have a list of pin numbers. For example, suppose the simple circuit above were described using a 2-bit bus that brings in the connection from two switches. The description might look like this: Library ieee; Use ieee.std_logic_1164.all; Entity myxor is port(x : in std_logic_vector(1 downto 0); h : out std_logic); attribute LOC : string; attribute LOC of x : signal is "R16, R15"; -- sw1 and sw0, in that order attribute LOC of h : signal is "H14"; -- led0 End myxor; Architecture myxorbehav Of myxor is Begin h <= x(1) xor x(0); End myxorbehav; The second way is to put the pin number definitions in a user constraints file (.ucf) located in the project directory (i.e. folder). The constraints file is an ASCII text file. It can be created using any text editor (or using the Xilinx PACE constraints editor, but that is not discussed here). On the class web page are two constraints files: wwu_fpga2_single.ucf and wwu_fpga2_vector.ucf. Single indicates that single bit signal names are used for each I/O port.

3 Here is an excerpt from the single constraint file. Note that anything after a pound (#) character is a comment: NET "sw0" LOC = "R16"; #J2-3 sw0 to sw7 are toggle switches NET "sw1" LOC = "R15"; #J2-4 NET "sw2" LOC = "P16"; #J2-5 NET "sw3" LOC = "P15"; #J2-6 NET "sw4" LOC = "P14"; #J2-7 NET "sw5" LOC = "N16"; #J2-8 NET "sw6" LOC = "M16"; #J2-9 NET "sw7" LOC = "L15"; #J2-10 In the vector style file I/O ports are grouped and named in vector form like this excerpt. NET "sw<0>" LOC = "R16"; NET "sw<1>" LOC = "R15"; NET "sw<2>" LOC = "P16"; NET "sw<3>" LOC = "P15"; NET "sw<4>" LOC = "P14"; NET "sw<5>" LOC = "N16"; NET "sw<6>" LOC = "M16"; NET "sw<7>" LOC = "L15"; #J2-3 sw0 to sw7 are toggle switches #J2-4 #J2-5 #J2-6 #J2-7 #J2-8 #J2-9 #J2-10 If a constraint file is used then you don t put the LOC attribute statements in the entity of your top module. Names of inputs and outputs in the entity port map statement must be the same as the names in the constraint file that is used. Any unused signal definitions in the constraint file must be removed or commented out to avoid a synthesis error. Thus if only sw0 and sw1 were being used in a design the excerpt above would be like this: NET "sw<0>" LOC = "R16"; NET "sw<1>" LOC = "R15"; #NET "sw<2>" LOC = "P16"; #NET "sw<3>" LOC = "P15"; #NET "sw<4>" LOC = "P14"; #NET "sw<5>" LOC = "N16"; #NET "sw<6>" LOC = "M16"; #NET "sw<7>" LOC = "L15"; #J2-3 sw0 to sw7 are toggle switches #J2-4 #J2-5 #J2-6 #J2-7 #J2-8 #J2-9 #J2-10

4 Assuming a constraints file will be used, here is the earlier VHDL example modified to use a vector for the switch inputs: Library ieee; Use ieee.std_logic_1164.all; Entity myxor is port(sw : in std_logic_vector(1 downto 0); h : out std_logic); End myxor; Architecture myxorbehav Of myxor is Begin h <= sw(1) xor sw(0); End myxorbehav Note that names in the entity must match the names used in the constraints (.ucf) file. For this example if signal h is suppose to connect to led0 then the constraints file would need to have an entry like this: NET h LOC = H14"; A more detailed description of creating a new VHDL based project 0) From a terminal window, make the current directory (i.e. folder) the directory created for this design. 1) Start the Xilinx ISE version 14.7 software by entering xilinx (lower case) ISE may start up with a prior design loaded. If so, click File on the Xilinx tool bar and select close. 2) Create a new project by clicking on File and selecting New Project. a) To set the Project Location, use the button with three dots to open the Find Directory popup window and navigate to the directory you created for the project. b) Also, enter a project name c) Select HDL as the type of top-level source for the project. d) Click Next

5 e) The Project Settings screen should appear. Set values as follows: Development Board None Specified Product Category General Purpose Family Spartan3E Device XC3S1200E Package FT256 Speed -5 Top-level Source Type Synthesis Tool Simulator Preferred Language VHDL Standard HDL (this field may be grayed out) XST (VHDL/Verilog) Isim (VHDL/Verilog) VHDL VHDL-93 f) Click Next g) The project summary screen will be displayed. Review the info and if there is a mistake you can back up to a prior screen and make corrections. Click Finish when ok. h) At this point there are no design files for the project. In the left window Empty View will be displayed. i) On the left tool bar at the top is a New Source button. Click on it. The New Source Wizard will open. Click VHDL Module (it should become highlighted) and enter a file name that describes your design. Click Next. The Define Module window will open and allow you to specify the signals that will connect to physical pins of the FPGA, both input and output. These become the signals named in the port statement in the entity. After listing your signals click Next. The Summary window will open showing the definition of the module and the port definitions. If it isn t ok click back to a prior window. When all is ok click Finish. Your newly created VHDL source file should open in the editor window. Note: If you created your VHDL source file with another editor you could use the Add Source button on the left tool bar rather than New Source. j) The Entity of your VHDL description has been created and the start of the Architecture. Two things need to be done before you build the project. 1) Add VHDL statements to the architecture to describe the desired circuit 2) Add attribute statements to the entity to map I/O signals to physical FPGA pins The example circuit below has two input signals that are ANDed together with the result displayed on Led0. Note the attribute statements that define connections to the FPGA 3) The content of the left subwindow(s) changes depending on the tab selected at the bottom.the default tab is Design which causes a hierarchy display with the name of your

6 project, the FPGA type, and under the FPGA the name of the top level VHDL file. From this point on building the project and downloading it to an FPGA follows the procedure used for schematic driven design. Notes: A) The ibuf and obuf components that are manually placed in a schematic based design are automatically inserted by the synthesizer in a VHDL design based on the signal type declared in the entity port statement. B) Global clock buffers will automatically be placed on the inputs that are used for global clock inputs. If an internally derived clock needs to be connected to a global clock buffer that will need to be done manually in the VHDL source file.

Initial VHDL file contents: 7

Main part of the VHDL file with a circuit installed and I/O connections made: 8