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

Similar documents
TLL5000 Electronic System Design Base Module

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

Xilinx ISE Synthesis Tutorial

MANUAL XILINX ISE PROJECT NAVIGATOR

Programming Xilinx SPARTAN 3 Board (Simulation through Implementation)

Using Synplify Pro, ISE and ModelSim

Xilinx Schematic Entry Tutorial

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180A DIGITAL SYSTEMS I Winter 2015

Xilinx Tutorial Basic Walk-through

Verilog Design Entry, Synthesis, and Behavioral Simulation

Circuit design with configurable devices (FPGA)

EE 1315 DIGITAL LOGIC LAB EE Dept, UMD

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

Programmable Logic Design I

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

CPLD Experiment 4. XOR and XNOR Gates with Applications

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

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

ECE 4305 Computer Architecture Lab #1

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

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

Xilinx ISE8.1 and Spartan-3 Tutorial EE3810

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

Lab 1: Introduction to Verilog HDL and the Xilinx ISE

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

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!

Xilinx ChipScope ICON/VIO/ILA Tutorial

Building Combinatorial Circuit Using Behavioral Modeling Lab

Circuit Design and Simulation with VHDL 2nd edition Volnei A. Pedroni MIT Press, 2010 Book web:

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

Simulation Lab 7 Use ISE to Auto-Generate Testbench Simulations

Xilinx ISE/WebPack: Introduction to Schematic Capture and Simulation

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

Actel Libero TM Integrated Design Environment v2.3 Structural Schematic Flow Design Tutorial

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

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

Tutorial: ISE 12.2 and the Spartan3e Board v August 2010

Tutorial: Working with the Xilinx tools 14.4

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

Project 1a: Hello World!

Programmable Logic Design I

Advanced module: Video en/decoder on Virtex 5

XILINX WebPack -- testing with Nexys2 boards at USC (EE201L)

OVERVIEW OF FPGA AND EDA SOFTWARE

Xilinx Project Navigator Reference Guide

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

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

Getting Started with Xilinx WebPack 13.1

FPGA Design Tutorial

CSE P567 - Winter 2010 Lab 1 Introduction to FGPA CAD Tools

CECS LAB 1 Introduction to Xilinx EDA Tools

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

Timing Analysis in Xilinx ISE

Tutorial on FPGA Design Flow based on Aldec Active HDL. Ver 1.5

Step 1: Downloading the source files

Introduction. About this tutorial. How to use this tutorial

Tutorial on Simulation using Aldec Active-HDL Ver 1.0

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

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

ENGN 1630: CPLD Simulation Fall ENGN 1630 Fall Simulating XC9572XLs on the ENGN1630 CPLD-II Board Using Xilinx ISim

NOTE: This tutorial contains many large illustrations. Page breaks have been added to keep images on the same page as the step that they represent.

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

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

Lab 6: Intro to FPGAs

475 Electronics for physicists Introduction to FPGA programming

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

ELEC 204 Digital System Design LABORATORY MANUAL

ISE Tutorial: Using Xilinx ChipScope Pro ILA Core with Project Navigator to Debug FPGA Applications

5 January ModelSim v5.7 Quick Reference Guide

CSEE W4840 Embedded System Design Lab 1

Using ChipScope. Overview. Detailed Instructions: Step 1 Creating a new Project

VHDL introduction Notes

Tutorial on FPGA Design Flow based on Aldec Active HDL. ver 1.7

Chip Design with FPGA Design Tools

ENGR 5865 DIGITAL SYSTEMS

Design a three-input, two-output sequential digital circuit which functions as a digital locking mechanism. LOCK ALARM

ISE Tutorial. Using Xilinx ChipScope Pro ILA Core with Project Navigator to Debug FPGA Applications. UG750 (v14.4) December 18, 2012

TUTORIAL: USING THE COREGEN APPLICATION TO GENERATIE VHDL CODE

ISE Design Suite Software Manuals and Help

ECEN 449: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University

XILINX ISE AND SPARTAN 3AN TUTORIAL

ECT 224: Digital Computer Fundamentals Using Xilinx StateCAD

Tutorial for Altera DE1 and Quartus II

EMT1250 LABORATORY EXPERIMENT. EXPERIMENT # 6: Quartus II Tutorial and Practice. Name: Date:

Graduate Institute of Electronics Engineering, NTU. FPGA Lab. Speaker : 鍾明翰 (CMH) Advisor: Prof. An-Yeu Wu Date: 2010/12/14 ACCESS IC LAB

