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.

Lemma 34 Given a WP sequence ,<br />

(1) Loadl(a) 2 Pmb id( ) Loadl(a) 2 Pmb id( ) ^<br />

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

(2) Storel(a,-) 2 Pmb id( ) Storel(a,-) 2 Pmb id( ) ^<br />

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

(3) Commit(a) 2 Pmb id( ) Commit(a) 2 Pmb id ( ) ^<br />

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

(4) Reconcile(a) 2 Pmb id( ) Reconcile(a) 2 Pmb id( ) ^<br />

(Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) _ Cell(a,-,Dirty) 2 <strong>Cache</strong> id( ) _ a =2 <strong>Cache</strong> id( ))<br />

Pro<strong>of</strong> We rst show that when a processor intends to execute an instruction, the cache cell<br />

will be set to an appropriate state. This can be represented by the following proposition the<br />

pro<strong>of</strong> follows from Lemmas 27, 32 <strong>and</strong> 33.<br />

Loadl(a) 2 Pmb id( ) Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) _ Cell(a,-,Dirty) 2 <strong>Cache</strong> id( )<br />

Storel(a,-) 2 Pmb id( ) Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) _ Cell(a,-,Dirty) 2 <strong>Cache</strong> id( )<br />

Commit(a) 2 Pmb id ( ) Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) _ a =2 <strong>Cache</strong> id( )<br />

Reconcile(a) 2 Pmb id( ) <br />

Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) _ Cell(a,-,Dirty) 2 <strong>Cache</strong> id( ) _ a =2 <strong>Cache</strong> id( )<br />

We then show that an instruction can be completed only when the address is cached in an<br />

appropriate state. This can be represented by the following proposition, which can be veri ed<br />

by simplychecking the WP rules that allow an instruction to be retired.<br />

ht,Loadl(a)i2Pmb id( ) ^ ht,Loadl(a)i =2 Pmb id( )<br />

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

ht,Storel(a,-)i2Pmb id( ) ^ ht,Storel(a,-)i =2 Pmb id( )<br />

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

ht,Commit(a)i2Pmb id ( ) ^ ht,Commit(a)i =2 Pmb id( )<br />

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

ht,Reconcile(a)i2Pmb id( ) ^ ht,Reconcile(a)i =2 Pmb id( )<br />

) Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) _ Cell(a,-,Dirty) 2 <strong>Cache</strong> id( ) _ a =2 <strong>Cache</strong> id( )<br />

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

The liveness <strong>of</strong> WP ensures that a memory instruction can always be completed eventually.<br />

This is described by the following theorem, which trivially follows from Lemma 34. Note that<br />

Rules P1, P2, P6, P7, P11, P15, P16, P17 <strong>and</strong> P20 are strongly fair.<br />

Theorem 35 (Liveness <strong>of</strong> WP) Given a WP sequence ,<br />

(1) ht,Loadl(-)i2Pmb id( ) ht,-i2Mpb id ( )<br />

(2) ht,Storel(-,-)i2Pmb id( ) ht,Acki2Mpb id ( )<br />

(3) ht,Commit(-)i2Pmb id( ) ht,Acki2Mpb id ( )<br />

(4) ht,Reconcile(-)i2Pmb id( ) ht,Acki2Mpb id ( )<br />

112

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

Saved successfully!

Ooh no, something went wrong!