COMPUTER ORGANIZATION _ ARCHITECTURE

Document Sample
COMPUTER ORGANIZATION _ ARCHITECTURE Powered By Docstoc
					COMPUTER ORGANIZATION & ARCHITECTURE                                                              Sol QZ-6


COMPUTER ORG & ARCH Serial No:                                                 N/A
Spring 2009 Semester
                                                          Name ____________________________________
Quiz 6
                                                          Section ________ Roll No: ________________
Total Time: 10 Minutes                                    Signature: _______________________________
Total Marks: 20




                                            Q        Q1 Q2 Total
                                           Total
                                          Marks      16 4 20
                                          Marks
                                         Obtained




You are advised to READ these notes:
    1. Quizzes submitted without legible Roll # will NOT be graded!
    2. Think before you write! Cutting marks in a column of table may void any points earned in that column.
    3. Attempt on the Question Paper. NO EXTRA SHEET will be provided/ accepted. No additional sheet will
       be provided for rough work. Use the back of the page where provided space is not sufficient.
    4. After asked to commence the quiz, please verify that you have four (4) different printed pages
       including this title page.
    5. To earn partial credit, you must show all your work! To earn full credit, you must also be correct.
    6. Quiz is closed books,   closed notes. You will be charged for any material which can be classified as
       ‘helping in the quiz’ found near you.
    7. Calculator/stationery sharing is strictly prohibited.
    8. Students who attempt the paper with lead pencils loose the right to get them rechecked.




15-April-09                                                                                         Page 1 of 4
COMPUTER ORGANIZATION & ARCHITECTURE                 Sol QZ-6




                THIS PAGE INTENTIONALLY LEFT BLANK




15-April-09                                           Page 2 of 4
COMPUTER ORGANIZATION & ARCHITECTURE                                                                 Sol QZ-6
P.1. Given the pipelined data path:




a.                                                                                           Points 32 x 0.5 = 16
Fill in the table below to indicate the control values for the instruction given and which pipeline stage
(1 through 5) is the control signal stored. Separate multiple stages with “,”:


    Instruction MemRd RegWrt           MemtoReg    MemWrt ALUOp              Branch     ALUSrc      RegDst
    SLT         0          1           0           0            10           0          0           1
    Which       2,3        2,3,4       2,3,4       2,3          2            2,3        2           2
    Stages
    Used
    SW          0          0           x           1            00           0          1           x
    Which
                2,3        2,3,4       2,3,4       2,3          2            2,3        2           2
    Stages
    Used




15-April-09                                                                                             Page 3 of 4
COMPUTER ORGANIZATION & ARCHITECTURE                                              Sol QZ-6
b.                                                                               Points 4 x 1=4
Find the hazards (if any) in the following code? Explain your answer.

  1000        sub $4,$3,$1

    No hazard.




 1004     sw $4,8($3)

     Hazard with instruction at address 1000. Data bound for $4 in sub instruction must be
     forwarded to sw.




1008     add $3,$2,$3

    No hazard.




1012     addi $2,$4,15

    No hazard.




15-April-09                                                                         Page 4 of 4

				
DOCUMENT INFO