Processor Fetch Instruction latency

Tech question

Using the case of an Arm cortex-m 3 stage pipeline of fetch -> decode -> execute, each pipeline stage must take an equal amount of time to complete to gain the full benefit of the pipeline.

How are instructions fetched from slow flash memory in one clock cycle?

By my current understanding I would expect the pipeline to continually stall waiting for an instruction. For example, say an instruction fetch takes 4 clock cycles, therefore the pipeline is never used.

edit: Thanks for the responses, wait states and instruction pre-fetch units increase instruction throughput to make up for the latency issues. Here's a good article from Jack Ganssle on wait states for anyone who is interested - http://www.ganssle.com/rants/on-wait-states.html

Posted Apr 4, 2020, 3:33 PM UTC · edited

39
Loading comments…