Write Buffer and Read Buffer
11-6 Élan™SC520 Microcontroller User’s Manual
■ For read cycles, the snoop feature is used to determine if data associated with the same
address of the read request already exists in the write buffer. If data is already present,
that data is read-merged with data being returned from SDRAM. This enhances SDRAM
system performance by not requiring the write buffer to be flushed prior to satisfying a
read cycle.
Write-merging, write-collapsing, and read-merging functions are described in
Section 11.5.1.2.1 and Section 11.5.1.2.2.
Although the write buffer and read buffer service all master SDRAM memory requests,
SDRAM reads that fill the Am5
x
86 CPU cache are more common than SDRAM writes. To
satisfy this demand and give priority read access to SDRAM, the write buffer works with
the SDRAM controller to alleviate write overhead. This is accomplished by posting write
data in zero wait states, effectively freeing the processor earlier to continue. Should a
following read cycle occur, the read-around-write feature of the SDRAM controller gives
priority to the read cycle to prevent the master from stalling. Without the snooping capability,
the entire contents of the write buffer would have to be flushed prior to
any
read cycle in
the event that more current data remains posted. Because of the snooping capability,
needless flushes are not performed. This results in less overhead to maintain data
coherency.
Should a read occur to an address contained in the write buffer, the write buffer merges its
data with the data returned from SDRAM. The read-merging function maintains data
coherency and eliminates the need to flush the write buffer.
11.5.1.2.1 Write-Merging and Write-Collapsing
When enabled, the write buffer supports write-merging and write-collapsing.
■
Write-merging
, as illustrated in Figure 11-3 on page 11-7, occurs when a sequence of
individual writes are merged into a single doubleword that hits in the write buffer level,
or doubleword. However, write-merging implies that the same byte location is not written
more than once.
■
Write-collapsing
, as illustrated in Figure 11-4 on page 11-8, is very similar to the write-
merging function, with the exception that the same byte location
can
be written more
than once. The write-collapsing function allows a sequence of individual writes to hit a
single level in the write buffer, even though previous data in that doubleword can be
over-written.
These functions optimize SDRAM performance by minimizing individual writes to SDRAM.
There are no dependencies between any doubleword in the write buffer and any of the
masters that are capable of posting data to the write buffer. This implies that multiple masters
may contribute to the merging or collapsing of any doubleword in the write buffer.
The terms
write-merging
and
write-collapsing
are intended to conform to the meaning as
introduced in the
PCI Local Bus Specification,
Revision 2.2.