EasyManuals Logo

Xilinx MicroBlaze Reference Guide

Xilinx MicroBlaze
316 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #187 background imageLoading...
Page #187 background image
MicroBlaze Processor Reference Guide 188
UG984 (v2018.2) June 21, 2018 www.xilinx.com
Chapter 4: MicroBlaze Application Binary Interface
The architecture for MicroBlaze defines 32 general purpose registers (GPRs). These registers
are classified as volatile, non-volatile, and dedicated.
The volatile registers (also known as caller-save) are used as temporaries and do not
retain values across the function calls. Registers R3 through R12 are volatile, of which
R3 and R4 are used for returning values to the caller function, if any. Registers R5
through R10 are used for passing parameters between subroutines.
Registers R19 through R31 retain their contents across function calls and are hence
termed as non-volatile registers (a.k.a callee-save). The callee function is expected to
save those non-volatile registers, which are being used. These are typically saved to the
stack during the prologue and then reloaded during the epilogue.
Certain registers are used as dedicated registers and programmers are not expected to
use them for any other purpose.
-
Registers R14 through R17 are used for storing the return address from interrupts,
sub-routines, traps, and exceptions in that order. Subroutines are called using the
branch and link instruction, which saves the current Program Counter (PC) onto
register R15.
-
Small data area pointers are used for accessing certain memory locations with 16-
bit immediate value. These areas are discussed in the memory model section of this
document. The read only small data area (SDA) anchor R2 (Read-Only) is used to
access the constants such as literals. The other SDA anchor R13 (Read-Write) is used
for accessing the values in the small data read-write section.
-
Register R1 stores the value of the stack pointer and is updated on entry and exit
from functions.
-
Register R18 is used as a temporary register for assembler operations.
MicroBlaze includes special purpose registers such as:
-
program counter (rpc)
-
machine status register (rmsr)
-
exception status register (resr)
-
exception address register (rear)
-
floating-point status register (rfsr), branch target register (rbtr)
-
exception data register (redr)
-
memory management registers (rpid, rzpr, rtlblo, rtlbhi, rtlbx, rtlbsx)
-
processor version registers (0-12)
These registers are not mapped directly to the register file; and hence, the usage of these
registers is different from the general purpose registers. The value of a special purpose
registers can be transferred to or from a general purpose register by using mts and mfs
instructions respectively.
Send Feedback

Table of Contents

Other manuals for Xilinx MicroBlaze

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Xilinx MicroBlaze and is the answer not in the manual?

Xilinx MicroBlaze Specifications

General IconGeneral
Architecture32-bit RISC
CacheConfigurable Instruction and Data Cache
CategorySoft Processor Core
Data Width32-bit
Memory Management Unit (MMU)Optional
Floating Point Unit (FPU)Optional
Interrupt ControllerConfigurable
Memory ManagementOptional MMU
ConfigurabilityHighly Configurable
Pipeline Stages3-stage
FPGA IntegrationXilinx FPGAs
Bus InterfacePLB
Debug InterfaceJTAG
Typical Clock SpeedVaries depending on FPGA and configuration (e.g., 100-400+ MHz)
ImplementationSoft core (synthesized logic)
Maximum PerformanceVaries with FPGA and configuration
Debug SupportIntegrated Debug Module

Related product manuals