Digital Circuit Design Using Xilinx ISE Tools

Vivado Walkthrough ECGR Fall 2015

Quartus II Tutorial. September 10, 2014 Quartus II Version 14.0

Tutorial on FPGA Design Flow based on Aldec Active HDL. Ver 1.5

ChipScope Demo Instructions

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

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

CS152 FPGA CAD Tool Flow University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences

Chapter 1. OrCAD/ModelSim Tutorial for CPLDs. Design Description

Lab 1: FPGA Physical Layout

Using Xilinx ChipScope Pro ILA Core with Project Navigator to Debug FPGA Applications. UG750 (v12.3) November 5, 2010

Verilog Simulation Mapping

SCHEMATIC DESIGN IN QUARTUS

Lab 6 : Introduction to Verilog

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

Transcription:

EE 367 Logic Design Lab #1 Introduction to Xilinx ISE and the ML40X Eval Board Date: 1/21/09 Due: 1/28/09 Lab Description Today s lab will introduce you to the Xilinx Integrated Software Environment (ISE) and the Virtex-4, ML40X Eval Board. You will need to access the course website for the design files for today s lab. There is no pre-lab today. The intent of this lab is to have you walk through prototyping a VHDL design on a Virtex-4 FPGA. You will be provided with a 4-bit, Up/Down counter that was designed in VHDL. You will first verify its functionality using ModelSim. You will then implement the design on a Virtex-4 FPGA using Xilinx ISE and download it to the ML40X Eval Board. The counter will be visible on the LED s of the Eval board. You will be able to change the direction of the counter by pressing the GPIO_SW_S button and also reset the counter using the CPU Reset switch. Part 1 Simulate the Design Using ModelSim 1. Create a folder for today s lab on your drive called Lab_01_Introduction with a subfolder called ModelSim. 2. Download the four VHDL design files from the course website into your folder: - http://www.coe.montana.edu/ee/rosss/courses/ee367_spring_2009/ee367_labs.html (or go to my homepage at http://www.coe.montana.edu/ee/rosss and click on the EE367 link on the right). - Download files top.vhd, counter.vhd, clock_div.vhd, & test_top.vhd into your ModelSim directory. 3. Start ModelSim - Start Programs ModelSim XE III 6.2c ModelSim 4. Start a new ModelSim Project - File New Project - Give a Project Name such as 4bit_counter - Browse to your /Lab_01_Introduction/ModelSim folder - leave the library name work - Click OK - a dialog will appear in order to add files to the project - Click on Add Existing File - Click Browse - Highlight the four.vhd files that you just downloaded and click OK - Click Open - Click OK - Close the Add items dialog 5. Inspect/Edit the VHDL files - Click on the Project tab (bottom left in the left middle window) - highlight the counter.vhd file, Right Click, and select Edit - inspect the file and see if it makes sense? - highlight the clock_div.vhd file, Right Click and select Edit - inspect the file to see what it does? - what is the DIVISOR set to? 1

- when we download this design onto the FPGA, we will need to change the divider to slow the clock down to <1HZ. What do you think we should set n to if the input clock is 100MHz? - highlight the top.vhd file, Right Click, and select Edit - this is the TOP level design module and calls and connects counter and clock_div. - highlight the test_top.vhd file, Right Click, and select Edit - this is the TEST BENCH for this design. This file calls the Unit Under Test (UUT), provides stimulus to the inputs, and observes the outputs. 6. Compile the VHDL files - Click on the Project tab (bottom left, probably still on top) - Right click in the Workspace and select Compile Compile All - If the compile is successful, a green check will appear by the file. If there was an error, a Red X will appear. You can double click on the Red X to see the error messages. - You can experiment with errors by altering a letter or two in one of the VHDL files. Just remember to put it back to its original form before simulation. 7. Simulate the Design - Click on the Library tab (bottom left) - Our source files were compiled into the work library. - Expand the work library by clicking on its + - Double Click on test_top to load it into the simulator as the Top Level Testbench - A new tab will appear in the Workspace called sim - With test_top highlighted, place the mouse over it and Right Click. - Select Add Add to Wave - Change the Simulation Run Length from 100ps to 2us by typing 2us into the Run Length dialog at the top of the window. - Click the Run button (the button immediately to the right of the Run Length dialog) 8. Inspect the Waveforms - Zoom out Full by clicking once in the waveform window and typing f - Change the Radix of count_tb by Highlighting it, Right Clicking, and selecting Radix Unsigned - You can zoom in and out using the + and - magnifying buttons. - Verify that the counter looks OK to you? Does it change directions and reset properly? Demo #1 : Show the lab instructor the counter waveforms in ModelSim and have the verification sheet signed off (see last page). You should be able to easily zoom in and out on portions of the simulation. 9. Close ModelSim - You must quit the simulation before you can close the project. Click in the bottom command window and type quit sim - Click on the Project tab - Right click in the Workspace window and select Close Project, select OK on the confirmation dialog. - Close the ModelSim program. You have now simulated and verified the functionality of this counter design. Now we are going to Implement the design using an FPGA and verify its operation in hardware. 2

