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

Assignment No. 03 Semester Spring 2009 Advance ComputerArchitectuer-CS501 Total

ID: 3611490 • Letter: A

Question

Assignment No. 03

Semester Spring 2009

Advance ComputerArchitectuer-CS501

Total Marks: 25

Due Date: 18/05/2009

Objective:

To learn and understandbasic concepts of Pipelining.

Instructions:

Please read the followinginstructions carefully before solving & submittingassignment:

Assignment should be inyour own wordings not copied from net, handouts orbooks.

It should be clear thatyour assignment will not get any credit (zero marks)if:

o The assignment is submitted after duedate.

o The submitted assignment does not open or filecorrupt.

o The assignment is copied (from other student or copy fromhandouts or internet).

o Student ID is not mentioned in the assignment File or name offile is other than student ID.

For any query about theassignment, contact at cs501@vu.edu.pk

GOODLUCK

1. LD R1,45(R2)

2. DADD R7, R1,R5

3. DSUB R8, R1,R6

4. OR R9, R5,R1

5. DADD R10, R8,R5

6. XOR R2, R3,R4

By using the above code,answer the following questions:

Q.1 Identify eachdependency by type; list the two instructions involved; identifywhich

instruction isdependent; and name the storage location involved.[5]

Q.2 Draw the 5 stagepipelined diagram using “Forwarding” and without using“Forwarding”.

[10+10].

Note:One solved template example is given below, youcan do question#2 according to this format.

You are required to visit thefollowing internet link before starting the assignment.

http://en.wikipedia.org/wiki/Instruction_pipeline

WithoutStall

WithStall

Explanation / Answer

1) Data dependences:

1. LD R1, 45 (R2)

                                            Instruction 2 is dependant on1 waiting for R1 value

2. DADD R7, R1,R5           

3. DSUB R8, R1,R6           Instruction 3 is dependent on1 waiting for R1 value

4. Or R9, R5,R1                 Instruction 4 is dependent on 1 waiting for R1 value

5. BNEZ R7,target             Instruction 5 is dependent on 2 waiting for R7 value

6. DADD R10, R8,R5         Instruction 6 isdependent on 3 waiting for R8 value

2) Control dependences: -

2. DADD R7, R1, R5

                                              Instruction 2 is dependent on 1 waiting for R7 value

3. BNEZ R7, target

Execution of instructions 6,7 is dependent on branchinstruction

If BNEZ (R7 0) is true, then the statements at the labeltarget get executed

Else statements 6, 7 get executed

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