Here you can ask questions and find or give answers to organizational, academic and other questions about studying computer science.

1.1k questions

1.3k answers

1.7k comments

556 users

0 votes
If our pipeline has 8 stages and looks like this:

IF - ID - EX - EX - EX - EX - MA - WB

and we want to compute the needed stalls in case of a conflict with forwarding and register bypassing after an ALU instruction. The formula is p_EX - p_ID - 1. What do I now insert for p_EX? 3 since thats the first EX stage or 6 since that is the last one? What if it has several IF etc. stages? Do I have to take the last or the first stage into account for the formula?

Thanks in advance and best regards
in * TF "Emb. Sys. and Rob." by (1.2k points)

1 Answer

+1 vote
 
Best answer
p_EX is defined as the pipeline stage where ALU results are available. In your case it is stage 6 and not 3, so that your calculation should be

p_EX - p_ID - 1 = 6 - 2 - 1 = 3

The formula also applies if there are further IF stages, and even if there are several ID stages (you then take the last stage for p_ID).
by (170k points)
selected by
Thank you very much, now everything is clear :)

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer
Imprint | Privacy Policy
...