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.

<strong>Cache</strong>Req message. In the latter case, if the cache state remains as <strong>Cache</strong>Pending, there is a<br />

<strong>Cache</strong> message in transit from the memory to cache id according to Lemma 44 (note that the<br />

<strong>Cache</strong>Req message has no following message since the cache cannot issue any message while<br />

the cache state is <strong>Cache</strong>Pending, <strong>and</strong> FIFO message passing guarantees that any preceding<br />

message has been received before the <strong>Cache</strong>Req message is received). When the cache receives<br />

the <strong>Cache</strong> message, it caches the data <strong>and</strong> sets the cache state to Clean. It is worth pointing<br />

out that although the <strong>Cache</strong>Req message can be stalled at the memory, the stalled message will<br />

be processed eventually.<br />

6.5.2 Liveness <strong>of</strong> Migratory<br />

Lemma 50 ensures that whenever a processor intends to execute an instruction, the cache cell<br />

will be set to an appropriate state eventually. For a Loadl or Storel, the cache state will be set<br />

to Clean or Dirty for a Commit or Reconcile, the cache state will be set to Clean, Dirty or<br />

Invalid.<br />

Lemma 50 Given a Migratory 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( ) _ Cell(a,-,Dirty) 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 whenever a processor intends to execute an instruction, the cache<br />

cell will be set to an appropriate state so that the instruction can be completed. This can be<br />

represented by the following proposition the pro<strong>of</strong> follows from Lemmas 45 <strong>and</strong> 49.<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 ( ) <br />

Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) _ Cell(a,-,Dirty) 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 Migratory rules that allow an instruction to be retired.<br />

131

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

Saved successfully!

Ooh no, something went wrong!