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.

This completes the pro<strong>of</strong> according to Theorem-A. 2<br />

The pro<strong>of</strong> above can be explained in a more intuitive way. The memory sends a PurgeReq<br />

message to cache id each time it changes the memory state to T[id j-,-]. When the PurgeReq<br />

message is received at cache id , if the cache state is Clean or Dirty, the cache sends a Purge or<br />

Wb message to the memory otherwise the cache ignores the PurgeReq message. In the latter<br />

case, if the memory state remains as T[id j-,-], there must be a Purge or Wb message in transit<br />

from cache id to the memory according to Lemma 26 (note that the PurgeReq message has no<br />

following message since the memory cannot send any message to cache id while the memory<br />

state is T[id j-,-], <strong>and</strong> FIFO message passing guarantees that any preceding message must be<br />

received before the PurgeReq message is received). When the memory receives the Purge or<br />

Wb message, it removes the cache identi er from the directory.<br />

Lemma 30 includes invariants about transient memory states. Invariant (1) ensures that the<br />

directory <strong>of</strong> a transient state will eventually become empty while each suspended writeback<br />

message remains una ected. The pro<strong>of</strong> is based on induction on the number <strong>of</strong> cache identi ers<br />

in the directory. It can be shown by checking each WP rule that suspended messages cannot<br />

be a ected before the directory becomes empty. Invariant (2) ensures that a transient memory<br />

state will eventually become a stable memory state. The pro<strong>of</strong> follows from the weak fairness<br />

<strong>of</strong> Rule MM11. This is critical to ensure that a stalled <strong>Cache</strong>Req message will be processed<br />

eventually.<br />

Lemma 30 Given a WP sequence ,<br />

(1) Cell(a,-,T[-,(id ,-)j-]) 2 Mem( ) Cell(a,-,T[ ,(id ,-)j-]) 2 Mem( )<br />

(2) Cell(a,-,T[-,-]) 2 Mem( ) Cell(a,-,C[-]) 2 Mem( )<br />

Lemma 31 ensures that any incoming message can become the rst message regarding the<br />

address in the incoming queue (so that it can be processed by the corresponding protocol<br />

engine). This is a general form <strong>of</strong> Lemma 28.<br />

Lemma 31 Given a WP sequence ,<br />

(1) msg 2 Cin id( ) msg" 2 Cin id( )<br />

(2) msg 2 Min( ) msg" 2 Min( )<br />

Lemma 32 ensures that if an address is cached in the <strong>Cache</strong>Pending state, the cache state will<br />

become Clean eventually. This is important to guarantee thatacache miss can be serviced in<br />

nite time.<br />

Lemma 32 Given a WP sequence ,<br />

Cell(a,-,<strong>Cache</strong>Pending) 2 <strong>Cache</strong> id( ) Cell(a,-,Clean) 2 <strong>Cache</strong> id( )<br />

Pro<strong>of</strong> We rst show some properties that are needed for the pro<strong>of</strong> all the properties can be<br />

veri ed by simplychecking the WP rules.<br />

109

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

Saved successfully!

Ooh no, something went wrong!