MicroBlaze Spartan-3A Kit Reference Design

Similar documents
Getting Started with Embedded System Development using MicroBlaze processor & Spartan-3A FPGAs. MicroBlaze

Post-Configuration Access to SPI Flash Memory with Virtex-5 FPGAs Author: Daniel Cherry

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

Kirchhoff Institute for Physics Heidelberg

ML310 Creating a VxWorks BSP and System Image for the Base XPS Design

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

Current Cost Data Cable User Guide. Installing and configuring the data cable

Avnet Programming Utility User Manual

Von der Hardware zur Software in FPGAs mit Embedded Prozessoren. Alexander Hahn Senior Field Application Engineer Lattice Semiconductor

Debugging Network Communications. 1 Check the Network Cabling

Getting Started with the Xilinx Zynq All Programmable SoC Mini-ITX Development Kit

Lab Experiment 1: The LPC 2148 Education Board

To perform Ethernet setup and communication verification, first perform RS232 setup and communication verification:

Simplifying Embedded Hardware and Software Development with Targeted Reference Designs

Figure 1 TOE2-IP FTP Server Demo Environment Setup on KC705

Creating a Webserver on the Nios development kit Stratix Edition board Enoch Hwang

WIZ-Embedded WebServer User s Manual (Ver. 1.0)

USB - FPGA MODULE (PRELIMINARY)

Software Development Environment

December 2002, ver. 1.0 Application Note 285. This document describes the Excalibur web server demonstration design and includes the following topics:

SmartFusion csoc: Basic Bootloader and Field Upgrade envm Through IAP Interface

Quick Start Guide. TWR-MECH Mechatronics Board TOWER SYSTEM

Software User Guide UG-461

Ethernet Interface Manual Thermal / Label Printer. Rev Metapace T-1. Metapace T-2 Metapace L-1 Metapace L-2

ML310 VxWorks QuickStart Tutorial. Note: Screen shots in this acrobat file appear best when Acrobat Magnification is set to 133.3%

EDK Concepts, Tools, and Techniques

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Maintaining the Content Server

Keep it Simple Timing

Prestige 314 Read Me First

Matrix 510/520 User Guide

RCC2 Test Proceedures

MicroBlaze Tutorial Creating a Simple Embedded System and Adding Custom Peripherals Using Xilinx EDK Software Tools

USER GUIDE. Ethernet Configuration Guide (Lantronix) P/N: Rev 6

Table of Contents. Safety Warnings..3. Introduction.. 4. Host-side Remote Desktop Connection.. 5. Setting Date and Time... 7

In-System Programmer USER MANUAL RN-ISP-UM RN-WIFLYCR-UM

WindO/I-NV2 Utility Pass-Through Tool

4 Networking Generators

Adapting the PowerPC 403 ROM Monitor Software for a 512Kb Flash Device

XPS LL Tri-Mode Ethernet MAC Performance with Monta Vista Linux Author: Brian Hill

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

AN 588: 10-Gbps Ethernet Hardware Demonstration Reference Designs

Pre-tested System-on-Chip Design. Accelerates PLD Development

ACU-1000 Manual Addendum Replacement of CPM-2 with CPM-4

DE4 NetFPGA Packet Generator Design User Guide

Z8 Encore! XP F64xx Series Flash Microcontrollers. In-Circuit Emulator. User Manual UM

Mapping ITS s File Server Folder to Mosaic Windows to Publish a Website

Update Firmware from GUI

USER GUIDE EDBG. Description

Hypercom Key Loading and Management (HKLM) RS232 PPP Key Injection PC Setup Guide

64-Bit Compatibility with Micromeritics Applications

MicroBlaze Debug Module (MDM) v3.2

Tutorial for MPLAB Starter Kit for PIC18F

Developing an Application on Core8051s IP-Based Embedded Processor System Using Firmware Catalog Drivers. User s Guide

Plena Voice Alarm System Firmware update

Configuring the Switch with the CLI Setup Program

Using the HCS12 Serial Monitor on Wytec Dragon-12 boards. Using Motorola s HCS12 Serial Monitor on Wytec s Dragon-12 boards

CMP-102U. Quick Installation Guide

3.1 Connecting to a Router and Basic Configuration

Embedded Display Module EDM6070

Contents. Hardware Configuration Uninstalling Shortcuts Black...29

Prestige 650R-31/33 Read Me First

