ata dependence is identified by the stage that produces the result (EX or MEM) and the instruction that consumes the result (1st instruction that follows the one that produces the result, 2nd instruction that follows, or both). We assume that the register write is done in the first half of the clock cycle and that register reads are done in the se

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

I need help with the following question below.

This exercise will help you understand the cost/complexity/performance tradeoffs of forwarding in a pipelined processor. Problems in this exercise refer to pipelined datapaths from Figure 4.45. These problems assume that, of all the instructions executed in a processor, the following fraction has a particular type of RAW data dependence. The type of RAW data dependence is identified by the stage that produces the result (EX or MEM) and the instruction that consumes the result (1st instruction that follows the one that produces the result, 2nd instruction that follows, or both). We assume that the register write is done in the first half of the clock cycle and that register reads are done in the second half of the cycle, so “EX to 3rd” and “MEM to 3rd” dependences are not counted because they cannot result in data hazards. Also, assume that the CPI  of the processor is 1 if there are no data hazards. 

EX to 1st only MEM to 1st only EX to 2nd only MEM to 2nd only EX to 1st and MEM to 2nd Other RAW dependencies
15% 20% 5% 15% 10% 10%

EX to 1st only example                                    MEM to 2nd only example

add $t0, $t1, $t2                                                lw $t0, 20($t1)

add $t3, $t0, $t4                                                add $t3, $t5, $t4

                                                                          add $t6, $t0, $s0

MEM to 1st only example                                 EX to 1st and MEM to 2nd only example

lw $t0, 20($t1)                                                   lw $t4, 24($t0)

add $t3, $t0, $t4                                                add $t9, $s0, $s4

                                                                          add $s1, $t4, $t9

EX to 2nd only example                                   Other RAW Dependence example

add $t0, $t1, $t2                                                  add $t0, $t1, $t2

add $t3, $t5, $t4                                                  add $s0, $t3, $s0

add $t6, $t0, $s0                                                 addi $s1, $s1, 4

                                                                            add $t3, $t0, $t4

If we use forwarding only from the MEM/WB pipeline register, what fraction of cycles are we stalling due to data hazards?

add $14, $5, $6
Instruction fetch
Ada
Add
Instruction
memory
IFAD
lw $13, 24 ($1)
Instruction decode
Read
register1
Read
2
Registers Read
dela:
Write
register
data
Read
data 1
16
Sign-
extend
ID/EX
s
left 2
add $12, $3, $4
Execution
"HERO)
AGD AGD
resu
Zero
ALU ALU
resu
EX/MEM
sub $11, $2, $3
Memory
Address
Data
memory
Wie
data
11
lw $10, 20($1)
Write-back
MEM/WB
(ONCE")
Transcribed Image Text:add $14, $5, $6 Instruction fetch Ada Add Instruction memory IFAD lw $13, 24 ($1) Instruction decode Read register1 Read 2 Registers Read dela: Write register data Read data 1 16 Sign- extend ID/EX s left 2 add $12, $3, $4 Execution "HERO) AGD AGD resu Zero ALU ALU resu EX/MEM sub $11, $2, $3 Memory Address Data memory Wie data 11 lw $10, 20($1) Write-back MEM/WB (ONCE")
Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY