Spartan-6 LX9 MicroBoard Embedded Tutorial. Tutorial 5 Embedded Chipscope Debugging

Similar documents
Spartan-6 LX9 MicroBoard Embedded Tutorial. Tutorial 1 Creating an AXI-based Embedded System

Spartan-6 LX9 MicroBoard Embedded Tutorial. Tutorial 2 Adding EDK IP to an Embedded System

Spartan-6 LX9 MicroBoard Embedded Tutorial. Lab 6 Creating a MicroBlaze SPI Flash Bootloader

Creating the AVS6LX9MBHP211 MicroBlaze Hardware Platform for the Spartan-6 LX9 MicroBoard Version

Spartan -6 LX9 MicroBoard Web Connectivity On Ramp Tutorial

Configuring the Xilinx Spartan-6 LX9 MicroBoard

Carmel (MAXREFDES18#) LX9 MicroBoard Quick Start Guide

Avnet S6LX16 Evaluation Board and Maxim DAC/ADC FMC Module Reference Design

KC705 Si5324 Design October 2012

SP601 Standalone Applications

Adding the ILA Core to an Existing Design Lab

MAXREFDES43# ZedBoard Quick Start Guide

KC705 Si570 Programming

Building an Embedded Processor System on Xilinx NEXYS3 FPGA and Profiling an Application: A Tutorial

Microblaze for Linux Howto

MicroZed: Hello World. Overview. Objectives. 23 August 2013 Version 2013_2.01

AC701 Built-In Self Test Flash Application April 2015

Corona (MAXREFDES12#) ZedBoard Quick Start Guide

SP605 Standalone Applications

POWERLINK Slave Xilinx Getting Started User's Manual

ChipScope Inserter flow. To see the Chipscope added from XPS flow, please skip to page 21. For ChipScope within Planahead, please skip to page 23.

Xilinx Vivado/SDK Tutorial

SP605 Built-In Self Test Flash Application

SP601 Built-In Self Test Flash Application

Corona (MAXREFDES12#) Nexys 3 Quick Start Guide

Spartan -6 LX150T Development Kit Hardware Co-Simulation Reference Design Tutorial

MAXREFDES44# MicroZed Quick Start Guide

Fremont (MAXREFDES6#) Nexys 3 Quick Start Guide

Using Serial Flash on the Xilinx Spartan-3E Starter Board. Overview. Objectives. Version 8.1 February 23, 2006 Bryan H. Fletcher

Campbell (MAXREFDES4#) Nexys 3 Quick Start Guide

Fresno (MAXREFDES11#) ZedBoard Quick Start Guide

ML605 FMC Si570 Programming June 2012

Santa Fe (MAXREFDES5#) MicroZed Quick Start Guide

Spartan-6 and Virtex-6 FPGA Embedded Kit FAQ

Campbell (MAXREFDES4#) Nexys 3 Quick Start Guide

ISE Design Suite Software Manuals and Help

Spartan -6 LX150T Development Kit Hardware Co-Simulation Reference Design User Guide

System Debug. This material exempt per Department of Commerce license exception TSU Xilinx, Inc. All Rights Reserved

ML631 U2 DDR3 MIG Design Creation

Alameda (MAXREFDES24#) ZedBoard Quick Start Guide

QSPI Flash Memory Bootloading In Standard SPI Mode with KC705 Platform

ML631 U1 DDR3 MIG Design Creation

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

Building an Embedded Processor System on a Xilinx Zync FPGA (Profiling): A Tutorial

ZC702 Si570 Programming June 2012

ML605 Built-In Self Test Flash Application

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

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

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

Avnet Zynq Mini Module Plus Embedded Design

This presentation of uclinux-on-microblaze given

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

Pico ChipScope Documentation

ChipScope Demo Instructions

SP605 MIG Design Creation

Circuit design with configurable devices (FPGA)

ChipScope Pro Software and Cores User Guide

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

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

Interested users may wish to obtain additional components to evaluate the following modules:

Figure 1 TCL Used to Initialize PS

Tutorial - Using Xilinx System Generator 14.6 for Co-Simulation on Digilent NEXYS3 (Spartan-6) Board

EDK Concepts, Tools, and Techniques

ML605 Built-In Self Test Flash Application

Introduction to Zynq

LogiCORE IP ChipScope Pro Integrated Controller (ICON) (v1.05a)

EE 1315 DIGITAL LOGIC LAB EE Dept, UMD

Hello World on the ATLYS Board. Building the Hardware

KC705 Ethernet Design Creation October 2012

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

1-1 SDK with Zynq EPP

EDK Concepts, Tools, and Techniques

Zynq-7000 All Programmable SoC: Concepts, Tools, and Techniques (CTT)

EDK Concepts, Tools, and Techniques

CE 435 Embedded Systems. Spring Lab 3. Adding Custom IP to the SoC Hardware Debug. CE435 Embedded Systems

KCU GBASE-KR Ethernet TRD User Guide

Vivado Design Suite Tutorial:

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!

AXI Interface Based KC705. Embedded Kit MicroBlaze Processor Subsystem (ISE Design Suite 14.4)

Hardware In The Loop (HIL) Simulation for the Zynq-7000 All Programmable SoC Author: Umang Parekh

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

Using the ChipScope Pro for Testing HDL Designs on FPGAs

EDK Base System Builder (BSB) support for XUPV2P Board. Xilinx University Program

ECT 357: Microprocessors I

Use Vivado to build an Embedded System

Introducing the Spartan-6 & Virtex-6 FPGA Embedded Kits

Chapter 5 Embedded Soft Core Processors

Interrupt Creation and Debug on ML403

Sundance Multiprocessor Technology Limited. Capture Demo For Intech Unit / Module Number: C Hong. EVP6472 Intech Demo. Abstract

Xilinx Tutorial Basic Walk-through

Tutorial: ISE 12.2 and the Spartan3e Board v August 2010

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

Agilent Technologies InfiniiVision MSO N5406A FPGA Dynamic Probe for Xilinx

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

Impulse Embedded Processing Video Lab

Attention. For additional information, please contact Jim Beneke at Avnet Copyright Avnet, Inc. All rights reserved.

Infiniium MSO8000, MSO9000A and MSO 9000 H-Series N5397A FPGA Dynamic Probe for Xilinx

Synaptic Labs' AXI HyperBus Memory Controller (HBMC) IP for Xilinx FPGA Devices Tutorial

ChipScope Pro Software and Cores User Guide

SP601 MultiBoot Design

Transcription:

Spartan-6 LX9 MicroBoard Embedded Tutorial Tutorial 5 Embedded Chipscope Debugging Version 13.1.01

Revision History Version Description Date 13.1.01 Initial release for EDK 13.1 5/17/2011 Table of Contents Revision History... 2 Table of Contents... 2 Table of Figures... 2 Overview... 3 Objectives... 3 Requirements... 4 Software... 4 Hardware... 4 Recommended Reading... 4 I. Adding the ChipScope AXI Monitor Core... 5 II. Create a Bitstream with ChipScope Core and Executable Software Application... 5 III. Analyzing the design with ChipScope Pro Analyzer.... 6 IV. Getting Help and Support... 11 Table of Figures Figure 1 - Hardware Platform... 3 Figure 2 - Merging SDK Application with FPGA Bitstream... 6 Figure 3 - Configure FPGA from ChipScope... 7 Figure 4 - ChipScope Analyzer Waveform Window... 8 Figure 5 - Address Map of Processor... 8 Figure 6 ChipScope Waveform View Showing AXI Transactions... 9 Page 2 of 11

Overview This is the fifth tutorial in a series of training material dedicated to introducing engineers to creating their first embedded designs. These tutorials will cover all the required steps for creating a complete MicroBlaze design in the Spartan-6 LX9 MicroBoard. While dedicated to this platform, the information learned here can be used with any Xilinx FPGA. The tutorial is divided into three main steps: Adding ChipScope AXI Monitor Core, creating a bitstream containing the ChipScope core and software application, and finally analyzing the design using ChipScope Analyzer. Figure 1 - Hardware Platform Objectives This tutorial demonstrates how to simulate the embedded system using ISim. The tutorial will show How to add a ChipScope AXI Bus Monitor to our embedded processor Generate a FPGA Bitstream with embedded ChipScope core and SDK software application. How to view and interpret AXI Bus transactions using ChipScope Analyzer. Page 3 of 11

Requirements The following items are required for proper completion of this tutorial. Completion of the Adding Custom IP to an Embedded System Tutorial. Software The following software setup is required to test this reference design: WindowsXP 32-bit Service Pack 2 Xilinx ISE WebPack with the EDK add-on or ISE Embedded Edition version 13.1 Xilinx ChipScope Pro version 13.1 Installed Digilent Adept and Xilinx 3 rd -party USB Cable driver (see Spartan-6 LX9 MicroBoard Configuration Guide, listed in Recommended Reading, below) Installed Silicon Labs CP210x USB-to-UART Bridge Driver (see Silicon Labs CP210x USB-to- UART Setup Guide, listed in Recommended Reading, below) Installation of the Spartan-6 LX9 MicroBoard IPXACT files (Available from Avnet: http://em.avnet.com/s6microboard) Hardware The hardware setup used by this reference design includes: Computer with a minimum of 300-900 MB (depending on O/S) to complete an XC6SLX9 design 1 Avnet Spartan-6 LX9 MicroBoard Kit o Avnet Spartan-6 LX9 MicroBoard o USB Extension cable (if necessary) o USB A-to-MicroB cable Recommended Reading Available from Avnet: http://em.avnet.com/s6microboard The hardware used on the Spartan-6 LX9 MicroBoard is described in detail in Avnet document, Spartan-6 LX9 MicroBoard User Guide. An overview of the configuration options available on the Spartan-6 LX9 MicroBoard, as well as Digilent driver installation instructions can be found in the Avnet document, Spartan-6 LX9 MicroBoard Configuration Guide. Instructions on installing the Silicon Labs CP210x USB-to-UART drivers can be found in the Avnet document, Silicon Labs CP210x USB-to-UART Setup Guide. Available from Xilinx: http://www.xilinx.com/support/documentation/spartan-6.htm Details on the Spartan-6 FPGA family are included in the following Xilinx documents: o Spartan-6 Family Overview (DS160) o Spartan-6 FPGA Data Sheet (DS162) o Spartan-6 FPGA Configuration User Guide (UG380) o Platform Studio Help (available in tool menu) o Platform Studio SDK Help (available in tool menu) o MicroBlaze Reference Guide v.13.1 (UG081) o Embedded System Tools Reference Manual v.13.1 (UG111) 1 Refer to www.xilinx.com/ise/products/memory.htm Page 4 of 11

I. Adding the ChipScope AXI Monitor Core The AXI Monitor is a wrapper for the ChipScope ILA core. It functions the same way as the ChipScope ILA, except that the wrapper creates a specific ILA for monitoring AXI signals by creating trigger groups designed to be useful for debugging purposes. 1) Start ISE Project Navigator and open the EDK_Tutorial project. 2) Double-click on mb_system_i to open the embedded subsystem. 3) In XPS, Open the Debug Configuration Wizard. Select Debug Debug Configuration. 4) Select Monitor Hardware Signals then click Add ChipScope Peripheral. 5) Click OK to monitor AXI Interconnect signals (adding AXI Monitor) 6) Click OK to exit Debug Configuration. 7) We need to update the design information for ISE. Go to Project > Export Hardware Design to SDK Select Export Only. 8) Close XPS. 9) In Project Navigator, click on mb_system_i and select Generate Programming File. II. Create a Bitstream with ChipScope Core and Executable Software Application We just created a bitstream with a ChipScope core embedded. However we need to merge our test application with that bitstream so the MicroBlaze has code to execute upon bootup. There are two ways to merge this code with the bitstream; use DATA2MEM in command line mode, or use SDK. For this tutorial we will stick with the GUI and use SDK. 1) Start Xilinx SDK and select the Workspace from EDK_Tutorial. 2) Click the Program FPGA button or select Xilinx Tools Program FPGA. Page 5 of 11