Part 2 Implement the Design on a Xilinx Virtex-4 FPGA 1. Create a sub folder under Lab_01_Introduction called Xilinx 2. Start Xilinx ISE - Start Programs Xilinx ISE 9.1i Project Navigator 3. Start a new project - File New Project - In the New Project Wizard, enter the following: - Under Project Name, enter 4bit_counter - Under Project Location, browse to your Lab_01_Introduction\Xilinx subfolder - Under Top-Level Source Type, select HDL - Click Next - Fill in the following Device Properties : - Product Category = All - Family = Virtex4 - Device = XC4VFX12 - Package = FF668 - Speed = -10 - Synthesis Tool = XST (VHDL/Verilog) - Simulator = ISE Simulator (VHDL/Verilog) - Preferred Language = VHDL - Check the box for Enable Enhanced Design Summary NOTE : If you look at the top of the FPGA, you will see the device properties printed on the top Eval Board. - Click Next - We are NOT going to create a new source, we are going to add existing sources - Click Next on the Create New Source window - In the Add Existing Sources window, click Add Source - Browse to your Lab_01_Introduction/ModelSim directory - Highlight the top.vhd, counter.vhd, and clock_div.vhd files (DO NOT SELECT test_top.vhd). - Click Open - Ensure that the Copy to Project boxes are checked. This is going to copy our VHDL files from our ModelSim project directory into our Xilinx project directory. We can now edit the source code in the Xilinx environment if we need to make small adjustments to the design (i.e., changing the clock divider) without altering our original VHDL source. You can immediately see that you need to be very careful about keeping track of where files are and what revision they are at. - Click Next - A Project Summary window appears to let you confirm your selections. - Go through the information and make sure it looks like what you wanted. - Click Finish - A window will appear that lets you declare what you are going to do with your source files. You can choose to Simulate Only, Synthesis/Implement Only, or do both. We will do both. - Make sure that Synthesis/Imp + Simulation is chosen for each of the three design files under Association - Click OK 3

4. Check the Syntax of the Designs - Verify that Synthesis/Implementation is selected from the drop-down list in the Sources window. - Select the Top design source in the Sources window - In the Processes portion of ISE, click the + next to the Synthesize-XST process to expand the group. - Double Click on the Check Syntax process to start it. - You will see the status of what ISE is doing in the bottom console. You should see that the Check Syntax process completed successfully. NOTE: If you have ERRORS, the tool will not allow you to go any further. The reason is that Xilinx ISE is going to convert your VHDL into real hardware so you do not want errors! 5. Edit the Source Code We know the design is functionality correct. Now we want to slow the clock divider circuit to the point where a human eye can see the counter on the Eval Board LEDs. Unfortunately we can t simulate this situation because it takes way to long (100MHz / 1 HZ = 100 Million clocks for each count on the LED). We will change the DIVISOR in the source code and re-check the syntax, but we will not re-simulate. - In the Sources section of ISE, you will see your project, device, and what designs are targeted for that device. ISE automatically figures out the hierarchy of the design (i.e., that TOP is the top level in our design). - Click on the + sign next to TOP to see the two lower level components (counter and clock_div) - Double Click on D1 clock_div to open the source. - The VHDL source will appear in the right hand window. - Change the value of n generic from 2 to 25. This will give us a clock frequency of <1 Hz going into our counter. This will be slow enough that a human can see the count on the Eval Board LEDs. - Save the File - Recheck the Syntax of the Design by Highlighting the TOP source in the Sources window and double clicking on Check Syntax in the Processes window. 6. Assign Package Pins We need to tell ISE how we want the signals in our design mapped to the pins of the FPGA. This information is kept in a Constraints File. On the course website, there is a document titled ML40X User s Guide which has the pinout of all of the useful I/O on the FPGA (i.e., LEDS, switches, etc ). This is where we find the pinouts to enter into ISE. - In the Processes section, click the + next to the User Constraints process to expand it - Double Click the Assign Package Pins process. - Click Yes if it asks you if it is ok to create a UCF file. This will bring up a new windows titled PACE. This shows a graphical representation of what devices we are using inside the FPGA and also what pins on the package we are assigning to. - Click on the Package View tab to look at the Virtex-4 FF668 package. As we assign package locations to our signal nets, the pins will be highlighted in the package graphic. 4

- In the Design Object List, the I/O signals are listed for our design. Assign the LOC as follows: - Clock = AE14 (100MHZ oscillator on the Eval Board) - Count_Out<0> = G5 (GPIO LED s on the Eval Board) - Count_Out<1> = G6 - Count_Out<2> = A11 - Count_Out<3> = A12 - Direction = A6 (Push Button South on the Eval Board) - Reset = D6 (CPU Reset Button on the Eval Board) Notice how as you enter a package location it is highlighted in the graphic. - Save and Close the PACE window. (If prompted for a Bus Delimiter, choose VHDL, and Do Not Prompt Again ). 7. Verify the Constraints - In the Processes section, click the + next to the User Constraints process to expand it - Double Click the Edit Constraints (Text) process. This brings up a text version of the constraints you ve entered. You should see the package pin constraints that you entered using the graphical input dialogs. Verify that everything is present. Notice some of the other constraints that are available. - Close the Text UCF file. 8. Implement the Design We are now ready to map our design into the FPGA. - In the Processes section, Double Click on the Implement Design process. This process will take some time while the design is synthesized, mapped, placed and routed into the FPGA. There will be some timing warnings that you can ignore for now. Once completed, we have a design that is implemented in real Hardware (i.e., gates in the FPGA). Since we have the timing information about the gates being used, we can re-simulate the design with actual timing data to see if it meets spec (later ) 9. View Report of Implementation - In the processes window, Double Click on the View Design Summary process. This will bring up a window with all of the information about the hardware used to create the design. - Things to notice: - What is our utilization? - Click on some of the report links to see how they appear? - Close the Design Summary 5

10. Generate Programming File for the FPGA and Program At this time, you can connect the USB cable and power up the ML40X Eval Board. - In the Processes section, click the + next to the Generate Programming File process to expand it - Double Click the Configure Device (impact) process. The Configure Device process creates a TOP.bit file for the FPGA that can be downloaded. It will also bring up the downloading tool impact. If prompted with a web talk dialog, choose later or Decline. send In the impact Welcome Dialog : - Make sure the Configure devices using Boundary-Scan (JTAG) is selected. - Make sure the pull down dialog has Automatically connect to a cable. - Click Finish The impact tool goes out and communicates with the Eval Board. It will graphically show the programmable devices that it has found in its programming chain. Our Eval Board has 4 devices. We only care about the Virtex-4 FPGA. For each device in the programming chain, it will ask for a programming file. If we are not going to program a device, we will click Bypass. If we are going to program a device, we will choose a programming file (i.e., TOP.bit). - Click Bypass for the 1st device (xccace) - Click Bypass for the 2nd device (xcf32p) - Select top.bit for the 3 rd device (xc4vfx12 = our FPGA), click open, - click OK in the Object window. - click OK in the Warning window that says the Startup Clock has been changed to JTAG. - Click Bypass for the 4 th device - Put your mouse over the Virtex-4 FPGA icon, Right Click, and select Program - Click OK on the Program Properties window. You will see a status bar indicating that the device is programming. Once complete, the FPGA will begin operating. If you save the impact file, it will save the configuration of the programming chain so that the next time you program the FPGA, you will not have to choose Bypass and can go directly to programming the Virtex-4 11. Verify Hardware Operation - The Eval Board should have a binary counter running on the GPIO LEDs. - You should be able to change the direction of the counter by pressing and holding the GPIO_SW_S button. - You should be able to reset the counter by pressing the CPU Reset button Demo #2 : Show the lab instructor the counter operating on the Eval Board and have the verification sheet signed off (see last page). 6

Instructor Verification Sheet Staple this page to the end of you Lab Report. EE 367 Logic Design Lab #1 Introduction to Xilinx ISE and the ML40X Eval Board Name : Partner : Section: Date: Demo #1 : Counter waveforms shown in ModelSim. Verified : Demo #2 Counter operating on the ML403 eval board. Verified : 7