Question: EXERCISE 1 :Consider the MIPS MIP of some overlapping instructions. Assume that the branch instructions are executed and complete their phase jumps execution (

EXERCISE 1:Consider the MIPS MIP of some overlapping instructions. Assume that the branch instructions are executed and complete their phase jumps
execution (\Phi 3) of the instruction cycle without delay, that the FC is read immediately after it is written and in the same machine cycle, and that the cache memory is separated into instruction and data.
Let the following MIPS code, which is executed on the said NED:
add $2.$0.0
L: lw $3.0($8)
B1: beq $3,$16,L1
lw $4.0($9)
sw $4.8($8)
sub $5,$3,$4
lw $7.4($8)
B2: bne $7,$17,L2
add $2,$2,1
sw $2.4($9)
L2: add $3,$5,-1
sw $3.0($8)
lw $6.8($9)
L1: lw $9.12($9)
B3: beq $9,$0,L3
sub $16,$6,$16
add $8.$8.12
B:jL
L3: sub $16,$16,$2
sw $16.0($10)
In a particular run, the jump B instruction creates a loop of 100000 iterations,
in which the branch instruction B1 jumps 30% of the iterations and the
branch instruction B2 performs a jump 5% of the times it occurs. THE
branch instruction B3 performs a jump and terminates the loop at the last iteration.
A. Find all data dependencies in the code, as follows: Form a table with rows corresponding to the statements in the code and columns corresponding to
registers that can participate in dependencies, and note them in it
read and write operations of each register for each instruction. Then to
locate and provide all AME, EMA, and EMA dependencies you see, including those that operate between loop iterations.
B. Which of the dependencies you found are a risk to the overlay mechanism, if
does the MDR not have a drainage mechanism? Assuming that the branch instructions are performed with static prediction based on the sign of the shift and that the addresses
destination of the branches are calculated in the decoding phase (\Phi 2) of the cycle
command, provide the necessary timing diagrams covering all possible execution cases of the branches. Based on these diagrams, calculate the acceleration of the execution rate of instructions1 in the above MDR, compared to the execution
in MDR of the same frequency but without partial overlap, in which each instruction completes in the minimum number of machine cycles, according to the state diagram .
C. The MDR has the drainage mechanism. Repeat the above: Identify dependencies that still pose a risk,
give the timing diagrams for the code execution, and calculate the
shedding average instruction completion rate compared to MDR without overlap.
How can you deal with data dependencies that pose a risk despite the sink mechanism without freezing the overlay mechanism? It is possible to eliminate
do all the risks in the above code go away this way? Show how you could
achieve it!
D. Procedural dependencies are found on instructions that follow some branch instruction and are executed only in one direction of the branch, but not in both.
Which of the commands follow branches B1 and B2 in the above code
are they procedurally dependent on them? If the MDR has a drain mechanism for
dealing with data dependencies, but also a dynamic prediction mechanism for
pruning where the destination address becomes available at the end of the recall phase
(\Phi 1) from suitable destination address memory, give the timing diagrams for
the execution of the code, for all combinations of prediction and result ex-
for the two branches B1 and B2. If B1's prediction is successful in percentage
75% for execution forecast and 85% for non-execution forecast, while the forecast
seeing B2 is 99% successful for both predictions, calculate the speedup of instruction completion rate relative to MDR without overlap. Suggestion:
The predicted jump execution rate is derived as a function of the success rate
prediction and jump execution rate.
EXERCISE 2: In this exercise you will consider the overlapping MDR and MIPS code of Exercise 1. You are asked to calculate the instruction completion rates for the instances of questions C and D of Exercise 1, but without relying on the timing diagrams. So:
A. Find the percentages of occurrences of each instruction type during code execution, with
based on the information given to perform the branches. In the calculation
these percentages do not include orders that are canceled and therefore not completed.
B. For each of the two cases find the average number of cycles per instruction (CPI),
for each of the command types that appear in the code. In particular, studying
the code, find how much overhead you have per load command from freezes due to danger-
of data,as well as how much you charge per branch order from cancellations
orders and freezes due to procedural risks, again based on the information that
are given to perform the branches. Average CPI per order type is simply derived
adding the corresponding average burden to the ideal CPI of an overlapping MDR.
C. Now calculate the total average CPI for each of the two cases, and from this
find the average order completion rate. The results should verify them
values you found in Exercise 1.

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!