01.12.2012 Views

Architecture of Computing Systems (Lecture Notes in Computer ...

Architecture of Computing Systems (Lecture Notes in Computer ...

Architecture of Computing Systems (Lecture Notes in Computer ...

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>of</strong> unused pipel<strong>in</strong>e cycles<br />

100<br />

80<br />

60<br />

40<br />

20<br />

0<br />

branch membusy<br />

memfix<br />

pipel<strong>in</strong>e<br />

data latency 0<br />

How to Enhance a Superscalar Processor 11<br />

fetch<br />

data latency 1<br />

0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7<br />

priority<br />

data latency 2<br />

Fig. 4. Reason why a thread cannot issue an <strong>in</strong>struction, depend<strong>in</strong>g on its priority<br />

Even with m<strong>in</strong>imum latencies (0/0), more than 80% <strong>of</strong> unused cycles are<br />

due to memory delays (fetch or memfix). Not surpris<strong>in</strong>gly the percentage is<br />

<strong>in</strong>creased when the latencies are <strong>in</strong>creased. Each additional cycle <strong>of</strong> <strong>in</strong>struction<br />

memory latency <strong>in</strong>creases the percentage <strong>of</strong> fetch stalls by 8%, therefore a fast<br />

<strong>in</strong>struction connection (via scratchpad or <strong>in</strong>struction cache) is <strong>in</strong>evitable.<br />

The bars marked with plus show additional membusy latencies. These appear,<br />

when the HPT is executed together with other threads (for the bars without<br />

a plus, the HPT was executed without concurrent threads). If a lower priority<br />

memory access takes multiple cycles and beg<strong>in</strong>s <strong>in</strong> the cycle preced<strong>in</strong>g the cycle<br />

when a HPT memory access should start, the former occupies the memory<br />

controller for multiple cycles and therefore delays the HPT thread.<br />

This effect violates the complete isolation (and thus the hard real-time capability<br />

<strong>of</strong> the HPT), but it can be avoided by either modify<strong>in</strong>g the WCET<br />

analysis and assum<strong>in</strong>g twice the memory latency or the lower priority memory<br />

accesses can be delayed when a HPT memory access is on the way through the<br />

pipel<strong>in</strong>e (then the distribution <strong>of</strong> reasons is the same as <strong>in</strong> the correspond<strong>in</strong>g<br />

case without the plus).<br />

ThelatertechniqueiscalledDom<strong>in</strong>ant Memory Access Announc<strong>in</strong>g (DMAA):<br />

when a memory access <strong>of</strong> the HPT is recognized at the beg<strong>in</strong>n<strong>in</strong>g <strong>of</strong> the pipel<strong>in</strong>e,<br />

it is announced immediately to the memory controller that consequently delays<br />

all memory accesses until the HPT memory access arrives and can be <strong>in</strong>voked.<br />

Therefore all memory accesses between issue stage and memory controller are<br />

delayed and if the distance between them is longer than the memory latency,<br />

the HPT is never <strong>in</strong>fluenced by lower priority memory accesses (for details<br />

see [3]).<br />

Apply<strong>in</strong>g the DMAA technique, Fig. 4 shows the average distribution <strong>of</strong> stall<br />

reasons aga<strong>in</strong>st the priority. The fixed latencies (which dom<strong>in</strong>ate the stall reasons<br />

<strong>of</strong> the HPT) are less important for lower priority threads. For these threads,<br />

the <strong>in</strong>fluence <strong>of</strong> fetch and pipel<strong>in</strong>e conflicts grows significantly. If the memory<br />

latency is more than zero (rightmost group <strong>of</strong> Fig. 4), this stall reason dom<strong>in</strong>ates<br />

for lower priority threads.

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

Saved successfully!

Ooh no, something went wrong!