EC303 - Chapter 1 Computer Architecture Organization

61

description

-

Transcript of EC303 - Chapter 1 Computer Architecture Organization

Page 1: EC303 - Chapter 1 Computer Architecture Organization
Page 2: EC303 - Chapter 1 Computer Architecture Organization

What do the insides of a computer “look like” ?

As users, we do not have to know the answer to this question,

Page 3: EC303 - Chapter 1 Computer Architecture Organization
Page 4: EC303 - Chapter 1 Computer Architecture Organization

We can run standard software packages without understanding exactly how they work.

We can program a computer in a high-level language without understanding how the machine executes the individual instructions.

We can create Web pages without understanding how the Web browser gets its pages from a Web server or how the Web server creates those pages.

We can purchase a computer system from a salesperson without understanding the specifications of the system

Page 5: EC303 - Chapter 1 Computer Architecture Organization

Understanding the computer system’s operations has an

immediate benefit:

it will allow you to use the machine it will allow you to use the machine more effectivelymore effectively.

Page 6: EC303 - Chapter 1 Computer Architecture Organization

Chapter 1 :

Page 7: EC303 - Chapter 1 Computer Architecture Organization
Page 8: EC303 - Chapter 1 Computer Architecture Organization

Computer Architecture refers to those attributes of a system visible to a programmer, or put another way, those attributes that have a direct impact on the logical execution of a program

The later definition (architecture) concerns more about the performance

Architecture concerns more about the basic instruction design, that may lead to better performance of the system

Page 9: EC303 - Chapter 1 Computer Architecture Organization

Example of architectural attributes include, instruction set, the number of bit used to represent various data type (number or characters),I/O mechanism and techniques for addressing memory

Page 10: EC303 - Chapter 1 Computer Architecture Organization

Computer organization refers to the operational units and their interconnections that realize the architectural specifications

Organizational, is the implementation of computer system, in terms of its interconnection of functional units : CPU, memory, bus and I/O devices

Page 11: EC303 - Chapter 1 Computer Architecture Organization

Organizational attributes include those hardware details transparent to the programmer, such as control signal, interface between computer and periperals and the memory technology used.

Example : IBM/S-370 family architecture. There are plenty of IBM products having the same architecture (S-370) but different organization, depending on its price/performance measures. Cost and performance differs the organizations

So, organization of a computer is the implementation of its architecture, but tailored to fit the intended price and performance measures.

Page 12: EC303 - Chapter 1 Computer Architecture Organization

The Reason : (Stalling’s arguments) Able to select “proper” computer systems

for a particular environment (cost and effectiveness)

Able to analyzed a processor “embedded” to an environment.

Able to analyzed the use of processor in automobile, able to use proper tools to analyzed

Able to choose proper software for a particular computer system

Page 13: EC303 - Chapter 1 Computer Architecture Organization
Page 14: EC303 - Chapter 1 Computer Architecture Organization

First Generation (1939 -1954) - vacuum tube Second Generation Computers (1954 -1959) -

transistor Third Generation Computers (1959 -1971) - IC

Fourth Generation (1971-Present) - microprocessor Fifth Generation (Present and Beyond)

Page 15: EC303 - Chapter 1 Computer Architecture Organization
Page 16: EC303 - Chapter 1 Computer Architecture Organization

A digital computer can be separated into 4 major parts:1. Central Processing Unit (CPU)2. Memory Unit3. Input/Output Unit (I/O)4. BUS interconnection

A digital computer can be separated into 4 major parts:1. Central Processing Unit (CPU)2. Memory Unit3. Input/Output Unit (I/O)4. BUS interconnection

Page 17: EC303 - Chapter 1 Computer Architecture Organization
Page 18: EC303 - Chapter 1 Computer Architecture Organization

I/O Unit

CPU(Memory

Unit)

Input Device

Output Device

Address Bus

Data Bus

Control Bus

Page 19: EC303 - Chapter 1 Computer Architecture Organization

Motherboard                                                         

Page 20: EC303 - Chapter 1 Computer Architecture Organization

The MotherboardMicroprocessor

Keyboard / Mouse Ports

Printer Port

Video Port

PCI Slots

Memory Slots

AGP Slot

Chipset

Page 21: EC303 - Chapter 1 Computer Architecture Organization

Is the brains of computer The place where all processing have to

be done Responsible to control computer

operation and execute data processing. Four main parts of CPU

1. ALU (arithmetic logic unit)2. CU (Control logic unit)3. ID (Instruction Decoder)4. Registers

Page 22: EC303 - Chapter 1 Computer Architecture Organization

ACCUMULATOR

INSTRUCTION REGISTER

(IR)

PROGRAMCOUNTER

(PC)

STATUS REGISTER

(SR)

INSTRUCTION DECODER

(ID)

CONTROL UNIT

REGISTERS

1

3

2

4

ARITHMATIC & LOGIC UNIT

(ALU)

Page 23: EC303 - Chapter 1 Computer Architecture Organization

1. Arithmetic-Logic unit› Performs arithmetic or logical operations

2. Control unit› Coordinates and controls all parts of the

computer system

Page 24: EC303 - Chapter 1 Computer Architecture Organization

4. Instruction decoder

3. Instruction Decoder› Decode the instruction

4. Registers› A(Accumulator) : Store data from memory

before and after process by CPU› PC(Program Counter) : Controls the

sequence in which the instruction in a program are performed. Normally, it indicates the location in memory from which the next byte of information is to be taken

Page 25: EC303 - Chapter 1 Computer Architecture Organization

4. Registers› SR(Status Register): It also refer to as the

flag register. Four of the flags are called conditional flag, meaning that they indicate some conditions that resulted after an instruction was executed (CY,AC,P and OV)

› IR(Instruction Register) : A temporary storage location . It holds an instruction while the instruction is being decoded.

Page 26: EC303 - Chapter 1 Computer Architecture Organization

› Manages four basic operations (Fetch, Decode, Execute, Store) Fetch : Gets next program instruction from

the computer’s memory Decode : Figure out what the program is

telling the computer to do Execute : Perform the requested action Store : Write (store) the results to a register

or to memory

Page 27: EC303 - Chapter 1 Computer Architecture Organization

Intel

Advanced Micro Devices (AMD)

Cyrix Motorola (Apple)

Pentium IV

Pentium MMX

Core 2 DuoPentium III

Page 28: EC303 - Chapter 1 Computer Architecture Organization
Page 29: EC303 - Chapter 1 Computer Architecture Organization

Also known as main storage, primer memory

As contemporary storage for processing and can directly accessed by CPU in high speed of light.

Use for holding both instruction and data

Also known as main storage, primer memory

As contemporary storage for processing and can directly accessed by CPU in high speed of light.

Use for holding both instruction and data

Page 30: EC303 - Chapter 1 Computer Architecture Organization

Volatile memory (Random Access Memory/RAM; Cache Memory; Virtual Memory)› Contents of memory are erased when

power supply is turned off. › Also called Temporary storage.

Nonvolatile memory (Read Only Memory/ROM; Flash Memory)› Contents of memory are not erased when

power is turned off. › Also called Permanent storage.

Page 31: EC303 - Chapter 1 Computer Architecture Organization

RAM is used in computer for the temporary storagetemporary storage of programs and data. The contents of many RAM address location will be read and written to as the computer executes a program.

This requires fast read and write cycle times for the RAM so as not to slow down the computer operation.

Page 32: EC303 - Chapter 1 Computer Architecture Organization

A major disadvantage of RAM is that it is volatile volatile and will lose all stored information if power is turned off.

Page 33: EC303 - Chapter 1 Computer Architecture Organization

WEB

KEYBOARD

CPU

RAM

MONITOR

CLICK TO BEGIN ANIMATION

HOW RAM WORKS

