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 #188 background imageLoading...
Page #188 background image
MicroBlaze Processor Reference Guide 189
UG984 (v2018.2) June 21, 2018 www.xilinx.com
Chapter 4: MicroBlaze Application Binary Interface
Stack Convention
The stack conventions used by MicroBlaze are detailed in Table 4-3.
The shaded area in Table 4-3 denotes a part of the stack frame for a caller function, while
the unshaded area indicates the callee frame function. The ABI conventions of the stack
frame define the protocol for passing parameters, preserving non-volatile register values,
and allocating space for the local variables in a function.
Functions that contain calls to other subroutines are called as non-leaf functions. These
non-leaf functions have to create a new stack frame area for its own use. When the program
starts executing, the stack pointer has the maximum value. As functions are called, the stack
pointer is decremented by the number of words required by every function for its stack
frame. The stack pointer of a caller function always has a higher value as compared to the
callee function.
Table 4-3: Stack Convention
Consider an example where Func1 calls Func2, which in turn calls Func3. The stack
representation at different instances is depicted in
Table 4-1. After the call from Func 1 to
Func 2, the value of the stack pointer (SP) is decremented. This value of SP is again
decremented to accommodate the stack frame for Func3. On return from Func 3 the value
of the stack pointer is increased to its original value in the function, Func 2.
High Address
Function Parameters for called sub-routine (Arg n .. Arg1)
(Optional: Maximum number of arguments required for any
called procedure from the current procedure).
Old Stack
Pointer
Link Register (R15)
Callee Saved Register (R31....R19)
(Optional: Only those registers which are used by the
current procedure are saved)
Local Variables for Current Procedure
(Optional: Present only if Locals defined in the procedure)
Functional Parameters (Arg n .. Arg 1)
(Optional: Maximum number of arguments required for any
called procedure from the current procedure)
New Stack
Pointer
Link Register
Low Address
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