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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The inaccuracy <strong>of</strong> memory states can cause unexpected cases that must be dealt with properly.<br />

Some scenarios are discussed as follows:<br />

Simultaneous <strong>Cache</strong>w <strong>and</strong> Wbb. Suppose initially the address is cached in the Dirty state<br />

<strong>of</strong> Base in a cache, while the memory state shows that the address is uncached in the<br />

cache. The memory sends a <strong>Cache</strong>w message to supply a WP copy to the cache, while<br />

the cache sends a Wbb message to write the dirty copyback to the memory. The <strong>Cache</strong>w<br />

message will be discarded when it is received (Rule MC4).<br />

Simultaneous Upwm <strong>and</strong> Downmw. Suppose initially the address is cached in the Clean or<br />

Dirty state <strong>of</strong> WP, while the memory state shows that the address is exclusively cached<br />

under WP in the cache. The memory sends an Upwm message to upgrade the cache cell<br />

from WP to Migratory, while the cache downgrades the cell from WP to Base <strong>and</strong> sends a<br />

Downwb message to the memory. The Upwm message will be discarded when it is received<br />

(Rules MC7 <strong>and</strong> MC8).<br />

Simultaneous DownReqwb <strong>and</strong> Downwb. Suppose initially the address is cached in the<br />

Clean or Dirty state <strong>of</strong> WP. The memory sends a DownReqwb message to the cache,<br />

while the cache downgrades the cell from WP to Base before it receives the request. The<br />

DownReqwb message will be discarded when it is received (Rules MC16 <strong>and</strong> MC17).<br />

Bu er Management When a cache request is stalled, it should not block other messages in<br />

the incoming queue from being processed. This can be achieved via proper bu er management<br />

to allow an incoming message to overtake acache request as long as the two messages are from<br />

di erent cache sites or have di erent addresses. This can be characterized as follows:<br />

<strong>Cache</strong>t's bu er management:<br />

msg1 msg2 msg2 msg1<br />

if (Cmd(msg1)=<strong>Cache</strong>Req _ Cmd(msg2)=<strong>Cache</strong>Req) ^<br />

(Src(msg1) 6=Src(msg2) _ Addr(msg1) 6=Addr(msg2))<br />

7.4.4 Derivation <strong>of</strong> <strong>Cache</strong>t from Imperative <strong>and</strong> Directive Rules<br />

The <strong>Cache</strong>t rules can be derived from the imperative <strong>and</strong> directive rules. A directive rule can<br />

be used to generate or discard a directive message it cannot modify any system state that may<br />

a ect the soundness <strong>of</strong> the system. There are four basic directive rules that involve the basic<br />

directive messages.<br />

Send-DownReqwb: The memory sends a DownReqwb message to a cache.<br />

Send-DownReqmw: The memory sends a DownReqmw message to a cache.<br />

Receive-DownReqwb: The cache discards an incoming DownReqwb message.<br />

Receive-DownReqmw: The cache discards an incoming DownReqmw message.<br />

153

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

Saved successfully!

Ooh no, something went wrong!