Multi-cycle control: memory-reference FSM
From state 1 (decode/register fetch)
State 2: Memory address calculation
LW: to state 3
SW: to state 5
State 3: Memory read
To state 4
State 5: Memory write
To state 0
State 4: Write register
To state 0 (fetch)
Fig. 5.38