S-type

S-type instructions are used for store.

S-Format Instruction Layout

  • Mem[Reg[rs1] + offset] <- Reg[rs2]

I+S Immediate Generation

  • Just need a 5-bit mux between two positions where low five bits of immediate can reside in instruction

  • Other bits in immediate are wired to fixed positions in instruction

Store Instructions

Adding sw to datapath

How to control the amount of bytes to write to memory?

Last updated