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.

Non-FIFO write bu ers: Some architectures with write bu ers assume that store instruc-<br />

tions can be reordered in a write bu er. This allows stores to the same cache line to be merged<br />

into one burst bus transactions.<br />

Sys(proc, pmb1ht,Store(a,v)ipmb2, mpb, mem) if Load, Store(a,-) =2 pmb1<br />

! Sys(proc, pmb1pmb2, mpbjht,Acki, mem[a:=v])<br />

Non-blocking caches: Modern architectures <strong>of</strong>ten have non-blocking caches to allow multi-<br />

ple outst<strong>and</strong>ing load instructions. This e ectively allows loads to be performed out-<strong>of</strong>-order.<br />

Sys(proc, pmb1ht,Load(a)ipmb2, mpb, mem) if Store =2 pmb1<br />

! Sys(proc, pmb1pmb2, mpbjht,mem[a]i, mem)<br />

A relaxed implementation <strong>of</strong> memory operations allows memory accesses to be performed in<br />

arbitrary order, provided that data dependences <strong>of</strong> the program are preserved. A load instruc-<br />

tion can be performed if there is no preceding store instruction on the same address. A store<br />

instruction can be performed if there is no preceding load or store instruction on the same<br />

address. The short-circuit rule allows a load to obtain the data from a preceding store before<br />

the data is written to the memory.<br />

Relaxed-Load-Memory Rule<br />

Sys(proc, pmb1ht,Load(a)ipmb2, mpb, mem) if Store(a,-) =2 pmb1<br />

! Sys(proc, pmb1pmb2, mpbjht,mem[a]i, mem)<br />

Relaxed-Store-Memory Rule<br />

Sys(proc, pmb1ht,Store(a,v)ipmb2, mpb, mem) if Load(a), Store(a,-) =2 pmb1<br />

! Sys(proc, pmb1pmb2, mpbjht,Acki, mem[a:=v])<br />

Short-Circuit Rule<br />

Sys(proc, pmb1ht 0 ,Store(a,v)ipmb2ht,Load(a)ipmb3, mpb, mem) if Store(a,-) =2 pmb2<br />

! Sys(proc, pmb1ht 0 ,Store(a,v)ipmb2pmb3, mpbjht,vi, mem)<br />

We can use the relaxed memory access rules above as a more e cient processor-memory<br />

interface for PS (this inevitably leads to a relaxed memory model in multiprocessor systems). We<br />

can further allow memory instructions to be dispatched out-<strong>of</strong>-order (t 0 represents an unresolved<br />

tag):<br />

Relaxed-Dispatch-Load Rule<br />

Sys(Proc(ia, rf , rob1 Itb(ia1,t :=Load(a,U),Wr(r)) rob2, btb, im), pmb, mpb, mem)<br />

if Jz, Load(t 0 ,U), Store(-,t 0 ,U), Store(t 0 ,-,U) Store(a,-,U) =2 rob1<br />

! Sys(Proc(ia, rf , rob1 Itb(ia1,t :=Load(a,D),Wr(r)) rob2, btb, im), pmbht,Load(a)i, mpb,<br />

mem)<br />

Relaxed-Dispatch-Store Rule<br />

Sys(Proc(ia, rf , rob1 Itb(ia1,t :=Store(a,v,U)) rob2, btb, im), pmb, mpb, mem)<br />

if Jz, Load(t 0 ,U), Store(-,t 0 ,U), Store(t 0 ,-,U) Load(a,U), Store(a,-,U) =2 rob1<br />

! Sys(Proc(ia, rf , rob1 Itb(ia1,t :=Store(a,v,D)) rob2, btb, im), pmbht,Store(a,v)i, mpb, mem)<br />

46

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

Saved successfully!

Ooh no, something went wrong!