Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider a pipelined execution of the following program segment in which the ins

ID: 3777459 • Letter: C

Question

Consider a pipelined execution of the following program segment in which the instruction labeled “Beg” starts at memory address (2040)10. All registers used contain 0 initially.

Beg:

add

$8, $9, $10

beq

$5, $6, Nex

lw

$7, 30($13)

sw

$14, 48($15)

Nex :

nand

$11, $12, $13

1. Show the state of the 5-stage pipeline for the instructions above.

2. Assume the time for stages is 100ps for register read or write, and 200ps for other stages. Compute the total time required for each of the instructions used in the program segment above.

3. Compare the total execution time for non-pipelined and pipelined execution of the above program segment:

Non-pipeline design = ______________ ps

Pipelined design = ______________ ps

_________________ design is _________ times faster

Beg:

add

$8, $9, $10

beq

$5, $6, Nex

lw

$7, 30($13)

sw

$14, 48($15)

Nex :

nand

$11, $12, $13

Explanation / Answer

1.   The 5-stage pipeline has following five stages:

Fetch(F)

Decode(D)

Execute(E)

Memory access

(MEM)

Write-back

(WB)

Stage 1                 Stage 2                       Stage 3            Stage 4            Stage 5

2.

Consider the time required for the read or write is 100ps and for the other stages the required time is 200ps.

For instruction, add $8, $9, $10 the time taken for the each pipeline stages is as follow:

F: 100

D: 200

E: 200

MEM: 0

WB: 100

Therefore, the total time required for the instruction add $8, $9, $10 is 100+200+200+0+100=600ps

For instruction, beq $5,$6,Nex the time taken for the each pipeline stages is as follow:

F: 100

D: 200

E: 200

MEM: 0

WB: 0

Therefore, the total time required for the instruction beq $5,$6,Nex is 100+200+200=500ps.

For instruction, lw $7, 30($13) the time taken for the each pipeline stages is as follow:

F: 100

D: 200

E: 200

MEM: 200

WB: 100

Therefore, the total time required for the instruction lw $7, 30($13) is 100+200+200+200+100=800ps.

For instruction, sw $14, 48($15) the time taken for the each pipeline stages is as follow:

F: 100

D: 200

E: 200

MEM: 200

WB: 0

Therefore, the total time required for the instruction sw $14, 48($15) is 100+200+200+200=700ps.

For instruction, nand $11, $12,$13 the time taken for the each pipeline stages is as follow:

F: 100

D: 200

E: 200

MEM: 0

WB: 100

Therefore, the total time required for the instruction nand $11, $12,$13 is 100+200+200+100=600ps.

3.

The total execution time of non-pipelined for branching = 600+500+600=1700ps.

The total execution time of non-pipelined for non-branching = 600+500+800+700=2600ps.

The total execution time of pipelined for branching = 600+0+0+100=700ps.

The total execution time of pipelined for non-branching = 600+0+100+100=800ps.

Fetch(F)

Decode(D)

Execute(E)

Memory access

(MEM)

Write-back

(WB)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote