CS161: Design and Architecture of Computer Systems

Professor: Dr. Laxmi N. Bhuyan, (951) 827-2347
Lecture: Tuesday, Thursday 12:40-2:00 PM 142 Engineering II
Office hours: Wednesday 3:00-4:00 PM 441 Engineering II or by appointment.
Lectrures web page: CS161 Lectures

TA: Vladimir Vacic
Discussion: Monday 4:10-5:00 PM Spieth 1307;
Wednesday 5:10-6:00 PM Sproul 1358
Office Hours: Tuesday 2:00-3:00 PM, Wednesday 4:00-5:00 PM 362 Engineering II or by appointment.

Textbook

Computer Organization and Design: The Hardware/Software Interface, Patterson and Hennessy, 3rd Edition.

Expected coverage

Grading

There will be 5 homeworks. Each will contribute 4% to the final grade for the course (i.e. all five homeworks combined will constitute 20% of your final grade).

WeekAssignedDue
1  
2Homework 1 (Apr-10)Homework 1 (Apr-16, 5:00 PM)
3Homework 2 (Apr-17) 
4 Homework 2 (Apr-28, 5:00 PM)
5Homework 3 (May-1) 
6 Homework 3 (May-12, 5:00 PM)
7Homework 4 (May-15) 
8 Homework 4 (May-26, 5:00 PM)
9Homework 5 (May-29)Homework 5 (Jun-2, 5:00 PM)
10  


Homeworks should be submitted in electronic format (plain text, PostScript, or PDF, i.e. something I can send directly to the printer) via turn-in. Late submissions will be accepted two days after the due date and time, with a 10% penalty per day.

Academic honesty

Your homeworks must represent your original work and must be developed completely independently by each one of you. Copying from any sources (web, other books, past or current students, etc.) is strictly prohibited. No cooperation, discussion, sharing, exchange or consultation between the students themselves is allowed. This, of course, does not apply to any discussions taking place during the lectures under the supervision of the instructor.

You can report cheating anonymously at: https://www.cs.ucr.edu/cheating/.

Students violating this policy will be given a failing grade for the course and their case will be referred to the office of Vice-Chancellor for Student Affairs. On the other hand, students are strongly encouraged to cooperate and consult each other in preparation for the exams.

Mailing List

A class mailing list: cs161@lists.cs.ucr.edu will be established to disseminate information pertaining to this class. Make sure to sign-up for the mailing list in order to receive prompt information about class assignments, additional resources and other pertinent matters.

You can sign up for it at: https://www.cs.ucr.edu/mailman/listinfo/cs161

IMPORTANT: only UCR e-mail addresses will be allowed on the list!

Homeworks

Homework 1

Chapter 4: Assessing and Understanding Performance

Problem Set 1: page 272, problems 4.1, 4.2, 4.3, 4.8, 4.9, 4.13, 4.14, 4.15, 4.45, 4.46 (10 points each) + 4.47 (optional)

Homework 2

Chapter 2: Instructions: Language of the Computer

Problem Set 2: page 148, problems 2.6, 2.29, 2.30, 2.31, 2.38 (15 points each) +

A direct MIPS translation of the C loop:
while (save[i]==k)
    i = i + j;
with i, j, and k corresponding to registers $s3, $s4, and $s5, and the base of the array save in $s6, is:
Loop: add $t1, $s3, $s3    # Temp reg $t1 = 2 * i
      add $t1, $t1, $t1    # Temp reg $t1 = 4 * i
      add $t1, $t1, $s6    # $t1 = address of save[i]
      lw  $t0, 0($t1)      # Temp reg $t0 = save[i]
      bne $t0, $s5, Exit   # go to Exit if save[i] != k
      add $s3, $s3, $s4    # i = i + j
      j Loop               # go to Loop 
Exit:
This translation uses both a conditional branch and an unconditional jump each time through the loop. Only poor compilers would produce code with this loop overhead. Rewrite the assembly code so that it uses at most one branch or jump each time through the loop. How many instructions were executed before and after the optimization if the number of iterations of the loop is 10? (25 points)

Homework 3

Chapter 3: Arithmetic for Computers

Problem Set 3: page 229, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6 (4 points each), 3.7, 3.10, 3.12, 3.39, 3.44 (9 points each),
Appendix B (on the CD), B.1 (4 points), B.2, B.11, B.15 (9 points each)

Homework 4

Chapter 5: The Processor: Datapath and Control

Problem Set 4: page 354, 5.10, 5.11, 5.13, 5.28, 5.35 (20 points each)
Scans of a single- and multi-cycle datapaths are provided, in case you would like to use it for the homework.
Sample: How to exdend the datapath from the book to incorporate the JR instruction.

Homework 5

Chapter 7: Large and Fast: Exploiting Memory Hierarchy

Problem Set 5: page 555, 7.9, 7.10, 7.12, 7.14, 7.18, 7.19, 7.20, 7.32, 7.35, 7.39 (10 points each)
Lecture notes for week 9 are available.