I-type
I-Format Instruction Layout

- The - funct7and- rs2fields from R-format are replaced by 12-bit signed immediate,- imm[11:0](in range [-2048, 2047]).
- Remaining fields ( - rs1,- funct3,- rd,- opcode) same as R-format.
- Immediate is always sign-extended to 32-bits before use in an arithmetic operation. 
I-immediate


I-Format Arithmetic Instructions

Adding I-Format arithmetic instructions to datapath

I-Format Load Instructions
Load instructions are also I-type.

- Reg[rd] <- Mem[Reg[rs1] + offset] - The 12-bit immediate is added to the base address in - rs1to form the memory address
- The value loaded from memory is stored in register - rd
 

Adding load instructions to datapath

Last updated