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 #252 background imageLoading...
Page #252 background image
MicroBlaze Processor Reference Guide 253
UG984 (v2018.2) June 21, 2018 www.xilinx.com
Chapter 5: MicroBlaze Instruction Set Architecture
Description
This instruction ensures that outstanding memory accesses on memory interfaces are
completed before any subsequent instructions are executed. This is necessary to guarantee
that self-modifying code is handled correctly, and that a DMA transfer can be safely started.
With self-modifying code, it is necessary to first use an MBAR instruction to wait for data
accesses, which can be done by setting IMM to 1, and then use another MBAR instruction to
clear the Branch Target Cache and empty the instruction prefetch buffer, which can be done
by setting IMM to 2.
To ensure that data to be read by a DMA unit has been written to memory, it is only
necessary to wait for data accesses, which can be done by setting IMM to 1.
When MicroBlaze is configured to use an MMU (C_USE_MMU >= 1) this instruction is
privileged when the most significant bit in IMM is set to 1. This means that if the instruction
is attempted in User Mode (
MSR[UM] = 1) a Privileged Instruction exception occurs.
When the two most significant bits in IMM are set to 10 (Sleep), 01 (Hibernate), or 11
(
Suspend) and no exception occurs, MicroBlaze enters sleep mode after all outstanding
accesses have been completed. and sets the
Sleep, Hibernate or Suspend output signal
respectively to indicate this. The pipeline is halted, and MicroBlaze will not continue
execution until a bit in the
Wakeup input signal is asserted.
Pseudocode
if (IMM & 1) = 0 then
wait for instruction side memory accesses
if (IMM & 2) = 0 then
wait for data side memory accesses
PC
PC + 4
if (IMM & 24)!= 0 then
enter sleep mode
Registers Altered
•PC
ESR[EC], in case a privileged instruction exception is generated
Latency
2 + N cycles when C_INTERCONNECT = 2 (AXI)
8 + N cycles when C_INTERCONNECT = 3 (ACE)
N is the number of cycles to wait for memory accesses to complete
Notes
This instruction must not be preceded by an imm instruction, and must not be placed in a delay slot.
The assembler pseudo-instructions sleep, hibernate, and suspend can be used instead of “mbar 16”,
“mbar 8”, and “mbar 24” respectively to enter sleep mode.
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