1 syllabus instructor: dr. wesam ashour office: b231 email: [email protected]@iugaza.edu...

80
1 Syllabus Instructor: Dr. Wesam Ashour Office: B231 Email: [email protected] Office Hours: Saturday 10:00 11:00, 13:0014:00 Sunday 11:00 13:00. Wednesday 10:00 11:00.

Post on 20-Dec-2015

225 views

Category:

Documents


5 download

TRANSCRIPT

1

Syllabus

Instructor: Dr. Wesam Ashour

Office: B231

Email: [email protected]

Office Hours: Saturday 10:00 11:00, 13:0014:00 Sunday 11:00 13:00. Wednesday 10:00 11:00.

2

3

Syllabus

Course: ECOM 3310 – Computer Architecture

Contents: 1- Ch.1: Introduction.

2- Ch.2: Instructions: Language of the Computer.

3- Ch.3: Arithmetic for Computers.

4- Ch.4: Assessing and Understanding Performance.

5- Ch.5: The Processor: Datapath and Control.

6- Ch.6: Enhancing Performance with Pipelining.

7- Ch.7: Large and Fast: Exploiting Memory Hierarchy

8- Ch.8: Input/Output Systems

We will cover as much as we can!

4

Syllabus 

Grades: 1- 30% Mid Term Exam.

2- 50% Final Exam.

3- Teaching Assistants control %20.

Midterm Exam: Tuesday, 16th November 2010, 11:00am-12:30pmFinal Exam: Saturday, 15th January 2011, 11:00-14:00

Important Notice:

Sometimes (& Suddenly) I will test you by giving Quizzes at the beginning of the lecture! - To solve it easily and to get the highest mark, you should always read the last two lectures before attending the class – Good Luck.

Important Advice:

From first day in the semester you should work very hard and you must activate your mind to think!

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

Chapter 2

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

lw $t0, 1200($t1)

add $t0, $s2, $t0

sw $t0, 1200($t1)

What is the MIPS machine language code for these three instructions?

1200 (in base 10) = 0000 0100 1011 0000 (binary)

$t0 register is number 8

$t1 register is number 9

$s2 register is number 18

Opcode -> lw is 35 (100011), sw is 43 (101011), R-type (000000) add func is 32 (100000)

43

lw $t0, 1200($t1)

add $t0, $s2, $t0

sw $t0, 1200($t1)

What is the MIPS machine language code for these three instructions?

1200 (in base 10) = 0000 0100 1011 0000 (binary)

$t0 register is number 8

$t1 register is number 9

$s2 register is number 18

Opcode -> lw is 35 (100011), sw is 43 (101011), R-type (000000) add func is 32 (100000)

100011 01001 01000 0000010010110000

000000 10010 01000 01000 00000 100000

101011 01001 01000 0000010010110000

44

or $t0, $t1, $t2

ori $t0, $t1, 255

sll $t0, $t1, 4

and $t0, $t1, $t2

45

46

47

48

49

if (save[i] >= k)

Code;

Assume save[i] is stored in $t1 and k is stored in $t2

50

slt $t0, $t1, $t2

bne $t0, $zero, Exit

Code

Exit:

if (save[i] >= k)

Code;

Assume save[i] is stored in $t1 and k is stored in $t2

51

if (save[i] < k)

Code;

Assume save[i] is stored in $t1 and k is stored in $t2

52

slt $t0, $t1, $t2

beq $t0, $zero, Exit

Code

Exit:

if (save[i] < k)

Code;

Assume save[i] is stored in $t1 and k is stored in $t2

53

if (save[i] > k)

Code;

Assume save[i] is stored in $t1 and k is stored in $t2

54

slt $t0, $t1, $t2

bne $t0, $zero, Exit

beq $t1, $t2, Exit

Code

Exit:

if (save[i] > k)

Code;

Assume save[i] is stored in $t1 and k is stored in $t2

55

if (save[i] <= k)

Code;

Assume save[i] is stored in $t1 and k is stored in $t2

Try it by yourself

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80