09.08.2013 Views

Design and Verification of Adaptive Cache Coherence Protocols ...

Design and Verification of Adaptive Cache Coherence Protocols ...

Design and Verification of Adaptive Cache Coherence Protocols ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.3.3 FIFO Message Passing<br />

The liveness <strong>of</strong> WP is contingent upon FIFO message passing. Consider a scenario in which<br />

the memory sends a <strong>Cache</strong> message to supply a data copy toacache, followed by a PurgeReq<br />

message to request the cache copy to be purged or written back. According to Rules MC8<br />

<strong>and</strong> MC9, the PurgeReq message would be discarded if it were received before the <strong>Cache</strong> mes-<br />

sage, which would inevitably lead to a deadlock orlivelock situation. The minimal requirement<br />

is that FIFO ordering must be maintained for the following messages:<br />

FlushAck followed by <strong>Cache</strong>. The memory sends a FlushAck message to acknowledge a<br />

writeback operation, <strong>and</strong> then sends a <strong>Cache</strong> message to supply a data copy to the cache.<br />

<strong>Cache</strong> followed by PurgeReq. The memory sends a <strong>Cache</strong> message to a cache to supply<br />

a data copy, <strong>and</strong> then sends a PurgeReq message to purge the data copy.<br />

WbAck followed by PurgeReq. The memory sends a WbAck message to acknowledge<br />

a writeback operation (the cache is allowed to retain a clean copy), <strong>and</strong> then sends a<br />

PurgeReq message to purge the data copy.<br />

Purge followed by <strong>Cache</strong>Req. Acache sends a Purge message to the memory after purging<br />

a clean copy, <strong>and</strong> then sends a <strong>Cache</strong>Req message to the memory to request for a data<br />

copy.<br />

It is worth mentioning that FIFO message passing is not always necessary when the preced-<br />

ing message is a directive message. For example, if a cache sends a <strong>Cache</strong>Req message followed<br />

by a Purge message, the two messages can be received out-<strong>of</strong>-order without incurring deadlock<br />

or livelock. In this case, the <strong>Cache</strong>Req message, which would be discarded under FIFO message<br />

passing, invokes the memory to send a data copy to the cache. Therefore, directive messages<br />

can be treated as low-priority messages in that they can be overtaken by imperative messages.<br />

The WP protocol does not require FIFO ordering in the following scenarios:<br />

<strong>Cache</strong>Req followed by Purge. Acache sends a <strong>Cache</strong>Req message to the memory. Before<br />

the <strong>Cache</strong>Req message is received, the memory voluntarily sends a <strong>Cache</strong> message to the<br />

cache. The cache receives the <strong>Cache</strong> message <strong>and</strong> caches the data in the Clean state.<br />

The cache then purges the clean copy <strong>and</strong> sends a Purge message to the memory. The<br />

<strong>Cache</strong>Req message <strong>and</strong> the Purge message can be reordered.<br />

<strong>Cache</strong>Req followed by Wb. A cache sends a <strong>Cache</strong>Req message to the memory. Before<br />

the <strong>Cache</strong>Req message is received, the memory voluntarily sends a <strong>Cache</strong> message to the<br />

cache. The cache receives the <strong>Cache</strong> message <strong>and</strong> caches the data in the Clean state. The<br />

processor performs a Storel instruction, <strong>and</strong> the cache state becomes Dirty. The cache<br />

then sends a Wb message to write the dirty copy back to the memory. The <strong>Cache</strong>Req<br />

message <strong>and</strong> the Wb message can be reordered.<br />

PurgeReq followed by <strong>Cache</strong>. The memory sends a PurgeReq message to a cache, while<br />

the address is cached in the Clean state in the cache. Before the PurgeReq message is<br />

95

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!