SPRUJ79 November 2024 F29H850TU
To improve the performance of data reads, the Flash read interface includes a data line buffer. The size of the data line buffer is 288 bits for an interleaved bank pair (including 32 ECC bits), and 144 bits for a non-interleaved data bank (including 16 ECC bits). To activate the Flash data line buffer, write 1 to the DATA_CACHE_EN bit of the FRIx_INTF_CTRL register for the target Flash read interface.
When a read request is received from one or more initiators in the system, the upper portion of the address is compared to the buffer tag to determine if the requested data is in the line buffer. If a match is found, and the valid bit (V) is set, then the Flash read interface returns data directly from the line buffer to the initiator, without making a new access to the Flash bank. The address of the data is also returned to the CPU for ECC checking.
There is a dedicated compare unit for each read initiator (for example, CPU1, RTDMA, debugger), so multiple initiators can read from the data line buffer simultaneously without added wait states. Figure 9-3 shows a functional block diagram of the data line buffer for interleaved bank pairs. Figure 9-4 shows a functional block diagram of the data line buffer for non-interleaved banks.
If a query does not match the line buffer tag, then a read operation is performed on the associated Flash bank or bank pair. When the data is returned from the Flash, the Flash read interface sends the requested data portion to the CPU, updates the data line buffer, and sets the valid bit. For non-interleaved banks, the line buffer is always 128-bit aligned. For interleaved bank pairs, the line buffer contents are always 256-bit aligned, such that the lower 128 bits come from the first bank and the upper 128 bits come from the second bank. Figure 9-5 illustrates the mapping of interleaved bank pairs to data line buffer bits.
The data line buffer valid bit is only cleared automatically on a reset. Always flush the buffer manually after programming or erasing Flash memory, or whenever a CPU fault is detected. To clear the valid bit and flush the buffer, write 1 to the DATA_CACHE_CLR bit of the corresponding FRIx_INTF_CLR register.