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.