RTL: The Branch Instruction
beq rs, rt, imm16
mem[PC] Fetch the instruction from memory
Cond <- R[rs] - R[rt] Calculate the branch condition
if (COND eq 0) Calculate the next instruction’s address
PC <- PC + 4 + ( SignExt(imm16) x 4 )
else
PC <- PC + 4
Previous slide
Next slide
Back to first slide
View graphic version