Question

Question 12) Consider the following MIPS code. DADDIU Loop: L.D L.D MUL.D S.D DADDIU DADDIU DSUBU BNEZ R4, Rx, #512 F2, (Rx)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a)

The dynamic instruction in the program is that instruction which is actually executed by the program during the execution.

Here, the dynamic instruction count depends on the number of the execution of the loop instruction.

Here, the loop executes until the value of R20 is not computed zero.

The number to time loop needs to be exited to get R20 value to 0  is 64.

Total dynamic instruction count = 1 + 64(8) = 513

b) Number of cycles for the execution of the above program is

=\sum (Instrcution count of each insutction * Cycles required for that instruction)   

=1*3 + 64(2 + 2 + 5 +2 + 3 + 3 + 3 +1 )

=1347

Add a comment
Know the answer?
Add Answer to:
Question 12) Consider the following MIPS code. DADDIU Loop: L.D L.D MUL.D S.D DADDIU DADDIU DSUBU...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A. Ch. 3.4 - Tomasulo's Algorithm We are given the following MIPS code with the following...

    A. Ch. 3.4 - Tomasulo's Algorithm We are given the following MIPS code with the following latencies: Latency L.D MULT.D L.D F2,0(R2) F8, F6,F2 F4,4(R4) F12, FO,F4 F10, F8, F2 ADD.D ADD.D The code is run on the following Tomasulo architecture, with initial setup (Cycle O) shown below. Show what happens during the execution of the code for the first four (4) cycles, starting with Cycle 1.

  • This is vhdl code can you please explain how they got the answer? How many sor following instructions are executed by the MIPS single-cycle per instruction processor from class proces cycles will...

    This is vhdl code can you please explain how they got the answer? How many sor following instructions are executed by the MIPS single-cycle per instruction processor from class proces cycles will it elelt take for this processor's program counter to reach the "nop" instruction? To get credit explain how the cycles are accountecd andi $3, $3,0 andi $2, $2,0 addi $2, $2, 20 : initialize to O ; clear reg. ;loop bound ;load x(i) to R15 ; load yi)...

  • Problem 4 (15pts): (a) (5pts) Consider the following MIPS memory with data shown in hex, which ar...

    Problem 4 (15pts): (a) (5pts) Consider the following MIPS memory with data shown in hex, which are located in memory from address 0 through 15. Show the result of the MIPS instruction "lw Ss0,4(Sa0)" for machines in little-endian byte orders, where Sa0 4. Address Contents Address Contents 9b lb 2 4 6 10 b4 c5 12 13 14 15 3d 5f 70 7 8f (b) (10pts)Assume we have the following time, performance and architecture parameters in the specified units Ec-...

  • Problem 4 (15pts): (a) (5pts) Consider the following MIPS memory with data shown in hex, which...

    Problem 4 (15pts): (a) (5pts) Consider the following MIPS memory with data shown in hex, which are located in memory from address 0 through 15. Show the result of the MIPS instruction "lw Ss0,4(Sa0)" for machines in little-endian byte orders, where Sa0 4. Address Contents Address Contents 9b lb 2 4 6 10 b4 c5 12 13 14 15 3d 5f 70 7 8f (b) (10pts)Assume we have the following time, performance and architecture parameters in the specified units Ec-...

  • Consider the following MIPS code (don't worry about what it does): loop: beq $s0, $s1, done...

    Consider the following MIPS code (don't worry about what it does): loop: beq $s0, $s1, done addi $t0, $t0, 7 addi St1, St2, 4 addi $s0, $s0, 1 j loop done: beq St1, $15, skip addi St0, Sto, 1 addi St1, St2, St0 skip addi $t5, $0, 10 beq St1, St5, done j end Compute the branch offset for each beq in number of words away from the branch (e.g., "branch offset is 2") Assume label loop is at location...

  • 12 po Iw add Question 11 The dassic five-stage pipeline MIPS architecture is used to execute...

    12 po Iw add Question 11 The dassic five-stage pipeline MIPS architecture is used to execute the code fragments in this problem. Assume the followings: • The architecture fully supports forwarding • Register write is done in the first half of the clock cycles register read is performed in the second half of the clock cyde. Branches are resolved in the third stage of the pipeline and the architecture does not utilize any branch prediction mechanism Register R4 is initially...

  • Consider a VEX-executing VLIW machine with the following characteristics: The machine supports 4 slots (4-wide machine)...

    Consider a VEX-executing VLIW machine with the following characteristics: The machine supports 4 slots (4-wide machine) with the following resources: 2 memory units each with a load latency of 3 cycles 2 integer-add/sub functional units with a latency of 2 cycle 1 integer-multiply functional unit with a latency of 4 cycles Each functional unit in the machine is pipelined and can be issued a new operation at each cycle. However, the results of an operation are only available after the...

  • 4.9 [10/20/20/15/15] Consider the following code, which multiplies two vec- tors that contain sin...

    4.9 [10/20/20/15/15]<4.2> Consider the following code, which multiplies two vec- tors that contain single-precision complex values: for (i-0:i <300:i++) Assume that the processor runs at 700 MHz and has a maximum vector length of 64. The load/store unit has a start-up overhead of 15 cycles; the multiply unit, 8 cycles; and the add/subtract unit, 5 cycles. a. [101 <4.3> What is the arithmetic intensity of this kemel? Justify your answer. b. [20] <4.2> Convert this loop into RV64V assembly code...

  • A short program loop goes through a 16 kB array one word at a time, reads...

    A short program loop goes through a 16 kB array one word at a time, reads a number from the array, adds a random number, and stores the result in the corresponding entry in another array that is located in the memory immediately following the first array. An outer loop repeats the above operation 100 times. The 64-bit processor, operating at a clock frequency of 4 GHz, is pipelined, has 48 address lines, three levels of caches with a 64...

  • Please comment the MIPS code to help me understand. Here is what the code accomplishes. Here...

    Please comment the MIPS code to help me understand. Here is what the code accomplishes. Here is the code, partially commented. .data Matrix: .word 41,45,5, 34,8, 15,16,23,44,48,12,32,18,47,22,8,22 .word 46,40,42,33,13,38,27,6, 29,25,18,40,47,22,26,14,3 .word 7, 48,35,9, 43,38,9, 49,28,25,42,5, 44,10,5, 38,14 .word 46,33,16,6, 13,20,31,1, 8, 17,1, 47,28,46,14,28,7 .word 32,2, 48,25,41,29,14,39,43,46,3, 39,32,49,41,28,46 .word 5, 43,2, 48,13,4, 33,41,32,19,9, 25,30,22,2, 9, 40 .word 14,47,22,18,47,3, 35,44,18,6, 33,22,11,6, 47,50,4 .word 28,34,20,30,18,27,38,5, 26,40,37,23,16,13,37,8,7 .word 48,38,39,12,10,39,23,20,21,20,33,16,24,21,25,3,46 .word 49,38,40,38,13,47,5, 13,4, 13,23,26,12,30,29,29, 3 .word 8, 20,10,13,31,7, 12,41,12,21,28,26,43,14,35,10,19 .word 49,33,25,26,24,29,46,22,7, 5, 15,41,10,31,19,41,27 .word 48,9,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT