Assume a datapath has a single memory instead of two. It is possible that in a clock cycle an instruction is accessing data from memory while another instruction is fetching an instruction from that same memory.Without two memories, the pipeline could have a structural hazard. The figure below shows another example of a structural hazard where writing back the ALU result in Stage 4 conflicts with writing load data in Stage 5.
There are two ways to solve the structural hazard: |