VoIP Laboratory B How to re flash an IP04

L Firmware And FPGA Configuration Upgrade

Fiery Clone Tool For Embedded Servers User Guide

Connecting the DG-102S VoIP Gateway to your network

ARKEL Vision ARL-500 Uzaktan Erişim ve İzleme Sistemi ARL-500 Remote Control and Monitoring System KULLANICI KILAVUZU USER MANUAL TR/EN

Vivado Design Suite Tutorial: Embedded Processor Hardware Design

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

File Transfers. Contents

Virtual COM Port Driver Installation Manual

The GV-I/O Box 8 Ports provides 8 inputs and 8 relay outputs, and supports both DC and AC output voltages.

Quick Start Guide. MRB-KW01 Development Platform Radio Utility Application Demo MODULAR REFERENCE BOARD

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

SLC 5/05 Processors Firmware/Operating System ControlFLASH Upgrade

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

DUKANE Intelligent Assembly Solutions

Section 5: Installing the Print Driver

Application Note: AN00141 xcore-xa - Application Development

HP Security Modules. Software Upgrade Guide. Part number: Document version: 6PW

WinCon Programmable Automation. Controller

User Manual Network Interface

Interfacing an HTML Form to the ez80f91 MCU

Implementation of Web-Server Using Altera DE2-70 FPGA Development Kit

HDMI 2.0 Implementation on Kintex UltraScale FPGA GTH Transceivers

Quick Note 32. Using Digi RealPort with a Digi TransPort Router. UK Support September 2012

Installation Instructions

Knowledge Base POS/C31A Troubleshooting

Network connectivity controllers

Getting Started Guide with WIZ550web

The GV-I/O Box 16 Ports provides 16 inputs and 16 relay outputs, and supports both DC and AC output voltages.

AT89C5131A Starter Kit... Software User Guide

Voice Over Internet Protocol (VoIP) Configuration

Prestige 324. Prestige 324. Intelligent Broadband Sharing Gateway. Version 3.60 January 2003 Quick Start Guide

ETHERNET WEATHER STATION CONNECTIONS Application Note 33

Prestige 324 Quick Start Guide. Prestige 324. Intelligent Broadband Sharing Gateway. Version V3.61(JF.0) May 2004 Quick Start Guide

E-Blocks Easy Internet Bundle

Guide to Installing BBL Crystal MIND on Windows 7

Table Of Contents. 2. Index iii

AN LPC1700 timer triggered memory to GPIO data transfer. Document information. LPC1700, GPIO, DMA, Timer0, Sleep Mode

Transcription:

MicroBlaze Spartan-3A Kit Reference Design Christophe Charpentier 7/20/2007 Software Tools Requirements EDK 9.1.02 ISE 9.1.03 Hardware Requirements Xilinx Spartan-3A Starter Kit board Rev. C or Rev. D USB Cable (provided with the Kit) Serial cable Ethernet cross-over cable Contents Two EDK projects using the same hardware build. system.xmp: memory test and system tests applications. A bootloader is provided for the system tests application to boot from NOR Flash. webserver.xmp: web server application based on XAPP433. A bootloader is provided for the web server application to boot from NOR Flash. Instructions to dual boot from the system tests application to the web server application are provided. Files and Directories: system.mhs: hardware system definition used by Xilinx Platform Studio system.mss: software settings for the system tests application webserver.mss: software settings for the web server application bootloader_systest: bootloader application for the system tests application bootloader_web: bootloader application for the web server application data\system.ucf: constraint file for the FPGA etc: FPGA implementation and download options pcores: custom peripherals directory System_Tests: system tests application TestApp_Memory: memory tests application WebPage: web page contents WebServer: web server application Embedded Processor System The Embedded processor system is the same for all applications. Some software applications might not use certain peripherals. The SOUTH push button is used for an external reset input. DCMs are used to generate the clocks needed for the system. The 50 MHz external oscillator is the external clock input. Refer to the Spartan-3A Starter Kit Board User Guide for information on components and features. Xilinx Platform Studio (XPS) is used to implement the hardware and software. The table below shows the embedded system specifics.

