1

I am trying to add jal instruction i understand how it works however i am having difficulty implementing it in the hardware?

I have this schematic and it shows that 31 connects to the mux before the register but not sure what to connect. I see that R[31] is equal to pc+8 or to the jump address however those are 32 bits while the entry to the mux is just 5 bits.

enter image description here

user998316
  • 10,313
  • 4
  • 18
  • 11

1 Answers1

1

It means that the constant 31 be fed to the mux.

That 5-bit constant is the register number for $ra which is the register you want to hold the value of $PC + 8 if the MIPS has delayed branching and $PC + 4 if it does not have delayed branching.

gusbro
  • 22,357
  • 35
  • 46