https://www.youtube.com/watch?v=riJC3sAekpY&list=PLeWkeA7esB-MuCn8XQWAarM7zvimE0yme&index=19

Untitled

Stages:

IF - instruction fetch - get instruction with current Instruction Pointer (same as Program Counter)

ID - instruction decode - decide which action to take depending on instruction type

EX - execute - perform ALU operations on source and target registers

MEM - memory access - for loads, it would load an operand from memory. For stores, it would store an operand into memory. For all other instructions, it would do nothing.

WB - write-back - write to registers

Register file is read in the second stage (ID) and written in the fifth stage (WB)

Branches (setting the Program Counter) occur in MEM stage

Untitled