background image

MicroBlaze Microcontroller Ref Des User Guide

www.xilinx.com

8

UG133 January 7, 2005

Selecting a Software Application to be Loaded with a BOOT Loader after the FPGA is 

R

The Calculator_App is a simple 3 function calculator. The 3 right most push button 
switches are Add (BTN0), Sub (BTN1), Mult (BTN2). The left most push button switch 
(BTN3) is a program reset, which will clear the calculator program. If the reset is pushed at 
this time, then the FPGA will need to be re-loaded.

The eight toggle switches directly under the 7-Segment display are divided into two 4 bit 
words. When the Add, Sub, or Mult push button switches are pushed, the selected 
calculator operation will be performed on the value of the toggle switches. If the toggle 
switches are set to:

Sw7=off, Sw6=off, Sw5=off, Sw4=off, Sw3=off, Sw2=off, Sw1=off, Sw0=off

Where Word 1 is 0 and Word 0 is 0

Add: 0+0=0

Sub: 0-0=0

Mult 0*0=0

If the toggle switches are set to:

Sw7=off, Sw6=off, Sw5=off, Sw4=

ON

, Sw3=off, Sw2=off, Sw1=

ON

, Sw0=

ON

Where Word 1 is 1 and Word 0 is 3

Add: 3+1=4

Sub: 3-1=2

Mult 3*1=3

Each time one of the Push Button switches is pressed, the result should be displayed in 
‘decimal’ on the 7-Seg display, and it will also be sent to the hyperterminal through the 
UART. The hyperterminal display should show:

3 + 1 = 4

Push button to start math operation...

3 - 1 = 2

Push button to start math operation...

3 * 1 = 3

Push button to start math operation...

The next section will show how to load this same program after the FPGA has been 
configured.

Selecting a Software Application to be Loaded with a BOOT 
Loader after the FPGA is Configured and the Processor is Running

This step will show an example of how a Hardware Application can be initially loaded 
with a “Stub” program. This will configure the MicroBlaze Microcontroller where it is 
waiting to be loaded with the actual Software Application. 

Updating and Generation Hardware Files

Please select the XPS software Application tab. There are 3 options that can be selected 
when choosing the Software Application. This example will show how a Software 
Application can be loaded after the FPGA is configured. A Software Applications can be 

Summary of Contents for MicroBlaze

Page 1: ...R MicroBlaze Microcontroller Reference Design User Guide v1 3 1 UG133 v1 3 1 January 7 2005...

Page 2: ...cribed 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 p...

Page 3: ...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 adde...

Page 4: ...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 Calcul...

Page 5: ...ontroller 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 Xi...

Page 6: ...ce specific information on Xilinx device characteristics including readback boundary scan configuration length count and debugging http support xilinx com xlnx xweb xil_publications_index jsp Problem...

Page 7: ...connected Square brackets An optional entry or parameter However in bus specifications such as bus 7 0 they are required ngdbuild option_name design_name Braces A list of items from which you must cho...

Page 8: ...peripherals This guide is provided as 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 im...

Page 9: ...esign includes an Internal Block RAM memory an RS232 UART 4 GPIO blocks and a JTAG_UART used for software debugging This configuration utilizes approximately 50 of a Spartan 3 XC3S200 device Applicati...

Page 10: ...onfigured as output ports to drive the 7 segment LEDs on the board 8 bit GPIO configured as input ports to read onboard dip switches 3 bit GPIO configured as input ports to read push buttons JTAG_UART...

Page 11: ...st application Launching Xilinx Platform Studios XPS Downloading the Reference Designs Go to the MicroBlaze lounge at http www xilinx com microblaze_mcu_refdes1 Download the reference design starting...

Page 12: ...pplication can run any number of Software Applications When the Base System Wizard is used to create a Hardware System it also will create a simple Software Application to test the selected Hardware f...

Page 13: ...tstream This will configure the MicroBlaze Microcontroller program and Data memory with the software application already pre loaded This means that as soon as the FPGA has been successfully configured...

Page 14: ...f the PC On the PC using hyperterminal make certain that the bit rate is set for 57600 bps on the serial port 3 Turn on the power on to the Spartan 3 Evaluation Board 4 In XPS to make sure that the EL...

Page 15: ...w1 ON Sw0 ON Where Word 1 is 1 and Word 0 is 3 Add 3 1 4 Sub 3 1 2 Mult 3 1 3 Each time one of the Push Button switches is pressed the result should be displayed in decimal on the 7 Seg display and it...

Page 16: ...over it Verify that this is the case for microblaze_0_bootloop Project TestApp and Project Calculator_App If any are set please Right click and confirm that Mark to Initialize BRAMs is not checked If...

Page 17: ...select Tools Software Debugger to open the GDB interface Source Window 2 Choose TestApp from the User Application window 3 In GDB select the File Target Settings to display the Target Selection dialog...

Page 18: ...ram repeat the procedure in section Loading the TestApp Software Application with XMD_STUB Start with step 1 and choose Calculator_App in step 5 instead of TestApp See Running the Calculator_App progr...

Reviews: