
Using this diagram, I am looking at this instruction to determine what control lines are necessary.
ld x5, 40(x9)
x5 = 0x000000ff
x9 = 0x00000fff
I am curious what control lines (RegWrite, MemRead, MemWrite, MemtoReg, Branch, Zero, ALUSrc) are asserted or set to 1 in order for this instruction to run, and why I understand the parts of the load double instruction to be ld RT, Disp(RA) - but what is required for execution and why? Thank you - resources on these things (that make sense to me) are extremely limited on the internet.
Its a
LOADinstruction in which the memory address to be read is calculated by adding40to the contents of the registerx9, the result is then stored in registerx5.RegDstandRegWrite40to the contents ofx5. SetALUSrcto 1 to select40as one of the source.MemReadas its a memory read. Also setMemtoRegto 1 so that mux will get the data from Memory rather than ALU.