Sun Microelectronics
115
7. UltraSPARC External Interfaces
transaction (S_CPI_REQ or S_INV_REQ) for the line. This is because the Write-
back request could be pending in a number of places: inside UltraSPARC, on the
address bus, or in an SC queue.
Rather than having a mechanism that looks for and flushes a Writeback in any of
these locations, UltraSPARC allows the Writeback to proceed normally. It is the
SC’s responsibility to discard the data when UltraSPARC issues the Writeback
transaction. SC can use S_WBCAN in this case, which instructs UltraSPARC not
to drive the Writeback data on SYSDATA. SC also can use S_WAB in this case, as
long as it does not write the data to memory. By the time the Writeback is issued,
the previous port that took ownership may have completed its own Writeback. In
this case, the original Writeback would overwrite the correct data in memory.
In systems that support Dtags, SC can interrogate the tag store when it sees the
Writeback to decide if it should be cancelled. If the read miss and Writeback are
allowed to complete in any order, SC may need to maintain some internal state,
since N + M lines will be valid at one time (N lines matching the E-Cache, plus M
possible writeback lines).
In systems that do not support Dtags, SC sets NDP=1 in its request packets. In
this case, UltraSPARC replies with P_SACK if the requested line is in the
E-Cache, P_SACKD if there is a pending Writeback for the line, and P_SNACK if
the line is not present. Some special cases to this are described below. The only
difference in UltraSPARC’s operation between when NDP=0 and NDP=1 is the
possible assertion of P_SNACK.
If UltraSPARC returns P_SACKD for a S_CPI_REQ or S_INV_REQ, SC is respon-
sible for cancelling the associated P_WRB_REQ when it completes. UltraSPARC
continues to reply with P_SACKD for S_REQs to the same line until both the read
and the associated Writeback have completed. This is important to remember, be-
cause ownership of the line should have been transferred to the port that caused
the S_CPI_REQ or S_INV_REQ. SC must remember that there is a pending Write-
back Cancellation and treat all subsequent P_SACKDs like P_SNACKs.
UltraSPARC-I supports only one outstanding Writeback, so it is clear which
Writeback the P_SACKD causes to be cancelled. For UltraSPARC-II, SC must
buffer the address from the S_REQ to determine which Writeback to cancel.
7.11.4 Potential Race Condition—Copyback of Victimized Block
When a block is victimized, UltraSPARC holds it in the coherence domain until
the read miss data is returned. If the victimized block is dirty, UltraSPARC also
copies the block into the writeback buffer, which is also in the coherence domain
until the Writeback completes or is cancelled. The read and Writeback transac-
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com