SINGLE-CYCLE MIPS
INSTRUCTION FETCH
CPU is infinite loop
-gets instruction from instruction memory
-updates pc with address of next instruction
instruction memory and pc are always active
INSTRUCTION DECODING
-parse registers
-read 2 at a time
-write when regWrite =1
memory access is slow (takes multiple cycles) thats why we use cache memory-registers 1 and 2 cycle cache for instruction data
R-TYPE EXECUTION
fetch->decode->do alu operation and write data to register
op rs rt rd shift amount function
pc (after it goes to instruction memory we add 4 to get the next instruction
->instruction memory
-> register file get rs rt rd
-> feed rt rd to ALU and perform operation
-> store in register rs
I-TYPE MEMORY INSTRUCTIONS EXECUTION
-memory reference instructions:
op rs rt i
pc (after it goes to instruction memory we add 4 to get the next instruction
->instruction memory
-> register file get rs rt
->
BRANCH INSTRUCTIONS
DATAPATH
MIPS SINGLE-CYCLE DATAPATH