20.06.2013 Views

Gestione degli hazard - Dipartimento di Ingegneria Informatica e ...

Gestione degli hazard - Dipartimento di Ingegneria Informatica e ...

Gestione degli hazard - Dipartimento di Ingegneria Informatica e ...

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.

Structural Hazard<br />

Esempio <strong>di</strong> structural <strong>hazard</strong> quando è presente un’unica<br />

memoria per le istruzioni e i dati<br />

Soluzioni<br />

•Introdurre una bolla, una nop (not operation):<br />

– Viene bloccata l'istruzione nella fase IF impedendo<br />

l'aggiornamento del PC;<br />

– Viene scritto sul registro IF/ID una NOP<br />

•Duplicare le risorse hardware<br />

Metodologie <strong>di</strong> progettazione Hardware/Software- LS Ing. <strong>Informatica</strong><br />

Time (in clock cycles)‏<br />

Value of<br />

register $2:<br />

Program<br />

execution<br />

order<br />

(in instructions)‏<br />

sub $2, $1, $3<br />

and $12, $2, $5<br />

or $13, $6, $2<br />

add $14, $2, $2<br />

sw $15, 100($2)‏<br />

IM Reg<br />

Data Hazard<br />

CC 1 CC 2 CC 3 CC 4 CC 5 CC 6<br />

IM Reg<br />

DM<br />

Reg<br />

Metodologie <strong>di</strong> progettazione Hardware/Software- LS Ing. <strong>Informatica</strong><br />

IM Reg DM Reg<br />

CC 7 CC 8 CC 9<br />

10 10 10 10 10/– 20 – 20 – 20 – 20 – 20<br />

DM<br />

Reg<br />

IM Reg<br />

DM Reg<br />

IM Reg<br />

DM Reg<br />

3<br />

4<br />

2

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

Saved successfully!

Ooh no, something went wrong!