3) Select Tutorial_Test.elf to Initialize to Block RAM. This will merge the Tutorial_Test.elf file with our bitstream. Figure 2 - Merging SDK Application with FPGA Bitstream 4) Click Program. The process will fail if the LX9 MicroBoard is not connected. This is OK as the bitstream is created. The new bitstream will be called download.bit and will be located in the EDK_Tutorial\WorkSpace\mb_system_hw_platform directory. III. Analyzing the design with ChipScope Pro Analyzer. In this section we will demonstrate how to program the FPGA using ChipScope, connect to the integrated AXI Bus Monitor and configure it to probe AXI bus transactions. We will also correlate what we see in the analyzer with our SDK application. 1) Start ChipScope Pro Analyzer, Start Programs Xilinx ISE Design Suite 13.1 ChipScope Pro Analyzer. 2) Connect the Spartan-6 LX9 MicroBoard to a PC s USB port. 3) In ChipScope Analyzer, select JTAG Chain Open Plug-in and verify digilent_plugin is listed in the dialogue window. 4) Click the Initialize Chain Button,. Click OK to accept the JTAG Chain Device Order. Page 6 of 11

5) Right-Click on DEV:0 MyDevice(XC6SLX9) and select Configure. Figure 3 - Configure FPGA from ChipScope 6) Click Select New File and navigate to \EDK_Tutorial\WorkSpace\mb_system_hw_platform and select download.bit. Click OK to program the FPGA. 7) We need to add the CDC file to attach names to the ChipScope signals. Click File Import and click Select New File. Navigate to the Chipscope AXI Monitor IP directory: \EDK_Tutorial\mb_system\implementation\chipscope_axi_monitor_0_wrapper\ and select: chipscope_axi_monitor_0.cdc. 8) Select the checkbox for Auto-create Buses and click OK. 9) Under UNIT:0 MyILA0 (ILA) double-click Waveform and Trigger Setup. This will open both windows in the viewing area. 10) In the Trigger window, click Trigger Anything button,. This will fill the waveform window showing activity on the AXI bus signals. 11) Double-click Waveform to open the Waveform Window. Page 7 of 11

