Question
Consider two computer systems A and B. For A, a branch is implemented by two instructions: Sub $3, $1, $2 #$3=$1-$2 Branch $3, 300 #take
Consider two computer systems A and B. For A, a branch is implemented by two instructions:
Sub $3, $1, $2 #$3=$1-$2
Branch $3, 300 #take the branch if $3=0
For B, the compare is included in the branch instruction as in the MIPS architecture
Beq, $1, $2, 300
All other instructions of the two machines are the same and on both machines, the instructions take the same number of cycles. The instruction frequency of machine A is shown in the following table. Since in a single instruction, machine B has to test the condition as well as handle the branch, the cycle time of machine B is 25% longer than A.
Instrunction type | % | Clock cycle count |
ALU ops | 47 | 1 |
Loads | 21 | 2 |
Stores | 12 | 2 |
Branchs | 20 | 2 |
1. What is CPI of A? CPI of B? 2. Execution time of A? Execution time of B? 3. Which one if faster? By how much?
Step 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