Answered step by step
Verified Expert Solution
Question
1 Approved Answer
When counting the number of cycles for a loop, find out when (in which cycle) the first instruction in the loop is fetched and when
When counting the number of cycles for a loop, find out when (in which cycle) the first instruction in the loop is fetched and when it is fetched again (assuming the loop repeats), and then calculate the difference of cycle numbers. The difference is the number of cycles an iteration takes. For example, if the first instruction in a loop is fetched in cycle 1 and fetched again in cycle 11, each iteration takes 10 cycles.
2. (10 points) Control hazards. Suppose the branch frequencies (as percentages of all instructions) are as follows: 1%. 15%, and 60% of the conditional branches are taken. Jumps (and calls): Conditional branches: Suppose a pipeline has four stages, each stage taking one cycle. The first pipeline stage can always be done independent of whether the branch (or jump) goes. The target addresses is available at the end the second stage for both jumps and conditional branches. Conditional branches need one more cycle to calculate their condition in the third stage Ignore other pipeline stalls and assume branches are predicted taken. How much faster would the processor be without any control hazardsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started