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.

4.3 The Imperative Rules <strong>of</strong> the Base Protocol<br />

The Base protocol is a simple implementation <strong>of</strong> the CRF model. It is a directory-less protocol<br />

in the sense that the memory maintains no directory information about where an address is<br />

cached. In Base, the memory behaves as the rendezvous: when a processor executes a Commit<br />

on a dirty cell, it writes the data back tothe memory before completing the Commit when a<br />

processor executes a Reconcile on a clean cell, it purges the data before completing the Reconcile<br />

(thus a following Loadl to the same address must retrieve data from the memory).<br />

The Base protocol employs two stable cache states, Clean <strong>and</strong> Dirty, <strong>and</strong> two transient<br />

cache states, <strong>Cache</strong>Pending <strong>and</strong> WbPending. When an address is not resident in a cache, we<br />

say the cache state is Invalid or the address is cached in the Invalid state. There are four<br />

messages, <strong>Cache</strong>Req, <strong>Cache</strong>, Wb <strong>and</strong> WbAck.<br />

The imperative rules <strong>of</strong> Base specify how instructions can be executed on cache cells in<br />

appropriate states <strong>and</strong> how data can be propagated between the memory <strong>and</strong> caches. They<br />

are responsible for ensuring the soundness <strong>of</strong> the protocol, that is, the system only exhibits<br />

behaviors that are permitted by the CRF model. The imperative ruleshave three sets <strong>of</strong> rules,<br />

the processor rules, the cache engine rules <strong>and</strong> the memory engine rules.<br />

Processor Rules: A Loadl or Storel instruction can be performed if the address is cached in<br />

the Clean or Dirty state. A Commit instruction can be performed if the address is uncached or<br />

cached in the Clean state. A Reconcile instruction can be performed if the address is uncached<br />

or cached in the Dirty state.<br />

Loadl-on-Clean Rule<br />

Site(id , Cell(a,v,Clean) j cache, in, out, ht,Loadl(a)ipmb, mpb, proc)<br />

! Site(id , Cell(a,v,Clean) j cache, in, out, pmb, mpbjht,vi, proc)<br />

Loadl-on-Dirty Rule<br />

Site(id , Cell(a,v,Dirty) j cache, in, out, ht,Loadl(a)ipmb, mpb, proc)<br />

! Site(id , Cell(a,v,Dirty) j cache, in, out, pmb, mpbjht,vi, proc)<br />

Storel-on-Clean Rule<br />

Site(id , Cell(a,-,Clean) j cache, in, out, ht,Storel(a,v)ipmb, mpb, proc)<br />

! Site(id , Cell(a,v,Dirty) j cache, in, out, pmb, mpbjht,Acki, proc)<br />

Storel-on-Dirty Rule<br />

Site(id , Cell(a,-,Dirty) j cache, in, out, ht,Storel(a,v)ipmb, mpb, proc)<br />

! Site(id , Cell(a,v,Dirty) j cache, in, out, pmb, mpbjht,Acki, proc)<br />

Commit-on-Clean Rule<br />

Site(id , Cell(a,v,Clean) j cache, in, out, ht,Commit(a)ipmb, mpb, proc)<br />

! Site(id , Cell(a,v,Clean) j cache, in, out, pmb, mpbjht,Acki, proc)<br />

Commit-on-Invalid Rule<br />

Site(id , cache, in, out, ht,Commit(a)ipmb, mpb, proc) if a =2 cache<br />

! Site(id , cache, in, out, pmb, mpbjht,Acki, proc)<br />

71

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

Saved successfully!

Ooh no, something went wrong!