Final answer:
In a MIPS pipeline with a single memory, load/store instructions require five stages: Instruction Fetch (IF), Instruction Decode (ID), Execute (EX), Memory Access (MEM), and Write Back (WB). This can cause data hazards as both instructions and data need to access the same memory module.
Step-by-step explanation:
In a MIPS pipeline with a single memory, load and store instructions require specific stages of the pipeline to be completed. These stages are:
- Instruction Fetch (IF): The instruction is fetched from memory.
- Instruction Decode (ID): The opcode is decoded, and the registers are read.
- Execute (EX): For loads, the base address is added to the offset to calculate the memory address. For stores, the data to be stored is prepared.
- Memory Access (MEM): For loads, data is read from the calculated memory address. For stores, data is written to the calculated memory address.
- Write Back (WB): For loads, the data read from memory is written back to the register file.
Load/store instructions need to use the data memory during the MEM stage, which can be a bottleneck if simultaneous instruction execution or data access is attempted. This challenge is further complicated by the fact that in this situation, both instructions and data must be accessed from the same memory module, potentially causing delays known as data hazards.