Professional Documents
Culture Documents
Demonstration Board
Tutorial
Computer Electronics
1
st
Semester, 2010
1 Introduction
This tutorial introduces the MicroBlaze (MB) softcore processor [2] for Xilinx Field Pro-
grammable Gate Array (FPGA) devices [3] and gives an example of this cores utilization
for implementing image processing algorithms. Furthermore, a detailed analysis on how to
attach several peripherals to the MB basic architecture in order to enhance interoperability
between a demonstration boards modules and this processor will be provided.
The system design will be accomplished employing the Xilinx ISE and Embedded Devel-
opment Kit (EDK) tools [4], version 10.1.03. The implementation will be supported on the
Digilent S3 starterkit board [1] which embed a Xilinx Spartan 3 FPGA (part XC3S1000-4).
Before going through this tutorial the students are suggested to:
understand the internal components and organization of the FPGA devices;
have a comprehensive reading on the MB processor architecture and supported instruc-
tions;
develop their familiarity with the Xilinx EDK environment;
know basic concepts of C and assembly language;
know basic concepts of VHDL hardware description language.
After the completion of this tutorial the students are intended to know how to:
implement a MB processor with their own conguration;
design their own peripherals;
eciently characterize an algorithm in software and hardware components for an FPGA
system;
This tutorial is organized as follows. In section 2 the background on the MB softcore and the
hardware modules is described. Section 3 nalizes with an introductory example conguration
of a MB based system.
1
2 Preliminaries
In this section we introduce the basic concepts of the FPGA powered Digilent S3 starterkit
board and the MB software processor.
2.1 Digilent S3 starterkit board
This board integrates several devices, which functionality can be exploited by the possible
embedded FPGA congurations. Among these devices are a 50MHz clock generator; SRAM;
VGA, PS2, and serial ports; and leds, switches and buttons. These devices are statically
assigned to the FPGA pads, thus in order to control these devices the proper digital words
may be forwarded to the correct FPGA pads by the user conguration. For full details on this
board the students may refer to [1].
2.2 Microblaze softcore
The use of softcores is a way to speedup the development of digital systems, since these (op-
timized) softcores are usually provided by the physical devices suppliers with several cong-
uration options that the user can set to suit his demands, avoiding the large development
time/costs of a dedicated solution, by shifting the eorts from the hardware design to a soft-
ware design. The time from design to the implementation using these softcores is typically
very short, since the developers are provided with user-friendly wizard-like tools that export
the most suitable conguration for the user applications. The MB softcore is not an exception.
The MB is provided by the Xilinx FPGA supplier, and a complete programming environment
is provided to deal with the conguration of this softcore. This programming environment is
the EDK and supports not only the conguration of the MB softcore, but also of the PowerPC
processor which is a processor available in some of the Xilinxs FPGA platforms.
The MB softcore is a Reduced Instruction Set Computer (RISC) processor implemented
employing the FPGA internal resources (arithmetic, logic and memory). The resources it uses
depend on the conguration. Also, several peripherals can be embedded in this processor al-
lowing, e.g., for enhanced I/O communication, dedicated computation of critical routines. MB
is a processor with a word length of 32 bits, has 32 registers and can be congured to use
cache memory for data and instructions. Its micro-architecture is depicted in Figure 1. The
MB maximum operating frequency depends on the conguration and available resources. More
complex/shorter pipeline congurations may have higher critical path, thus lower frequency.
Also, with fewer resources the options to place the MB in the device are reduced, thus the rout-
ing demands would be higher and, consequently, the operating frequency lower. Nevertheless,
the maximum operating is usually between 50 MHz and 100MHz. The MB allows two dierent
pipeline depths (3 or 5 stage), depending on the user goals (resource saving or high perfor-
mance). Conicts in the pipeline are resolved using stalls and the pipeline stages are relled
during the conditional jumps. Figure 2 depicts the introduction of the stall instructions for a
three-stage pipeline (fetch, decode and execute). MicroBlaze uses a Big-Endian bit-reversed
data type organization in which the most signicant byte is stored in the lower memory address
(see Figure 3). For more details about the MB softcore the students should refer to [2].
2
10 www.xilinx.com MicroBlaze Processor Reference Guide
1-800-255-7778 UG081 (v9.0)
Chapter 1: MicroBlaze Architecture
R
Overview
The MicroBlaze embedded processor soft core is a reduced instruction set computer (RISC)
optimized for implementation in Xilinx