Electronic – Does CPU pipelining always imply a multicycle datapath

cpu

I'm studying the MIPS CPU and I have a very basic question about the datapath. Since the MIPS CPU uses a 5 stage pipeline, that means that the pipeline is using a multicycle datapath, correct? If a CPU has instructions where the Cycles Per Instruction is greater than 1, the CPU is using a multicycle datapath. Correct?

I guess I'm trying to understand if there's ever a case where you can have a pipelined CPU that's NOT using a multicycle datapath. In my mind, pipelining always implies a multicycle datapath. Is that the case? Or are there exceptions?

Best Answer

A pipelined CPU implies a multi-cycle datapath, precisely because it takes five clock cycles for an instruction to go from Fetch to Writeback.

Where I'm getting confused is here "unlike the multi cycle cpu, the pipelined datapath requires that every instruction use all five stages of execution."

You should finish reading the next paragraph you're quoting. That requirement is just to prevent two instructions from finishing at the same time.

suppose we use the latencies from our multi-cycle cpu, and we try to run a load instruction followed by an add instruction. the load instruction will require five cycles to execute, and the add instruction will require four cycles. so, if we start running the load instruction on cycle 1, it will finish execution on cycle 5. we are pipelining, so we can start running the add instruction on cycle 2, and it will finish on cycle 5. this is a problem: we have two instructions finishing on cycle 5: they will both try to write to the register file on cycle 5. this is a problem, because our register file only has one write port.