![Digital Equipment Alpha 21164PC Hardware Reference Manual Download Page 65](http://html.mh-extra.com/html/digital-equipment/alpha-21164pc/alpha-21164pc_hardware-reference-manual_2498508065.webp)
29 September 1997 – Subject To Change
Internal Architecture
2–35
Write Buffer and the WMB Instruction
Each time the write buffer is presented with a store instruction, the physical address
generated by the instruction is compared to the address in each valid write buffer
entry that is open for merging. If the address is in the same INT32 as an address in a
valid write buffer entry (that also contains a store instruction), and the entry is open
for merging, then the new store data is merged into that entry and the entry’s byte
mask bits are updated. If no matching address is found, or all entries are closed to
merging, then the store data is written into the entry at the top of the free-entry
queue. This entry is validated, and a pointer to the entry is moved from the free-entry
queue to the pending-request queue.
2.7.4 Write Buffer Entry Processing
When the number of entries in the pending-request queue reaches the number pro-
grammed in MAF_MODE<WB_SET_LO_THRESH>
4
, the MTU begins arbitration
with the other MTU queue requests. Once the request is granted, the MTU sends the
entry at the head of the pending-request queue to the CBU. The MTU then removes
the entry from the pending-request queue without placing it in the free-entry queue.
When the CBU has completely processed the write buffer entry, it notifies the MTU,
and the now invalid write buffer entry is placed in the free-entry queue. The MTU
may request that up to five additional write buffer entries be processed while waiting
for the CBU to finish the first. The write buffer entries are invalidated and placed in
the free-entry queue in the order that the requests complete. This order may be differ-
ent from the order in which the requests were made.
The MTU sends write requests from the write buffer to the CBU. The CBU pro-
cesses these requests according to the cache coherence protocol. Typically, this
involves loading the target block into the Bcache, making it writable, and then writ-
ing it. Because the Bcache is write-back, this completes the operation.
The MTU continues to request that write buffer entries be processed as long as one
of the following occurs:
•
One buffer contains an STQ_C or STL_C instruction
•
One buffer is marked by a WMB flag
•
An MB instruction is being executed by the MTU
4
The following actions can also cause the WB to begin arbitration: (1) an MB or WMB
instruction is issued, or (2) 264 cycles have elapsed without completing a write operation
while there were pending write operations in the WB (triggered by the WB write counter).