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.

(4) Msg(H,id ,<strong>Cache</strong>,a,-)" 2 Cin id( ) Cell(a,-,Clean) 2 <strong>Cache</strong> id( )<br />

(5) Msg(H,id ,WbAck,a)" 2 Cin id ( ) Cell(a,-,Clean) 2 <strong>Cache</strong> id( )<br />

(6) Msg(H,id ,FlushAck,a)" 2 Cin id( ) a =2 <strong>Cache</strong> id( )<br />

(7) Msg(H,id ,PurgeReq,a)" 2 Cin id( ) ^ Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) <br />

Msg(id ,H,Purge,a) 2 Cout id( )<br />

(8) Msg(H,id ,PurgeReq,a)" 2 Cin id( ) ^ Cell(a,-,Dirty) 2 <strong>Cache</strong> id( ) <br />

Msg(id ,H,Wb,a,-) 2 Cout id ( )<br />

(9) Msg(id ,H,Purge,a)" 2 Min( ) <br />

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

(10) Msg(id ,H,Wb,a,-)" 2 Min( ) Cell(a,-,T[dir;id,(id ,-)j-]) 2 Mem( )<br />

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

Msg(H,id ,WbAck,a) 2 Mout( ) _ Msg(H,id ,FlushAck,a) 2 Mout( )<br />

(12) msg 2 Cout id( ) ^ Dest(msg)=H msg 2 Min( )<br />

(13) msg 2 Mout( ) ^ Dest(msg)=id msg 2 Cin id ( )<br />

Lemma 28 ensures that an incoming <strong>Cache</strong>, WbAck, FlushAck, PurgeReq, Purge or Wb message<br />

will eventually become the rst message regarding the address in the incoming queue. This<br />

implies that the message will be brought to the front end <strong>of</strong> the incoming queue so that it has<br />

an opportunity to be processed. A more general proposition will be presented in Lemma 31,<br />

which guarantees that any incoming message will eventually become the rst message in the<br />

incoming queue.<br />

Lemma 28 Given a WP sequence ,<br />

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

(2) msg 2 Min( ) ^ (Cmd(msg) = Purge _ Cmd(msg)=Wb) msg" 2 Min( )<br />

Pro<strong>of</strong> The pro<strong>of</strong> is based on induction on the number <strong>of</strong> messages that are in front the<br />

message in the incoming queue. It is obvious that the rst message in a cache's incoming queue<br />

can always be processed because <strong>of</strong> the weak fairness <strong>of</strong> the m<strong>and</strong>atory cache engine rules. At<br />

the memory side, the rst incoming message can always be processed except that a <strong>Cache</strong>Req<br />

message may need to be stalled. The key observation here is that a <strong>Cache</strong>Req message followed<br />

by a Purge or Wb message cannot be stalled. This is because according to Lemma 26, the<br />

directory <strong>of</strong> the memory state contains the cache identi er, which implies that the <strong>Cache</strong>Req<br />

message can be processed according to Rule MM2 or MM4. 2<br />

Lemma 29 ensures that if a memory cell is in a transient state <strong>and</strong> the directory shows that<br />

the address is cached in a cache, then the cache's identi er will be removed from the directory<br />

eventually. This guarantees that suspended writeback messages will be resumed.<br />

Lemma 29 Given a WP sequence ,<br />

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

107

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

Saved successfully!

Ooh no, something went wrong!