82.4k views
0 votes
A pipeline system is affected by a branch in 3 stall cycles. If 35% instructions are branches and the pipeline is operating with a clock cycle time of 10 ns, providing the speed-up factor is 8, what will be the number of stages in the pipeline?

(a) 5
(b) 6
(c) 7
(d) 8

1 Answer

3 votes

Final answer:

To determine the number of stages in the pipeline system, we calculate the average stall cycles per instruction due to branches. With a speed-up factor of 8 and a clock cycle time of 10 ns, the number of pipeline stages can be determined using a formula.

Step-by-step explanation:

To determine the number of stages in the pipeline, we need to consider the effects of branch instructions on the pipeline system. Given that 35% of instructions are branches and there are 3 stall cycles for each branch, the average stall cycles per instruction due to branches can be calculated as:







The speed-up factor of 8 implies that the pipeline is 8 times faster than a non-pipelined system. Since the clock cycle time is 10 ns, the effective clock cycle time in the pipeline is:







The number of pipeline stages can be calculated using the following formula:







Since the number of stages should be an integer, we can round up to the closest whole number, which gives us a total of 2 stages in the pipeline.

User Liyan
by
7.8k points