Meaning
Processor execution delays occur when the instruction fetch unit requests data from internal flash memory before the prefetch buffer has populated the next cache line. This delay defines a flash prefetch stall, which introduces wait states into the instruction pipeline during branch execution or random memory jumps. The effect is limited to internal flash execution and does not occur when running code from random access memory.
Processor Consequence
When a branch instruction points to a non-sequential address, the prefetch buffer must discard its current contents and begin a new fetch cycle from the physical memory cells. This action causes a flash prefetch stall that halts instruction execution for several clock cycles while the memory interface completes the read operation. Real-time tasks may experience jitter due to these unexpected instruction delays.
Mitigation Strategy
Software optimization techniques reduce pipeline gaps by aligning critical loops to 64-bit boundaries in memory. By doing this, the compiled code minimizes the likelihood of a flash prefetch stall occurring during high-priority interrupt routines. Hardware designers can also enable branch prediction to warm the prefetch buffer.
Hardware Limit
The maximum clock speed of the processor determines the minimum number of wait states required for a flash read. This threshold sets the lower boundary of memory access time.