|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load and store |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fig. 5.9 |
|
|
|
|
|
|
|
|
|
Instruction provides
read and write register numbers, 16-bit offset |
|
|
|
|
Register file provides |
|
|
|
|
|
|
|
|
Read data 1: base
register value to ALU |
|
|
|
|
|
|
|
Read data 2: data value
to be stored in data memory |
|
|
|
|
Sign extend provides
32-bit offset value to ALU for addition |
|
|
|
|
ALU generates sum of
base and offset as address input to data memory |
|
|
|
MemRead, MemWrite
controls determine whether to read or write data memory |
|
|
For load (read), data
memory provides data for register write |
|
|
|
|
For store (write), data
memory writes data to memory location given by address |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|