ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 22 May 2017 My Price 9.00

Consider this sequence of instructions

Read the instructions for this assignment and complete it as per the Assignment Instructions in the Images. NOTE. Accept this assignment only if you can deliver the work on time.

1. (17 pts)Consider this sequence of instructions.CC 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 241 lw $t0, 4($sp)2 lw $t1, 8($sp)3 add $t2, $t0, $t14 sub $t2, $t2, $t15 addi $t2, $t2, 16 sw $t2, 12($sp)(a)Draw a pipeline diagram, similar to the ones in the lecture notes we have been drawing in class,showing the stages of each instruction as it moves through the pipeline. Assumethe only way we have ofresolving data hazards isto stall the pipeline by inserting bubbles.(b)What is the average IPC (instructions per clock). Show your work.Hint:bubbles arenopinstructionswhich move through all five pipeline stages just like any other instruction.(c)Assume all of these data hazardscouldbe eliminated by redesigning the hardware, so no bubbleswould be required. In that case, the average IPC would increase. Calculate the IPC for this sequence ofinstructions under ideal conditions, i.e., all data hazards are eliminated by clever hardware design. Showor explain your work. You do not need to include the pipeline diagram in your solution.(d)How many fewer clocks, expressed as a percentage relative to the sequence of(a), does the ideal sequence of (c) take. For example, ifclocksaandclockscare the number of clock cyclesto execute the sequences of Exercises (a) and (c), then the question is to calculate |clocksa-clocksc| ÷clocksa. Show or explain your work.(e)How much faster, expressed as a percentage relative to sequence (a), is the instruction sequence ofExercise (c), i.e., the instruction is asking you to calculate |clocksc-clocksa| ÷clocksc. Show or explainyour work.2. (17 pts)Consider this sequence of instructions, which requires bubbles because there are datahazards.CC 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 241 lw $t0, 4($sp)2 lw $t1, 8($sp)3 add $t2, $t0, $t14 sw $t3, 12($sp)5 lw $t4, 16($sp)6 addi $t4, $t4, -1For this sequence of instructions:(a)As it is, determine how many bubbles are required if we have no way of resolvingdata hazards other than stalling. Note: you do not have to draw the pipeline diagram for your solution, butyou may still need to draw it to determine how many bubbles are required.(b)What is the IPC? Show your work.(c)One way we discussed of eliminating bubbles is instruction reordering. It is possible to reorder theseinstructions to eliminate all of the data hazards. Do so by writing the numbers of the original instructions inthe proper order, e.g., some - thing like 1, 5, 2, 3, 6, 4 for the reordered sequence. Note: assume thereare instructions above and below instructions 1 and 6; in particular, some instruction above instruction 1has loaded $t3 with the value that sw will write to memory. Note: there is more than one way to reorderthese instructions to eliminate all hazards. To reduce the number of ways this can be done for gradingpurposes, for any instructions which are not reordered (i.e., if 1 and 2 in the original sequence are notmoved and no instruction is inserted in between them so they remain 1 and 2 in the reordered sequence),

Attachments:

Answers

(11)
Status NEW Posted 22 May 2017 06:05 AM My Price 9.00

-----------

Not Rated(0)