My understanding of the store instruction assembly is "store the contents of register x2 to the address is register x1 adding zero offset." If I compare that to the comment // mem[rs1+Simm] <- rs2 it would seem that the values in rs1 and rs2 in the instruction are flipped. Then it seems to me that the MEM line should read
// imm rs2 rs1 w imm STORE
MEM[6] = 32'b000000_00010_00001_010_00000_0100011;
Hi, I am trying to reconcile the following lines of code and comments:
as compared to
My understanding of the store instruction assembly is "store the contents of register x2 to the address is register x1 adding zero offset." If I compare that to the comment
// mem[rs1+Simm] <- rs2
it would seem that the values inrs1
andrs2
in the instruction are flipped. Then it seems to me that theMEM
line should readDo I have it right? Thanks!