Version Address Map Type Speed Description MicroBlaze 6.00.b NA Processor I/D LMB Ctrl DDR2 SDRAM Ctrl Flash Ctrl RS232 DCE LEDs 8-bit DIP Switches 4-bit Buttons 3-bit Ethernet MAC Rotary switch Timer Interrupt Controller Character LCD Ctrl S3A ICAP Ctrl Debug Module 2.00.a 1.02.a 2.00.a 1.00.b 3.01.b 3.01.b 3.01.b 1.04.a 1.00.b 1.00.b 1.00.c 1.00.c 1.00.a 2.00.a 0x00000000 0x00003FFF 0x24000000 0x27FFFFFF 0x30000000 0x303FFFFF 0x40000000 0x4000FFFF 0x40010000 0x4001FFFF 0x40020000 0x4002FFFF 0x40040000 0x4004FFFF 0x40080000 0x4008FFFF 0x40400000 0x4040FFFF 0x40100000 0x4010FFFF 0x40200000 0x4020FFFF 0x40800000 0x4080FFFF 0x41000000 0x4100FFFF 0x41400000 0x4140FFFF System reset 1.00.a NA Memory EDK MCH OPB DDR2 EMC UartLite GPIO GPIO GPIO Ethernet Custom Peripheral Timer INTC Custom Peripheral Custom Peripheral MDM EDK PROC SYS RST 66.67 MHz 133 MHz 9600 Bauds 10/100 Mbps 4KB I-Cache, 4KB D-Cache 16KB of Internal Memory DDR2 memory, 32MB x 16 NOR Flash, 2MB x 16 Can store multiple HW and SW images UART using DCE port LEDs LED0 through LED7 Switches SW0 through SW3 Push Buttons North, East, and West Ethernet MAC, FIFO mode, no DMA Rotary switch control Timer/Counter peripheral 3 inputs: UART, Timer, and Ethernet Character LCD using 4-bit mode Internal Configuration Access Port Ctrl Used for multi-boot operations Connects to MicroBlaze for JTAG debug Reset block for MicroBlaze and busses Software Applications TestApp_Memory Simple DDR2 memory test included in the system.xmp and webserver.xmp projects. The application is located in the FPGA internal memory. System_Tests Included in the system.xmp project. The application tests the Ethernet MAC, Interrupt controller, LEDs, Rotary switch, and Character LCD. The code can be stored in Flash or downloaded through JTAG and is executed from DDR2 memory. bootloader_systest Included in the system.xmp project. The application copies an SREC formatted System_Tests application from Flash to DDR2. Follow the instructions below to store applications to Flash. The bootloader is located in the FPGA internal memory. WebServer Included in the webserver.xmp project. Refer to XAPP433 for details on the application. A new thread was added to control the character LCD with the Rotary switch. The code can be stored in Flash or downloaded through JTAG and is executed from DDR2 memory.

bootloader_web Included in the webserver.xmp project. The application copies an SREC formatted WebServer application as well as the web page Memory File System from Flash to DDR2. Follow the instructions below to store applications to Flash. The bootloader is located in the FPGA internal memory. Running the Memory Test 1. Open the system.xmp file using XPS 2. The Implementation is done by XPS a. Go to Hardware > Generate Bitstream to generate a bit file 3. Compile the code 4. Place the Memory Test in internal memory a. Right-click on TestApp_Memory and select Mark to Initialize BRAMs 5. Configure the FPGA a. Connect the USB cable b. Connect the serial cable c. Power on the S3A Starter Kit d. Open HyperTerminal at 9600,8,1, no parity e. Go to Device Configuration > Download Bitstream 6. The application will output the result of the DDR2 memory test to the serial terminal Running the System Tests Run the memory test above first. Continuing from Step 6 1. Open XMD a. Go to Debug > Launch XMD 2. Type: cd system_tests 3. Type: rst 4. Download the application to DDR2 a. In the XMD window type: dow executable.elf 5. Run the application a. In the XMD window type: run b. Close XMD by typing: exit 6. The application will output the result of the tests to the serial terminal and LCD. Rotating the rotary switch will change the LED outputs. Pushing on the rotary switch will exit the application Running the WebServer application For more information on the web server read XAPP433. The steps below are identical to the ones in XAPP433 except for step 5 on page 8. The address to download the MFS image is 0x25000000 instead of 0x2c000000 1. Open the webserver.xmp file using XPS 2. Clean the libraries a. Go to Software > Clean Libraries

3. Compile the code 4. Place the bootloop program in internal memory a. Right-click on Default: microblaze_0_bootloop and select Mark to Initialize BRAMs 5. Configure the FPGA a. Go to Device Configuration > Download Bitstream 6. Create the Memory File System image a. Go to Project > Launch EDK Shell b. Type: cd WebPage c. Type: mfsgen cvbfs../webserver/image.mfs 600 404.html index.html logov2005.gif xapp433.pdf d. Close the shell 7. Connect a cross-over Ethernet cable 8. Configure the Host PC Ethernet settings following the instructions in XAPP433.pdf 9. Download the WebServer application to memory a. Open XMD b. Type: rst c. Type: dow -data WebServer/image.mfs 0x25000000 d. Type: dow WebServer/executable.elf e. Type: con f. Type: exit 10. In the serial terminal, configure the Ethernet address for the target following the instructions from XAPP433 11. The rotary switch will update the first line of the LCD. Pushing on the switch will update Line 2 with the contents of Line 1 12. Open a web browser a. Type: http:/x.x.x.x:80 (use the IP address configured above in step 10) b. Follow the instructions on the web page Storing the FPGA configurations and software images in Flash These steps are optional. It is recommended to set the board configuration mode to JTAG while doing the steps below. Download the MicroBlaze BPI Flash Programmer design on the S3A Starter Kit reference design page. The S3A Starter Kit includes a 32Mb NOR Flash which can be used to configure the FPGA and store software images and data files. Multiple configurations and images can be stored simultaneously. In this reference design, the System Tests application can start a reconfiguration of the FPGA with the WebServer application. Refer to the Spartan-3 Generation Configuration User Guide to learn about MultiBoot and Master BPI Mode Configuration. Below is the address map of the Flash contents used for this reference design (as viewed from MicroBlaze). A 3S700A configuration file takes up 6 blocks of Flash memory. The System_Tests application takes 2 blocks, the WebServer application 7 blocks, and the image.mfs 5 blocks. The Flash could store more configurations and software images in the unused space.

First FPGA Configuration bootloader_systests in internal memory System_Tests Application SREC Format Second FPGA Configuration Bootloader_web in internal memory WebServer Application SREC Format WebPage Memory File System Unused 0x30000000 0x3005FFFF 0x30060000 0x3007FFFF 0x30080000 0x300DFFFF 0x300E0000 0x30140000 0x30150000 0x3019FFFF 0x301A0000 0x303FFFFF The Master BPI configuration mode uses the Flash in 8-bit mode while the embedded processor system uses the Flash in 16-bit mode. Using the Flash Programmer with the current XPS projects would cause configuration bytes to be swapped. An XPS project with the Flash configured for 8-bit mode has to be used to program the Flash with the FPGA configuration images. Preparing the FPGA configuration files The first FPGA configuration will contain the FPGA bit file as well as the System_Tests bootloader. The second FPGA configuration will contain the same FPGA bit file but with the WebServer bootloader. 1. Open the S3A Kit Reference Design system.xmp file using XPS 2. Clean the libraries a. Go to Software > Clean Libraries 3. Compile the code 4. Place the bootloader_systests program in internal memory a. Right-click on bootloader_systests and select Mark to Initialize BRAMs 5. Update the FPGA configuration file with the bootloader code a. Go to Device Configuration > Update Bitstream 6. Open impact (Xilinx ISE 9.1i > Accessories) a. Double-click on "PROM File Formatter". Click Next b. Select Xilinx PROM, "BIN" file format, systest_boot as name and select the location directory for the generated files. Click Next c. Select "Auto Select PROM". Click Next. Click Finish. Click OK d. Select the download.bit file in the S3A Kit Reference Design implementation directory e. Select "No" when asked to add another device file. Click OK f. Double-click on "Generate File..." g. The systest_boot.bin file is a binary version of the FPGA bit file 7. Open the webserver.xmp file using XPS 8. Clean the libraries a. Go to Software > Clean Libraries 9. Compile the code

10. Place the bootloader_web program in internal memory a. Right-click on bootloader_web and select Mark to Initialize BRAMs 11. Update the FPGA configuration file with the bootloader code a. Go to Device Configuration > Update Bitstream 12. Open impact (Xilinx ISE 9.1i > Accessories) a. Double-click on "PROM File Formatter". Click Next b. Select Xilinx PROM, "BIN" file format, web_boot as name and select the location directory for the generated files. Click Next c. Select "Auto Select PROM". Click Next. Click Finish. Click OK d. Select the download.bit file in the S3A Kit Reference Design implementation directory e. Select "No" when asked to add another device file. Click OK f. Double-click on "Generate File..." g. The web_boot.bin file is a binary version of the FPGA bit file 13. The FPGA configuration files, system_boot.bin and web_boot.bin are ready to be programmed into Flash. Programming the FPGA configuration files into Flash These steps require the use of the MicroBlaze BPI Flash Programmer design previously downloaded. We will program the first image with no offset. The second image will be programmed at Flash offset 0x800000. 1. Open the BPI Flash Programmer system.xmp file with XPS 2. The system contains a. MicroBlaze v6 running at 50MHz b. LMB BRAM (32KB) c. OPB EMC Controller for BPI Flash (4MB) d. Hardware Debug Module 3. The Implementation is done by XPS a. Go to Hardware > Generate Bitstream to generate a bit file 4. Configure the FPGA a. Power on the S3A Starter Kit. Connect the USB cable b. Go to Device Configuration > Download Bitstream 5. Go to Device Configuration > Program Flash Memory 6. Select the "system_boot.bin" file generated by impact. Click OK 7. Look at the XPS Console Window to verify that the Flash programming completed successfully 8. Go to Device Configuration > Program Flash Memory 9. Select the "web_boot.bin" file generated by impact. Select an offset of 0x00800000. Click OK 10. Look at the XPS Console Window to verify that the Flash programming completed successfully 11. Close the XPS project Programming the Software Images into Flash The System_Tests and WebServer executables will be converted to SREC format before being programmed into Flash. The web page Memory File System will be programmed as is. The System_Tests application will be modified to enable MultiBoot. 1. Open the S3A Kit Reference Design system.xmp file using XPS 2. Clean the libraries

a. Go to Software > Clean Libraries 3. Modify the System_Tests code to enable MultiBoot a. Expand the Sources for the System_Tests application b. Double-click on system_tests.c c. At the end of the file uncomment: XIo_Out32(XPAR_OPB_S3A_ICAP_0_BASEADDR, 0x00080000); d. This will start a reconfiguration starting at Flash address 0x800000 where the second FPGA configuration is located. 4. Compile the code 5. Place the Default: microblaze_0_bootloop program in internal memory a. Right-click on Default: microblaze_0_bootloop and select Mark to Initialize BRAMs 6. Configure the FPGA a. Go to Device Configuration > Download Bitstream 7. Program the System_Tests application into Flash at offset 0x60000 a. Go to Device Configuration > Program Flash Memory b. Select the executable.elf file from the System_Tests directory c. Check the box Auto-convert file to bootloadable SREC format when programming Flash d. Select an offset of 0x00060000 e. Click OK f. Look at the XPS Console Window to verify that the Flash programming completed successfully 8. Close the system.xmp project 9. Open the S3A Kit Reference Design webserver.xmp file using XPS 10. Clean the libraries a. Go to Software > Clean Libraries 11. Compile the code 12. Place the Default: microblaze_0_bootloop program in internal memory a. Right-click on Default: microblaze_0_bootloop and select Mark to Initialize BRAMs 13. Program the WebServer application into Flash at offset 0xE0000 a. Go to Device Configuration > Program Flash Memory b. Select the executable.elf file from the WebServer directory c. Check the box Auto-convert file to bootloadable SREC format when programming Flash d. Select an offset of 0x000E0000 e. Click OK f. Look at the XPS Console Window to verify that the Flash programming completed successfully 14. Program the image.mfs Memory File System into Flash at offset 0x150000 a. Go to Device Configuration > Program Flash Memory b. Select the image.mfs file from the WebServer directory c. Select an offset of 0x00150000

d. Click OK e. Look at the XPS Console Window to verify that the Flash programming completed successfully 15. Close XPS 16. Power off the S3A Starter Kit board Running from Flash The FPGA configuration files and software images are now programmed into Flash. Change the board configuration mode to BPI Up. Connect the serial cable (9600) and Ethernet cable. After powering up the board the sequence of events will be: 1. The FPGA will be configured with the MicroBlaze system 2. The internal bootloader will load the System_Tests application from Flash to DDR2 3. The System_Tests application will execute from DDR2 4. Pressing the rotary switch button at the end of the tests will trigger a reconfiguration with the FPGA image stored at address 0x800000 5. The internal bootloader for the new configuration will load the image.mfs and WebServer application from Flash to DDR2 6. The WebServer application will execute from DDR2 7. Follow the earlier directions about running the WebServer application