Page 34: EC303 - Chapter 1 Computer Architecture Organization

Rambus DRAM (RDRAM) Uses fast bus to send and receive data

within one clock cycle. Faster than SDRAM

Double Data Rate SDRAM (DDR SDRAM) A type of SDRAM that can send and

receive data within one clock cycle Dynamic RAM- A memory chip that

needs to be refreshed periodically or it loses its data

Synchronous DRAM (SDRAM)- Synchronized with the computer’s system clock

Page 35: EC303 - Chapter 1 Computer Architecture Organization

The purpose of cache memory is to speed up accesses by storing recently used data closer to the CPU, instead of storing it in main memory.

Although cache is much smaller than main memory, its access time is a fraction of that of main memory.

The purpose of cache memory is to speed up accesses by storing recently used data closer to the CPU, instead of storing it in main memory.

Although cache is much smaller than main memory, its access time is a fraction of that of main memory.

Page 36: EC303 - Chapter 1 Computer Architecture Organization

Primary cache (Level 1 or L1)› Located within the CPU chip, it is the memory

the microprocessor uses to store frequently used instructions and data

Secondary cache (Level 2 or L2; Backside Cache)› Located near the CPU, it is the memory

between the CPU and RAM Faster than RAM

Primary cache (Level 1 or L1)› Located within the CPU chip, it is the memory

the microprocessor uses to store frequently used instructions and data

Secondary cache (Level 2 or L2; Backside Cache)› Located near the CPU, it is the memory

between the CPU and RAM Faster than RAM

Page 37: EC303 - Chapter 1 Computer Architecture Organization

Part of the hard disk is reserved as RAM

When RAM modules become full the CPU accesses the hard disk to store and retrieve data

Slower than RAMFULL

Page 38: EC303 - Chapter 1 Computer Architecture Organization
Page 39: EC303 - Chapter 1 Computer Architecture Organization

Computers accept coded information by means of inputs units, which consist of devices capable of reading such data.› For example: keyboard, mouse

Output units is the counterpart of the input and its functions is to return the results to the output world› For example: monitor, printer

Page 40: EC303 - Chapter 1 Computer Architecture Organization

Pathways that enable the CPU to communicate with input/output devices

Typically the buses contain slots called expansion slots, in which expansion cards are inserted

Expansion slots

Expansion card

Page 41: EC303 - Chapter 1 Computer Architecture Organization

Industry Standard Architecture (ISA)-› Slowest type of bus

Personal Computer Interface (PCI)› Faster than ISA; supports plug and

play Accelerated Graphics Port (AGP)

› Designed for video adapters Universal Serial Bus (USB)

› Allows up to 127 devices to be connected to the computer at one time; supports plug and play

Page 42: EC303 - Chapter 1 Computer Architecture Organization
Page 43: EC303 - Chapter 1 Computer Architecture Organization

An important aspect of the computer architecture is the design of the instruction set of processor

The instruction set chosen for a particular computer determines the way that the machine language program are constructed

Early computers had small and simple instruction sets, forced mainly by the need to minimize the hardware used to implement them constructed.

Page 44: EC303 - Chapter 1 Computer Architecture Organization

A computer with a large number of instructions is classified as a Complex Instruction Set Computer (CISC).

A number of computer designers recommended that computers use fewer instructions with simple constructs so they can be executed much faster and this type of computer is classified as a Reduced Instruction Set Computer (RISC).

Page 45: EC303 - Chapter 1 Computer Architecture Organization

RISC CISC

Relatively few instructions to

perform task.

Large number of instructions to

perform any task.

Relatively few addressing modes. A larger variety of addressing

modes – typically from 5 to 20

different modes.

Memory access limited to LOAD

and STORE instructions only.

Some instructions that perform

specialized tasks are used

infrequently.

All operations are done within the

registers of the CPU.

Instructions that manipulate

operands in memory.

Fixed-length, easily decoded

instruction format.

