Instructions

bri

Unconditional Branch Immediate

 

bri

IMM

Branch Immediate

 

brai

IMM

Branch Absolute Immediate

 

brid

IMM

Branch Immediate with Delay

 

braid

IMM

Branch Absolute Immediate with Delay

 

brlid

rD, IMM

Branch and Link Immediate with Delay

 

bralid

rD, IMM

Branch Absolute and Link Immediate with Delay

R

1 0 1 1 1 0

rD

D A L 0 0

IMM

0

6

11

16

31

Description

Branch to the instruction located at address determined by IMM, sign-extended to 32 bits.

The mnemonics brlid and bralid will set the L bit. If the L bit is set, linking will be performed. The current value of PC will be stored in rD.

The mnemonics brai, braid and bralid will set the A bit. If the A bit is set, it means that the branch is to an absolute value and the target is the value in IMM, otherwise, it is a relative branch and the target will be PC + IMM.

The mnemonics brid, braid, brlid and bralid 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 (i.e. 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 L = 1 then

(rD) PC

if A = 1 then PC (IMM)

else

PC PC + (IMM) if D = 1 then

allow following instruction to complete execution

Registers Altered

rD

PC

Latency

2 cycles (if the D bit is set)

3 cycles (if the D bit is not set)

MicroBlaze Processor Reference Guide

www.xilinx.com

93

UG081 (v6.0) June 1, 2006

1-800-255-7778

 

Page 93
Image 93
Xilinx EDK 8.2i manual Bri