12) Zoom in until the MON_AXI_ARADDR signals start to show addresses. Two prominent addresses should be visible; 0x40020000 and 0x7EE00000. Do either of these look familiar? Figure 4 - ChipScope Analyzer Waveform Window 13) Go back to SDK and expand mb_system_hw_platform and double-click system.xml. Do these addresses look familiar now? Figure 5 - Address Map of Processor Page 8 of 11

14) The DIP_Switches are read at address 0x40020000. Open Trigger Setup. Configure the Trigger as follows: In the M0:ARADDR row, change the radix to Hex. Then set the Value to 4002_0000. Expand M7:RDATACONTROL, change MON_AXI_RVALID to 1. Set Position to 512. Double-click Trigger Condition Equation, and enable M0 and M7. Click OK. 15) Go back to the waveform window and Click the Trigger button,. The trigger should now be centered on a valid read transaction from address 0x40020000. The value in MON_AXI_RDATA should represent the status of the DIP Switches on the board. Change the DIP Switch settings and verify the RDATA value matches the switch settings. 16) Next, look at what data is being written into address 0x7EE00000. This is the shifted data being written into the AXI_PWM module. Our C code reads the data from the DIP_SWITCHES_BASEADDR, shifts it by 8 bits then pass it to the AXI_PWM_BASEADDR (0x7EE00000). Duty_Cycle = (u32 *)XPAR_AXI_PWM_0_BASEADDR; while (1) { } DIP_Read = XGpio_ReadReg(XPAR_DIP_SWITCHES_BASEADDR, 0); //Use the DIP Switches value for the duty cycle *(Duty_Cycle) = DIP_Read << 8; Remember our counter in our PWM only has 12-bits of resolution. The DIP Switches are only 4-bits. Thus we have to shift the DIP_Switches value by 8-bit into the most significant positions. If you look at the next AXI transaction, it s a write to address 0x7EE00000 with the shifted data on the AXI write port (MON_AXI_WDATA): Figure 6 ChipScope Waveform View Showing AXI Transactions Page 9 of 11

