Reordering Of A Reads With Write Buffers - Intel Quark SoC X1000 Core Developer's Manual

Hide thumbs Also See for Quark SoC X1000 Core:
Table of Contents

Advertisement

Writes are driven onto the external bus in the same order in which they are received by
the write buffers. Under certain conditions, a memory read can go onto the external
bus before the memory writes pending in the buffer, even though the writes occurred
earlier in the program execution.
A memory read is reordered in front of all writes in the buffers only under the following
conditions: If all writes pending in the buffers are cache hits and the read is a cache
miss. Under these conditions, the Intel
external memory location that needs to be updated by one of the pending writes.
Reordering of a read with the writes pending in the buffers can only occur once before
all the buffers are emptied. Reordering read once maintains cache consistency.
Consider the following example: The processor writes to location X. Location X is in the
internal cache, so it is updated there immediately. However, the bus is busy, so the
write out to main memory is buffered (see
reads to location X are cache hits and the most up-to-date data is read.
Figure 70.

Reordering of a Reads with Write Buffers

The next instruction causes a read to location Y. Location Y is not in the cache (a cache
miss). Because the write in the write buffer is a cache hit, the read is reordered. When
location Y is read, it is put into the cache. The possibility exists that location Y will
replace location X in the cache. If this is true, location X would no longer be cached
(see
Figure
Figure 71.
Reordering of a Reads with Write Buffers
Cache consistency has been maintained up to this point. If a subsequent read is to
location X (now a cache miss) and it was reordered in front of the buffered write to
location X, stale data would be read. This is why only one read is allowed to be
reordered. Once a read is reordered, all writes in the write buffer are flagged as cache
misses to ensure that no more reads are reordered. Because one of the conditions to
reorder a read is that all writes in the write buffer must be cache hits, no further
reordering is allowed until all flagged writes propagate to the bus. Similarly, if an
invalidation cycle is run, all entries in the write buffer are flagged as cache misses.
In multiple processor systems and/or systems using DMA techniques such as bus
snooping, locked semaphores should be used to maintain cache consistency.
®
Intel
Quark SoC X1000 Core
Developer's Manual
168
Intel® Quark
Core Cache
New
X
Data X
71).
Intel® Quark
Core Cache
X
Data Y
®
Intel
Quark Core—Hardware Interface
®
Quark SoC X1000 Core does not read from an
Figure
70). Under these conditions, any
Write
Main
Buffer
Memory
W
New Data X
New
X
X
Data X
Y
New Data Y
Z
Write
Main
Buffer
Memory
W
New
X
X
Data X
Data X
Y
Z
October 2013
Order Number: 329679-001US

Advertisement

Table of Contents
loading

Table of Contents