Xilinx UG133 User Manual

MicroBlaze Microcontroller Reference Design User Guide v1.3.1
UG133 v1.3.1 January 7, 2005
R
R
CoolRunner, RocketChips, Rocket IP, Spartan, StateBENCH, StateCAD, Virtex, XACT, XC2064, XC3090, XC4005, and XC5210 are registered trademarks of Xilinx, Inc.
The shadow X shown above is a trademark of Xilinx, Inc.
ACE Controller, ACE Flash, A.K.A. Speed, Alliance Series, AllianceCORE, Bencher, ChipScope, Configurable Logic Cell, CORE Generator, CoreLINX, Dual Block, EZTag, Fast CLK, Fast CONNECT, Fast FLASH, FastMap, Fast Zero Power, Foundation, Gigabit Speeds...and Beyond!, HardWire, HDL Bencher, IRL, J Drive, JBits, LCA, LogiBLOX, Logic Cell, LogiCORE, LogicProfessor, MicroBlaze, MicroVia, MultiLINX, NanoBlaze, PicoBlaze, PLUSASM, PowerGuide, PowerMaze, QPro, Real-PCI, RocketIO, SelectIO, SelectRAM, SelectRAM+, Silicon Xpresso, Smartguide, Smart-IP, SmartSearch, SMARTswitch, System ACE, Testbench In A Minute, TrueMap, UIM, VectorMaze, VersaBlock, VersaRing, Virtex-II Pro, Virtex-II EasyPath, Wave Table, WebFITTER, WebPACK, WebPOWERED, XABEL, XACT­Floorplanner, XACT-Performance, XACTstep Advanced, XACTstep Foundry, XAM, XAPP, X-BLOX +, XC designated products, XChecker, XDM, XEPLD, Xilinx Foundation Series, Xilinx XDTV, Xinfo, XSI, XtremeDSP and ZERO+ are trademarks of Xilinx, Inc.
The Programmable Logic Company is a service mark of Xilinx, Inc.
All other trademarks are the property of their respective owners.
Xilinx, Inc. does not assume any liability arising out of the application or use of any product described or shown herein; nor does it convey any license under its patents, copyrights, or maskwork rights or any rights of others. Xilinx, Inc. reserves the right to make changes, at any time, in order to improve reliability, function or design and to supply the best product possible. Xilinx, Inc. will not assume responsibility for the use of any circuitry described herein other than circuitry entirely embodied in its products. Xilinx provides any design, code, or information shown or described herein "as is." By providing the design, code, or information as one possible implementation of a feature, application, or standard, Xilinx makes no representation that such implementation is free from any claims of infringement. You are responsible for obtaining any rights you may require for your implementation. Xilinx expressly disclaims any warranty whatsoever with respect to the adequacy of any such implementation, including but not limited to any warranties or representations that the implementation is free from claims of infringement, as well as any implied warranties of merchantability or fitness for a particular purpose. Xilinx, Inc. devices and products are protected under U.S. Patents. Other U.S. and foreign patents pending. Xilinx, Inc. does not represent that devices shown or products described herein are free from patent infringement or from any other third party right. Xilinx, Inc. assumes no obligation to correct any errors contained herein or to advise any user of this text of any correction if such be made. Xilinx, Inc. will not assume any liability for the accuracy or correctness of any engineering or software support or assistance provided to a user.
Xilinx products are not intended for use in life support appliances, devices, or systems. Use of a Xilinx product in such applications without the written consent of the appropriate Xilinx officer is prohibited.
The contents of this manual are owned and copyrighted by Xilinx. Copyright 1994-2003 Xilinx, Inc. All Rights Reserved. Except as stated herein, none of the material may be copied, reproduced, distributed, republished, downloaded, displayed, posted, or transmitted in any form or by any means including, but not limited to, electronic, mechanical, photocopying, recording, or otherwise, without the prior written consent of Xilinx. Any unauthorized use of any material contained in this manual may violate copyright laws, trademark laws, the laws of privacy and publicity, and communications regulations and statutes.
UG133 v1.3.1 January 7, 2005 www.xilinx.com MicroBlaze Microcontroller Ref Des User Guide
MicroBlaze Microcontroller Ref Des User Guide UG133 v1.3.1 January 7, 2005
The following table shows the revision history for this document.
Version Revision
7/22/04 1.0 Initial Xilinx release.
8/27/04 1.1 Edited content; imported new images
11/19/04 1.2 Reconfigured book; added new chapter; incorporated edits
11/30/04 1.3 Reformatted book to consist of chapters for Overview and RefDes1
1/7/05 1.3.1 Made minor non-technical changes only.
UG133 v1.3.1 January 7, 2005 www.xilinx.com MicroBlaze Microcontroller Ref Des User Guide
About This Guide
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Guide Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Typographical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Online Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Microcontroller Reference Design Overview
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
MicroBlaze Microcontroller
Reference Design Number 1
Reference Design Building Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Features: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Getting Started. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Downloading the Reference Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Downloading the Design and Launching XPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Updating and Generation Hardware Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Downloading Design Files to the FPGA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Selecting a Software Application to Run When the FPGA is Configured . . . . . . . . . . . 6
Loading the “Calculator_App” Software Application . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Running the Calculator_App program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Selecting a Software Application to be Loaded with a BOOT Loader
after the FPGA is Configured and the Processor is Running. . . . . . . . . . . . . . . . . . . 8
Updating and Generation Hardware Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Loading the “microblaze_0_xmdstub” Software Application . . . . . . . . . . . . . . . . . . . . 9
Loading the “TestApp” Software Application with XMD_STUB . . . . . . . . . . . . . . . . 10
Loading the “Calculator_App” Software Application with XMD_STUB . . . . . . . . . . 11
Additional MicroBlaze and EDK Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
UG133 January 7, 2005 www.xilinx.com MicroBlaze Microcontroller Ref Des User Guide
R
About This Guide

Introduction

This user guide contains information on how to integrate the stand-alone, prebuilt, MicroBlaze Microcontroller reference design into an FPGA. Although this design is targeted initially for the Xilinx Spartan-3 Starter Kit Board, the design may be modified readily for any Xilinx or third party platform.
This guide is an aid in getting started and learning how to use the Xilinx Embedded Development Kit (EDK) tools. It does this through examples, which show how multiple software images can be run on a defined soft Microcontroller hardware configuration. This guide show how an FPGA with a soft processor can be used the same way an engineer would select an off the shelf microcontroller. This guide will provide examples of a number of different microcontroller configurations from which an engineer can choose. The soft microcontroller features and peripherals in the FPGA may be used without modification, or may be modified and customized using the Xilinx EDK Platform Studio tools. This guide will cover the flow where multiple software images are load on an unmodified hardware configuration.
The MicroBaze Microcontroller is an integrated solution intended for implementation of an embedded controller in FPGA by a user without extensive knowledge of the Xilinx Embedded Development Kit (EDK) and the Xilinx Platform Studio (XPS). The solution offered in this document is a minimal implementation that can be expanded easily to include other peripherals and application software for different usage.
All the necessary documentation, references, HDL code, sample codes, software drivers and application software are included in the tools or provided with this design.

Guide Contents

This manual contains the following sections:
“Microcontroller Reference Design Overview”
“MicroBlaze Microcontroller Reference Design Number 1”
MicroBlaze Microcontroller Ref Des User Guide www.xilinx.com 1
UG133 January 7, 2005

Additional Resources

Additional Resources
For additional information, go to http://support.xilinx.com. The following table lists some of the resources available from this website. You can also directly access these resources using the provided URLs.
Resource Description/URL
Tut or ia ls Tutorials covering Xilinx design flows, from design entry to
Answer Browser Database of Xilinx solution records
Application Notes Descriptions of device-specific design techniques and approaches
Data Sheets Device-specific information on Xilinx device characteristics,
R
verification and debugging
http://support.xilinx.com/support/techsup/tutorials/index.htm
http://support.xilinx.com/xlnx/xil_ans_browser.jsp
http://support.xilinx.com/apps/appsweb.htm
including readback, boundary scan, configuration, length count, and debugging
http://support.xilinx.com/xlnx/xweb/xil_publications_index.jsp

Conventions

Typographical

Problem Solvers Interactive tools that allow you to troubleshoot your design issues
http://support.xilinx.com/support/troubleshoot/psolvers.htm
Tech Tips Latest news, design tips, and patch information for the Xilinx
design environment
http://www.support.xilinx.com/xlnx/xil_tt_home.jsp
This document uses the following conventions. An example illustrates each convention.
The following typographical conventions are used in this document:
Convention Meaning or Use Example
Messages, prompts, and
Courier font
Courier bold
program files that the system displays
Literal commands that you enter in a syntactical statement
speed grade: - 100
ngdbuild design_name
Commands that you select
Helvetica bold
MicroBlaze Microcontroller Ref Des User Guide www.xilinx.com 2
UG133 January 7, 2005
from a menu
Keyboard shortcuts Ctrl+C
File Open
Loading...
+ 12 hidden pages