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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!