Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pipelined processor [ 2 5 points ] Please consider the following 7 stage pipelined processor ( depicted below ) . The pipeline is similar to

Pipelined processor [25 points]
Please consider the following 7 stage pipelined processor (depicted below). The pipeline is
similar to the standard 5 stage pipeline with the exception that the icache (IF stage) and dcache
(MEM stage) are both pipelined with a latency of 2 cycles. Results from cache reads are
available at the end of 2 cycles. As usual, the branch compare is calculated and the new PC
loaded during the ID stage.
Consider the following codes.
Loop: lw $2,0($4)
add $1,$1,$2
add $5,$5,$1
addi $4,$4,4
addi $3,$3,-1
bgez $3, Loop
(a)[5 points] Identify all read-after-write dependencies in the code above. You should draw
circles around two registers that exhibit the dependency and connect them with an arrow.
(b)[10 points] Assume the pipelined processor provides full forwarding and a hazard
detection logic. Please fill the multi-cycle pipelined diagram. Stall cycles can be expressed
by inserting the dash (--). Note that MEM1/2 are same as M1/M2.
(c)[7 points] To reduce the stall cycle, the compiler can reschedule the code. Please write
down the best optimized code sequence.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions

Question

Draw a breakeven chart to illustrate lowering price.

Answered: 1 week ago