Variable-length instruction format.

Hardwired control. Microprogrammed control

Page 46: EC303 - Chapter 1 Computer Architecture Organization

An assembly language is low-level programming language for computers, microprocessors, microcontroller and other programmable devices.

It implements a symbolic representation of the machine codes and other constant needed to a program a given CPU architecture

Page 47: EC303 - Chapter 1 Computer Architecture Organization

The format of assembly language consists of four field (column) as below:

Page 48: EC303 - Chapter 1 Computer Architecture Organization

LABEL› Label is used to represent the

location of an instruction or a value. › It has to begin no spacing. It can

form by using not more than 8 characters including numbers. But the first character must be an alphabet.

› Between the label instruction, there must be at least one. It always used for jump and loop instruction

Page 49: EC303 - Chapter 1 Computer Architecture Organization

OPCODE / MNEMONIC code› Stand for the word operational code

and known as MNEMONIC code. › Mnemonic code are commands that

tell the controller what to do. › Example of instructions are MOV,

CPL, RET and etc.

MOV A, #00000000B Told the 8051 to load data

00000000B in to Accumulator register

Page 50: EC303 - Chapter 1 Computer Architecture Organization

OPERAND› Data, address or register that the

opcode will operate on› This field is devided in two group

which is the source and the destination.

› For example,in the MCS51 format, the source is the operand in the right place and the destination is the operand in the left.

MOV A, #00000000B

Page 51: EC303 - Chapter 1 Computer Architecture Organization

Address part A memory address is an

identifier for a memory location. An absolute address,

(sometimes called an explicit address or

specific address), is a memory address

that uniquely identifies a location in memory Example: In 8051 microcontroller :

The Accumulator address is E0H

(or 1110 0000B in binary)

Page 52: EC303 - Chapter 1 Computer Architecture Organization
Page 53: EC303 - Chapter 1 Computer Architecture Organization
Page 54: EC303 - Chapter 1 Computer Architecture Organization

Contents of Accumulator› Accumulator is the most useful

register in the microprocessor. During arithmetic and logic operation it performs a dual function.

› Before the operation, it holds one of the operands. After the operations, it holds the result (sum, difference or logical answer)

Page 55: EC303 - Chapter 1 Computer Architecture Organization

Contents of Accumulator› Example : MOV A,#25H ADD A,#13H

Load Accumulator with data #25HAdd the data in the Accumulator

(#25H) with #13HSave the answer in the Accumulator

Page 56: EC303 - Chapter 1 Computer Architecture Organization
Page 57: EC303 - Chapter 1 Computer Architecture Organization

A compiler is a special program that processes statements written in a particular programming language and turns them into machine language or "code" that a computer's processor uses.

Typically, a programmer writes language statements in a language such as Pascal or C one line at a time using an editor . The file that is created contains what are called the source statements .

The programmer then runs the appropriate language compiler, specifying the name of the file that contains the source statements.

Page 58: EC303 - Chapter 1 Computer Architecture Organization

A high-level programming language is a programming language with strong abstraction from the details of the computer. In comparison to low-level programming languages, it may use natural language elements, be easier to use, or be more portable across platforms.

Such languages hide the details of CPU operations such as memory access models and management of scope

Page 59: EC303 - Chapter 1 Computer Architecture Organization

Object-oriented programming (OOP) is a programming language model organized around "objects" rather than "actions" and data rather than logic.

Historically, a program has been viewed as a logical procedure that takes input data, processes it, and produces output data.

Java, Python, C++, Visual Basic .NET and Ruby are the most popular OOP languages today

Page 60: EC303 - Chapter 1 Computer Architecture Organization

Contrast the meaning of computer architecture and organization

The reason for studying computer architecture and computer organization

Describe the typical CPU, Memory, Inpu/Output

Mention CISC and SISC Differentiate operand, opcode Define compiler,high level and OOP

language

Page 61: EC303 - Chapter 1 Computer Architecture Organization