computer architecture 2 nd year (computer and information sc.) [email protected]

35
Computer Architecture 2 nd year (computer and Information Sc.) [email protected]

Upload: cecily-stevens

Post on 20-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Computer Architecture2nd year (computer and Information Sc.)

[email protected]

Page 2: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Grading

Assessment Grade Final Exam

50 Mid-Term Exam

25 Class Work

10 Other Activities and/or exams 15

Page 3: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Contents Computer Function and Interconnection Instruction Sets

Characteristics and Functions Addressing modes

Cache and internal Memory CPU and Control unit operation Input/Output Multiprocessor and alternative

architectures Performance enhancement

Page 4: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

References

Computer Organization and Architecture, 8th Ed., (or Later)

W. Stallings

Computer Organization and Design4th Ed., (or Later)

D. Pattarson and J. Hennessy

Page 5: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

WHY STUDY COMPUTER ARCHITECTURE?

The IEEE/ACM Computer Curricula lists computer architecture as one of the core subjects that should be in the curriculum of all students in computer science and computer engineering. The report says the following: “The computer lies at the heart of computing.

Without it most of the computing disciplines today would be a branch of theoretical mathematics. To be a professional in any field of computing today,

Page 6: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

one should not regard the computer as just a black box that executes programs by magic. All students of computing should acquire some understanding and appreciation of a computer system’s functional components, their characteristics, their performance, and their interactions. There are practical implications as well. Students need to understand computer architecture in order to structure a program so that it runs more efficiently on a real machine. In selecting a system to use, they should be able to understand the tradeoff among various components, such as CPU clock speed vs. memory size.”

Page 7: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Computer Architecture (definition)

Computer architecture describes the main attributes of a system visible to a programmer, that have direct impact on logical execution of a program. Examples of architectural attributes include

instruction set, the number of bits used to represent various data types (e.g., numbers, characters), I/O mechanisms, and techniques for addressing memory.

Page 8: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Architecture & Organization 1 it is an architectural design issue

whether a computer will have a multiply instruction.

It is an organizational issue whether that instruction will be implemented by a special multiply unit or by a repeated use of the add unit of the system.

Page 9: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Architecture & Organization 2 All Intel x86 family share the same basic

architecture The IBM System/370 family share the

same basic architecture This gives code compatibility (at least

backwards) Organization differs between different

versions (different price and performance characteristics)

Page 10: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Structure & Function A computer is a complex system. How can

one clearly describe it? The key is to recognize the hierarchical nature

of most complex systems, including the computer.

A hierarchical system is a set of interrelated subsystems, each of the latter, in turn, hierarchical in structure

Structure is the way in which components relate to each other

Function is the operation of individual components as part of the structure

Page 11: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

A functional viewof the computer

Page 12: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Function

Computer functions are: Data processing Data storage Data movement Control

Page 13: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Structure - Top Level

Computer

Main Memory

Input /Output

SystemInterconnection

Peripherals

Communicationlines

CentralProcessing Unit

Computer

Page 14: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Function (CPU or processor): Controls the

operation of the computer and performs its data processing functions

Main memory: Stores data I/O: Moves data between the computer

and its external environment System interconnection (system bus):

provides mechanism for communication among CPU, main memory, and I/O

Page 15: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Structure - The CPU

Computer Arithmeticand Login Unit

ControlUnit

Internal CPUInterconnection

Registers

CPU

I/O

Memory

SystemBus

CPU

Page 16: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Function

Control unit: Controls the operation of the CPU and hence the computer.

ALU: Performs the computer’s data processing functions.

Registers: Provides storage internal to the CPU.

CPU interconnection: provides mechanism for communication among the control unit, ALU, and registers

Page 17: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Structure - The Control Unit

CPU

ControlMemory

Control Unit Registers and Decoders

SequencingLogic

ControlUnit

ALU

Registers

InternalBus

Control Unit

Page 18: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

von Neumann architecture

Data and instructions are stored in a single read–write memory.

The contents of this memory are addressable by location, without regard to the type of data contained there.

Execution occurs in a sequential fashion (unless explicitly modified) from one instruction to the next.

Page 19: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

What is a program? A sequence of steps For each step, an arithmetic or logical

operation is done For each operation (e.g. ADD, MOVE) a

unique code is provided For each operation, a different set of

control signals is needed A hardware segment accepts the code

and issues the control signals

Page 20: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Program Concept

Page 21: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Components The Control Unit and the Arithmetic and

Logic Unit constitute the Central Processing Unit

Data and instructions need to get into the system and results out Input/output

Temporary storage of code and results is needed (stored-program concept) Main memory

Page 22: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Software and hardware:Hierarchical view

Page 23: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Below your program

Page 24: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Computer Components:Top Level View

Page 25: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Registers 1 Memory buffer register (MBR): Contains

the data to be written into memory or receives the data read from memory

Memory address register (MAR): Specifies the address in memory for the next read or write

Similarly, an I/O address register (I/OAR) and an I/O buffer register (I/OBR) are used between I/O module and the CPU

Page 26: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Registers 2

Instruction register (IR): Contains the instruction being executed

Program counter (PC): Contains the address of the next instruction to be fetched from memory

Page 27: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

CPU Operation The processor executes the program by

reading (fetching) it from memory, instruction by instruction, and executing each instruction.

These steps are known as: the instruction cycle

1.Read (fetch) the next instruction from memory

2. Execute the instruction

Page 28: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Instruction CycleFetchExecute

Page 29: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Fetch Cycle Program Counter (PC) holds address of

next instruction to fetch Processor fetches instruction from

memory location pointed to by PC Increment PC (Unless told otherwise) Instruction loaded into Instruction

Register (IR)

Page 30: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Execute Cycle 1

Processor interprets instruction and performs required actions. In general these action falls into:

Processor - memory data transfer between CPU and main

memory Processor - I/O

Data transfer between CPU and I/O module

Page 31: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Execute Cycle 2 Data processing

Some arithmetic or logical operation on data

Control Alteration of sequence of operations e.g.

jump (branch)

Page 32: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Example of Program Execution 1

Page 33: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Example of Program Execution 2

Page 34: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

RQ: 1.2, 1.3, 1.4, 1.5, 3.1

P:3.1, 3.2, 3.3, 3.4

Page 35: Computer Architecture 2 nd year (computer and Information Sc.) haboulenien@hotmail.com

Chapter 1Chapter 3 up to page 72