Information

2. the phase relationship of the core clock and flash clock at the time the read is
requested.
The ratio of the core clock to the flash clock is equal to the value of PFB0CR[B0RWSC]
+ 1 for bank 0 and to the value of PFB1CR[B1RWSC] + 1 for bank 1.
For example, in a system with a 4:1 core-to-flash clock ratio, a read that does not hit in
the speculation buffer or the cache can take between 4 and 7 core clock cycles to
complete.
The best-case scenario is a period of 4 core clock cycles because a read from the
flash memory takes 1 flash clock, which translates to 4 core clocks.
The worst-case scenario is a period of 7 core clock cycles, consisting of 4 cycles for
the read operation and 3 cycles of delay to align the core and flash clocks.
A delay to align the core and flash clocks might occur because you can request a
read cycle on any core clock edge, but that edge does not necessarily align with a
flash clock edge where the read can start.
In this case, the read operation is delayed by a number of core clocks equal to the
core-to-flash clock ratio minus one: 4 - 1 = 3. That is, 3 additional core clock
cycles are required to synchronize the clocks before the read operation can start.
All wait states and synchronization delays are handled automatically by the Flash
Memory Controller. No direct user configuration is required or even allowed to set up the
flash wait states.
27.5.4 Speculative reads
The FMC has a single buffer that reads ahead to the next word in the flash memory if
there is an idle cycle. Speculative prefetching is programmable for each bank for
instruction and/or data accesses using the B0DPE and B0IPE fields of PFB0CR. Because
many code accesses are sequential, using the speculative prefetch buffer improves
performance in most cases.
When speculative reads are enabled, the FMC immediately requests the next sequential
address after a read completes. By requesting the next word immediately, speculative
reads can help to reduce or even eliminate wait states when accessing sequential code
and/or data.
For example, consider the following scenario:
Assume a system with a 4:1 core-to-flash clock ratio and with speculative reads
enabled.
Chapter 27 Flash Memory Controller (FMC)
K20 Sub-Family Reference Manual, Rev. 1.1, Dec 2012
Freescale Semiconductor, Inc.
Preliminary
579
General Business Information