Ch04.2. Consider the following assembly language code: 10: lw $30, value I1: add $31, $30, $a1 12: add $t1,$t1, Sal 13: lw $t7, ($30) 14: bnez St7, loop 15: add $t1,$t1, $30 16: add $t2, $30, $t4 17: add $t3, $t2, $t5 Consider a pipeline with forwarding, hazard detection, and 1 delay slot for branches. The pipeline is the typical 5-stage IF, ID, EX, MEM, WB MIPS design. For the above code, complete the pipeline diagram below (instructions on the left, cycles on top) for the code. Insert the characters IF, ID, EX, MEM, WB for each instruction in the boxes. Assume that there two levels of bypassing, that the second half of the decode stage performs a read of source registers, and that the first half of the write-back stage writes to the register file. Label all data stalls (Draw an X in the box). Label all data forwards that the forwarding

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Ch04.2. Consider the following assembly language code:
10: lw $30, value
I1: add $81, $80, $81
12: add $t1,$t1,$s1
13: lw $t7, ($80)
14: bnez St7, loop
15: add $t1,$t1, $30
16: add $t2, $30, $t4
17: add $t3, $t2, $t5
Consider a pipeline with forwarding, hazard detection, and 1 delay slot for branches. The
pipeline is the typical 5-stage IF, ID, EX, MEM, WB MIPS design. For the above code,
complete the pipeline diagram below (instructions on the left, cycles on top) for the code.
Insert the characters IF, ID, EX, MEM, WB for each instruction in the boxes. Assume that
there two levels of bypassing, that the second half of the decode stage performs a read of
source registers, and that the first half of the write-back stage writes to the register file.
Label all data stalls (Draw an X in the box). Label all data forwards that the forwarding
unit detects (arrow between the stages handing off the data and the stages receiving the
data). What is the final execution time of the code?
lw $80, value
add $s 1,$50,$s 1
add $t1,$t1,$s1
lw $t7, ($50)
bnez $t7, loop
add $t1,$t1,$50
add $t1,$50,$t4
add $t1,$t1,$t5
to
IF
t1
ID
IF
t3 t4 t5
t2
EX MEM WB
ID EX MEM WB
IF
ID
IF
t6
t7 t8 t9 t10 111 112 t13
EX MEM WB
ID EX MEM WB
IF
ID
IF
EX MEM WB
ID EX MEM WB
IF
ID
EX
IF
ID
MEM WB
EX
MEM WB
t14
t15
Transcribed Image Text:Ch04.2. Consider the following assembly language code: 10: lw $30, value I1: add $81, $80, $81 12: add $t1,$t1,$s1 13: lw $t7, ($80) 14: bnez St7, loop 15: add $t1,$t1, $30 16: add $t2, $30, $t4 17: add $t3, $t2, $t5 Consider a pipeline with forwarding, hazard detection, and 1 delay slot for branches. The pipeline is the typical 5-stage IF, ID, EX, MEM, WB MIPS design. For the above code, complete the pipeline diagram below (instructions on the left, cycles on top) for the code. Insert the characters IF, ID, EX, MEM, WB for each instruction in the boxes. Assume that there two levels of bypassing, that the second half of the decode stage performs a read of source registers, and that the first half of the write-back stage writes to the register file. Label all data stalls (Draw an X in the box). Label all data forwards that the forwarding unit detects (arrow between the stages handing off the data and the stages receiving the data). What is the final execution time of the code? lw $80, value add $s 1,$50,$s 1 add $t1,$t1,$s1 lw $t7, ($50) bnez $t7, loop add $t1,$t1,$50 add $t1,$50,$t4 add $t1,$t1,$t5 to IF t1 ID IF t3 t4 t5 t2 EX MEM WB ID EX MEM WB IF ID IF t6 t7 t8 t9 t10 111 112 t13 EX MEM WB ID EX MEM WB IF ID IF EX MEM WB ID EX MEM WB IF ID EX IF ID MEM WB EX MEM WB t14 t15
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Fundamentals of Computer System
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education