Instructor:Prof. Stan Birchfield

207A Riggs Hall

656-5912

stb clemson.edu (insert @ symbol)

Grading Assistant:

Yi Jiang (Johnny)

yij clemson.edu (insert @ symbol)

654-2794 (home)

- HW#1 due Thursday, 9/4
- problems in text:
- 1.3
- 1.10a,b -- use computer A as the reference for the geometric mean
- 1.11
- 1.12
- 1.21a (use Dell Precision
Workstation 340 P4 1.5,1.7,1.8 GHz; typo: should be SPEC
*float*_base2000) - 1.1a (ECE629 only)

- problems in text:
- HW#2 due Thursday, 9/11
- Suppose you have a program with three non-overlapping parts. I.e., E
= t + u + v, where E is the total execution time and t, u, and v are the three
parts. Two of these parts, u and v, are sped up by factors s_u and s_v,
respectively.
- (a) Write the equation for the total speedup as a function of the two individual speedups.
- (b) Suppose t, u, and v take up 20%, 60%, and 20%, respectively, of the processor time before speedup. Suppose u is sped up by 10x and v by 20x. What is the total speedup?

- Suppose you have a program with three non-overlapping parts. I.e., E
= t + u + v, where E is the total execution time and t, u, and v are the three
parts. Two of these parts, u and v, are sped up by factors s_u and s_v,
respectively.
- HW#3 due Thursday, 9/18
- problems in text:
- 2.3
- 2.6
- 2.11 (use gcc instruction mix -- do NOT average gap and gcc; do NOT worry
that percentages do not add to 100%); categories:
*load/store*(load, store),*conditional branch*(cond branch),*jumps*(jump, call, return),*ALU*(everything else: add, sub, mul, compare, load imm, cond move, shift, and, or, xor, other logical)

- problems in text:
- HW#4 due Thursday, 9/25
- Translate the following C code to MIPS assembly language and machine code:

while (i != j) {

j = j+i;

i++;

}

Assume R6 contains i and R7 contains j. Make the loop as tight as possible. Hint: The opcode for bne is 5. - We wish to augment the single-cycle datapath of Figure 5.29 with the addi (add immediate) instruction. Describe the additional control lines, if any, that would be needed to support this instruction, and give the truth table for all control lines for the instruction.
- Same as above but augment with bne (branch if not equal).

- Translate the following C code to MIPS assembly language and machine code:
- HW#5 due Thursday, 10/16
- problems in text:
- A.1 (use Figure A.5 instead of Figure A.6, i.e., don't draw diagram ;

use abbreviations F,D,X,M,W for stages, and S for stalls;

note: the question is, "how many*total*cycles does this*code*take to execute?") - A.3
- A.4

- A.1 (use Figure A.5 instead of Figure A.6, i.e., don't draw diagram ;

- problems in text:
- HW#6 due Thursday, 10/30
- problems in text:
- A.2 (note: the question is, "how many
*total*cycles does this*code*take to execute?")

- A.2 (note: the question is, "how many

- problems in text:
- HW#7 due Tuesday, 11/4
- handout:
- Assume add takes 2 clock cycles, multiply takes 10, and divide takes 40.
For the following code,

LD F2, 21(R1)

ADDD F0, F2, F4

MULTD F8, F2, F3

DIVD F3, F4, F2

ADDD F9, F3, F4

SUBD F9, F1, F2- Fill in the scoreboard instruction status with the clock cycle number
- Fill in the scoreboard functional unit status and register result status with their values at clock cycle 5

- Assume add takes 2 clock cycles, multiply takes 10, and divide takes 40.
For the following code,

- handout:
- [optional] midterm #2 makeup due Tuesday, 11/18
- From MyCLE, get diagram (Fig. 6.51) and two problems. Work one or both problems. State on your paper the number of points you lost on the exam on each problem.

- HW#8 due Tuesday, 11/25
- problems in text:
- 3.1a,b
- 4.8a

- problems in text:

From MyCLE, click on *Login -> Class
& Work -> MyCLE classes -> Fall 2003 -> ECE429 -> MyFiles*

- HW and midterm solutions are under
*MyFiles or Read Only -> LibraryReserves* - PPT lecture slides are under
*MyFiles or Read Only -> ClassMaterials*

**Similar courses**- Dirk Grunwald's CSCI 5593 course at University of Colorado
- Mark Smotherman's CS464/664 course at Clemson
- David Culler's CS252 course at U.C. Berkeley
- David Patterson's CS252 course at U.C. Berkeley
- John Kubiatowicz's CS152 course and CS252 course at U.C. Berkeley
- Chen's course in Taiwan
- Montek Singh's COMP 206 ourse at UNC Chapel Hill
- Mikko Lipasti's ECE/CS 552 course at University of Wisconsin-Madison
- Cyndi Rader's CS341 course at Colorado School of Mines

**Other links**- SPEC homepage -- SPEC faq -- SPEC Open Systems Group (OPG) -- SPEC readme -- SPEC CPU2000 results
- Hans Moravec,
When will computer
hardware match the human brain?,
*Journal of Evolution and Technology*, 1998. - David Goldberg's
What every
computer scientist should know about floating-point arithmetic,
*Computing Surveys*, 1991