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 :Consider the MIPS MIP of some overlapping instructions. Assume that the branch instructions are executed and complete their phase jumps
execution Phi 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 $$
L: lw $$
B: beq $$L
lw $$
sw $$
sub $$$
lw $$
B: bne $$L
add $$
sw $$
L: add $$
sw $$
lw $$
L: lw $$
B: beq $$L
sub $$$
add $$
B:jL
L: sub $$$
sw $$
In a particular run, the jump B instruction creates a loop of iterations,
in which the branch instruction B jumps of the iterations and the
branch instruction B performs a jump of the times it occurs. THE
branch instruction B 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 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 instructions 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 B and B 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 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 B and B If Bs prediction is successful in percentage
for execution forecast and for nonexecution forecast, while the forecast
seeing B is 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 : In this exercise you will consider the overlapping MDR and MIPS code of Exercise You are asked to calculate the instruction completion rates for the instances of questions C and D of Exercise 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
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
