logo

Crowdly

Browser

Add to Chrome

W-A-W hazard This type of hazard may occur when two adjacent instructions (i) ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

W-A-W hazard

This type of hazard may occur when two adjacent instructions (i) and (j) save the result of their execution to the same resource (register, memory cell) and the time of the execution of the earlier instruction (i) is longer than the time of the execution instruction (j). It may cause an erroneous result of executing this sequence of instructions to be written into the resource. The typical way to remove such a dependency is to delay the completion of the execution instruction (j) until the execution of the instruction (i) is completed. 

To illustrate this problem, the following code will be used:

;WinMIPS64 WAW hazard example

    .data

A:    .double 15.0

B:    .double 5.0

C:    .double 4.4

D:    .double 1.0

E:    .double 3.14.0

res:    .double 0.0

    

    .text

main:    l.d f2,A(r0)

    l.d f3,B(r0)

    l.d f4,C(r0)

    l.d f5,D(r0)

    l.d f6,E(r0)

    nop

    mul.d f6,f2,f4

    sub.d f6,f2,f3

    add.d f3,f6,f4

    s.d f3,res(r0)

    halt

Note très importante ! Avant d’exécuter ce programme, assurez-vous que le mécanisme de transfert de données est désactivé . Si le transfert de données est activé, le matériel MIPS ne peut pas détecter, signaler et prévenir les risques liés aux courants d’arrêt automatiques (WAW). 

Exécutez le programme d'exemple. Analysez le diagramme du cycle d'horloge et trouvez l'instruction qui provoque le blocage WAW.

Indiquez l'instruction qui a causé le risque de WAW.

0%
0%
0%
100%
0%
More questions like this

Want instant access to all verified answers on moodle.lab.ii.agh.edu.pl?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome