Adding Jump and Branch to Datapath (Cont.)

The Datapath Including Jump and Branch Functions
The datapath below includes jump (j) and branch-on-equal (beq) / branch-on-not-equal (bne) functions and additional control signals include:


  • J, Beq, and Bne are for jump and branch instructions.

  • Zero condition of the ALU is examined for a comparison result.

  • PCSrc=‘1’ is for jump and taken branch, where
        PCSrc = J + (Beq·Zero) + [Bne·(¬Zero)]
    is from the “Next PC” as shown in the figure below. The “Next PC” is used to choose between the jump or branch target and the sequential instruction following the current one, where

    • Imm16 is sign-extended to 30 bits and
    • jump target address is upper 4 bits of PC concatenated with Imm26.