Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CS 1541 Computer Architecture Homework 3 - Spring 2003, Assignments of Computer Science

Computer architecture homework assignment for cs 1541 course in spring 2003. The assignment includes questions related to the execution of given code on a pipelined datapath, explaining the roles of forwarding unit and hazard detection unit, and reordering instructions to minimize performance.

Typology: Assignments

Pre 2010

Uploaded on 09/02/2009

koofers-user-ypi
koofers-user-ypi 🇺🇸

10 documents

1 / 2

Toggle sidebar

Related documents


Partial preview of the text

Download CS 1541 Computer Architecture Homework 3 - Spring 2003 and more Assignments Computer Science in PDF only on Docsity! 1 of 2 CS 1541 Computer Architecture - Spring 2003 Homework #3 Assigned: Wednesday, January 29. Due: Wednesday, February 5. All homeworks are due at the beginning of class. Assignment (1) Consider executing the code given below on the pipelined datapath of Figure 6.46 on page 492 in the book: add $1, $2, $3 add $4, $1, $5 lw $7, 0($8) add $10, $7, $9 sw $10, 0($8) (a) At the end of sixth cycle of execution, which registers are being read and which are being writ- ten ? (b) With regard to the above question, explain what the forwarding unit is doing during the sixth cycle of execution. Mention the comparisons being made, if any. (c) With regard to the program in (1), explain what the hazard detection unit is doing during the fifth cycle of execution. Mention the comparisons being made, if any. (2) Consider executing the code given below on the pipelined datapath of Figure 6.46 in book on page 492. addi $5, $1, 200 lw $4, 100($5) add $6, $4, $4 sw $6, 100($5) xor $6, $3, $6 How many cycles will it take to execute this code? Draw a diagram like that on page 489 in book and illustrate the dependencies that need to be resolved and draw another diagram like that on page 491 (Figure 6.45) to illustrate how the code will actually be executed (incorporating any stalls or forwarding) so as to resolve the identified problems.
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved