170
MicroBlaze Processor Reference Guide
UG081 (v14.7)
Chapter 5:
MicroBlaze Instruction Set Architecture
bge
Branch if Greater or Equal
Description
Branch if rA is greater or equal to 0, to the instruction located in the offset value of rB. The target of
the branch will be the instruction at address PC + rB.
The mnemonic bged will set the D bit. The D bit determines whether there is a branch delay slot or
not. If the D bit is set, it means that there is a delay slot and the instruction following the branch (that
is, in the branch delay slot) is allowed to complete execution before executing the target instruction.
If the D bit is not set, it means that there is no delay slot, so the instruction to be executed after the
branch is the target instruction.
Pseudocode
If rA >= 0 then
PC
←
PC + rB
else
PC
←
PC + 4
if D = 1 then
allow following instruction to complete execution
Registers Altered
•
PC
Latency
•
1 cycle (if branch is not taken)
•
2 cycles (if branch is taken and the D bit is set)
•
3 cycles (if branch is taken and the D bit is not set)
Note
A delay slot must not be used by the following: imm, branch, or break instructions. Interrupts and
external hardware breaks are deferred until after the delay slot branch has been completed.
bge
rA, rB
Branch if Greater or Equal
bged
rA, rB
Branch if Greater or Equal with Delay
1 0 0 1 1 1 D 0 1 0 1
rA
rB
0 0 0
0
0 0 0 0 0 0 0
0
6
1
1
1
6
2
1
3
1
Содержание MicroBlaze
Страница 1: ...MicroBlaze Processor Reference Guide Embedded Development Kit EDK 14 7 UG081 v14 7...
Страница 4: ...MicroBlaze Processor Reference Guide www xilinx com UG081 v14 7...
Страница 8: ...8 www xilinx com MicroBlaze Processor Reference Guide UG081 v14 7 Chapter 1 Introduction Send Feedback...
Страница 262: ...262 www xilinx com MicroBlaze Processor Reference Guide UG081 v14 7 Send Feedback...