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.

that the message queues all become empty in a drained term. Thiscanbeproved according to<br />

Lemma 15, which guarantees that a <strong>Cache</strong>, WbAck, FlushAck or Wb message can be consumed<br />

at the cache, <strong>and</strong> a Purge message can be consumed at the memory.<br />

Lemma 20 Given a WP term s,<br />

(1) Pmb id(s) = Pmb id(dr(s))<br />

(2) Mpb id(s) = Mpb id(dr(s))<br />

(3) Proc id(s) = Proc id(dr(s))<br />

Lemma 21 Given a WP term s,<br />

(1) Min(dr(s)) =<br />

(2) Mout(dr(s)) =<br />

(3) Cin id(dr(s)) =<br />

(4) Cout id(dr(s)) =<br />

The draining rules have no impact on the value <strong>of</strong> a memory cell. Acache cell in a stable state<br />

remains una ected. An uncached address remains uncached provided that no <strong>Cache</strong> message<br />

is drained. Lemma 22 captures these properties.<br />

Lemma 22 Given a WP term s,<br />

(1) Cell(a,v,T[-,-]) 2 Mem(s) ) Cell(a,v,T[-, ]) 2 Mem(dr(s))<br />

(2) Cell(a,v,Clean) 2 <strong>Cache</strong> id(s) ) Cell(a,v,Clean) 2 <strong>Cache</strong> id(dr(s))<br />

(3) Cell(a,v,Dirty) 2 <strong>Cache</strong> id(s) ) Cell(a,v,Dirty) 2 <strong>Cache</strong> id (dr(s))<br />

(4) a =2 <strong>Cache</strong> id(s) ^ Msg(H,id ,<strong>Cache</strong>,a,-) =2 MoutCin id(s1) ) a =2 <strong>Cache</strong> id(dr(s))<br />

Lemma 23 ensures that in a drained term, an address will be cached in the Clean state if a<br />

<strong>Cache</strong> or WbAck message is drained an address will be cached in the Dirty state if a Wb<br />

message is drained an address will be uncached if a Purge or FlushAck message is drained.<br />

The pro<strong>of</strong> follows from Lemma 15 <strong>and</strong> the draining rules (note that messages can be drained<br />

in any order because <strong>of</strong> the con uence <strong>of</strong> the draining rules).<br />

Lemma 23 Given a WP term s,<br />

(1) Msg(H,id ,<strong>Cache</strong>,a,v) 2 MoutCin id (s) ) Cell(a,v,Clean) 2 <strong>Cache</strong> id(dr(s))<br />

(2) Msg(id ,H,Purge,a) 2 MinCout id(s) ) a =2 <strong>Cache</strong> id(dr(s))<br />

(3) Msg(id ,H,Wb,a,v) 2 MinCout id (s) ) Cell(a,v,Dirty) 2 <strong>Cache</strong> id(dr(s))<br />

(4) Cell(a,v,T[-,(id ,v)j-]) 2 Mem(s) ) Cell(a,v,Dirty) 2 <strong>Cache</strong> id(dr(s))<br />

(5) Msg(H,id ,WbAck,a) 2 MoutCin id (s) ) Cell(a,v,Clean) 2 <strong>Cache</strong> id(dr(s))<br />

(6) Msg(H,id ,FlushAck,a) 2 MoutCin id (s) ^ Msg(H,id ,<strong>Cache</strong>,a,-) =2 MoutCin id(s)<br />

) a =2 <strong>Cache</strong> id(dr(s))<br />

De nition 24 (Mapping from WP to CRF) Given a WP term s, the corresponding CRF<br />

term f(s) is the drained term dr(s) with all message queues <strong>and</strong> cache identi ers removed.<br />

It is obvious that the mapping function maps the initial WP term (with all caches <strong>and</strong><br />

network queues empty) to the initial CRF term (with all semantic caches empty). For any WP<br />

term, the mapping function guarantees that it is mapped to a legal CRF term (this follows<br />

trivially from the simulation theorem given below).<br />

100

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

Saved successfully!

Ooh no, something went wrong!