2016-10-08 1 views
0

Je vous en serais reconnaissant, si quelqu'un peut répondre à ma question concernant l'exercice suivant (pas un devoir, le faire pour moi-même):branche dans le classique pipeline à 5 étages

draw a pipeline cycle timing diagram for the above code. Start with the first lw before the loop, run one loop iteration, and stop at the first store of the second iteration.

Eh bien, j'omis la "above code", comme vous pouvez le voir dans le tableau. "S" signifie décrochage. Le tableau ci-dessous est supposé être une bonne réponse. Question: pourquoi y a-t-il un décrochage au cycle 9 pour une branche? C'est juste décoder l'étape. Si je comprends bien, il n'a pas encore besoin de valeurs d'opérande.

Je vous en serais reconnaissant si quelqu'un peut commenter ...

 
instruction 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 
-------------------------------------------------------------------------------- 
lw r3, 0(r2) f | d | x | m | w | | | | | | | | | | | 
sw r3, 0(r2)  | f | d | x | m | w | | | | | | | | | | 
sub r1, r3, r4 | | f | d | x | m | w | | | | | | | | | 
lw r3, 0(r1)  | | | f | d | x | m | w | | | | | | | | 
sw r1, 0(r3)  | | | | f | d | s | x | m | w | | | | | | 
subi r2, r2, 4 | | | | | f | s | d | x | m | w | | | | | 
bnez r2, loop | | | | | | | f | s | d | x | m | w | | | 
lw r3, 0(r2)  | | | | | | | | | f | d | x | m | w | | 
sw r3, 0(r2)  | | | | | | | | | | f | d | x | m | w | 

Répondre