This concludes this tutorial. We ve learned how to add a ChipScope AXI Bus Monitor to our processor subsystem and analyze bus transactions using ChipScope Pro Analyzer. ChipScope Pro has additional features for debugging your embedded system including: Monitoring arbitrary system level signals (adding Integrated Logic Analyzer (ILA)) Providing JTAG-based virtual input and output (VIO) See the Help window in the Debug Configuration Wizard in XPS for more info on adding these cores. Page 10 of 11

IV. Getting Help and Support Evaluation Kit home page with Documentation and Reference Designs http://em.avnet.com/s6microboard Avnet Spartan-6 LX9 MicroBoard forum: http://community.em.avnet.com/t5/spartan-6-lx9-microboard/bd-p/spartan-6lx9microboard For Xilinx technical support, you may contact your local Avnet/Silica FAE or Xilinx Online Technical Support at www.support.xilinx.com. On this site you will also find the following resources for assistance: Software, IP, and Documentation Updates Access to Technical Support Web Tools Searchable Answer Database with Over 4,000 Solutions User Forums Training - Select instructor-led classes and recorded e-learning options Contact Avnet Support for any questions regarding the Spartan-6 LX9 MicroBoard reference designs, kit hardware, or if you are interested in designing any of the kit devices into your next design. http://www.em.avnet.com/techsupport You can also contact your local Avnet/Silica FAE. Page 11 of 11