computer organizationcomputer organization...

52
Computer Organization Computer Organization Introduction Assoc. Prof. Dr. Wattanapong Kurdthongmee Division of Computer Engineering, School of Engineering 1 and Resources, Walailak University

Upload: others

Post on 29-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Computer OrganizationComputer OrganizationIntroduction

Assoc. Prof. Dr. Wattanapong KurdthongmeeDivision of Computer Engineering, School of Engineering

1and Resources, Walailak University

Page 2: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

IntroductionChallenges of modern day computers:Challenges of modern day computers:

Tremendous varieties: single chip microcomputer → supercomputer → internet-of-thing (IoT).Variety in: cost, size, performance, application.Rapid pace of changes: integrated circuit technology → parallel organization concepts.p g p

Fundamental concepts apply consistently. Application depends on:

Current state of technology,Price/performance objectives of the designer.

This course:This course:Provide discussion of the fundamentals of computer organization and architecture,R l t th t t t d i i

22

Relate these to contemporary computer design issue.

Page 3: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

IntroductionComputer architecture:Computer architecture: Specification of the relationship between

different hardware components, System attributes: visible to system programmers, with direct impact on logical executionwith direct impact on logical execution

of program. instruction set, bits in data types,

addressing modes

Harvard Architecture

addressing modes. Computer architecture, like other

architecture, is: t f d t i i th d f art of determining the needs of users, design to meet those needs as

effectively as possible within economic d h l i l i

3and technological constraints.Von-Neumann Architecture

Page 4: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

IntroductionComputer organization:Computer organization: The operational units and their

interconnections that realize h hi l ifi ithe architectural specifications.

Attributes: hardware details, control signals, interfacing standards, memory technology.

Computer organization helps optimize performance-p p

based products. helps plan the selection of

a processor for a particulara processor for a particular project.

44

Page 5: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

IntroductionExample of Architecture andExample of Architecture and Organization Issues: Architectural design issue: Will our future computer have a

multiply instruction? Organizational issue:Organizational issue: If yes, will it be implemented as a

hardware unit or a software module. Decision may be based on

From: http://en.wikipedia.org/wiki/Binary_multiplier

Decision may be based on the anticipated frequency of use of the

multiply instruction, the relative speed of the two

approaches, and the cost and physical size of a special

555

p y pmultiply unit.

Page 6: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

IntroductionDistinction between architecture andDistinction between architecture and organization: One architecture many organization, different price/performance characteristics, may survive many years may survive many years.

Organization changes with changing technology. For example, IBM System/370 architecture has

h d i ihad many organizations. System/370 has survived as the architecture of

IBM’s mainframe. For microcomputer, very close relationship!:

Technology Organization Architecture.

6

Page 7: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Structure and FunctionFor a complex system like computers:For a complex system like computers: How can clearly describe them? Hierarchically. Described by top-down approach. A hierarchic system is a set of interrelated subsystems which are, in

turn, hierarchic in structure until the lowest level is reached. Very appropriate The designer need only deal with a particular levelVery appropriate. The designer need only deal with a particular level

of the system at a time. At each level, the system consists of a set of components and their

interrelationships with a simplified characteristicinterrelationships with a simplified characteristic.What the designed concern at each level are: Structure: the way in which the components are interrelated, Function: the operation of each individual component.

7

Page 8: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Structure and Function

Data StorageFacility

Data movement apparatus

ControlMechanism

Operating Environment

A functional view of the computer and the b f ibl ti th t b

Data Processing

Facilitynumber of possible operations that can be performed.Possible operations:Possible operations:

Movement → ControlMovement → Control → Storage

8Movement → Processing → StorageStorage → Control → Processing → Storage

Page 9: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Structure and FunctionOne of the structures of a computer can be drawn from theOne of the structures of a computer can be drawn from the way it interfaces to external environment:

peripherals Communication lines

ComputerS•Storage

•Processing

9

Page 10: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Structure and FunctionLet’s consider the structures of a computer in differentLet s consider the structures of a computer in different hierarchical levels: As a whole:

Computer

Input/Output Main memory

SystemInterconnectnInterconnect

CPU

10

Page 11: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Structure and FunctionLet’s consider the structures of a computer in differentLet s consider the structures of a computer in different hierarchical levels: CPU:

Input/Output Main memory

SystemInterconnectn

Registers ALU

Internal CPUInterconnectnInterconnect Interconnect

CPU CU

11

Page 12: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Structure and FunctionLet’s consider the structures of a computer in differentLet s consider the structures of a computer in different hierarchical levels: Input/output:

SequencingInput/Output Main memory

SystemInterconnectn

SequencingLogic

Control UnitRegisters andInterconnect

Control

Decoders

CPU Control Memory

12

Page 13: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

IntroductionWh t d COAWhy study COA:

IEEE/ACM Curricula 2001 Report: “… To be a professional in any field of computing today, one should not regard the computer as just a black box that executes program by magic…”“… 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.”

COA helps you:You are asked to select the most cost effective computer for use throughout a l i ilarge organization,Many processors are not used in PCs but in embedded systems. Develop these systems, C language is required.

1313Concepts used in COA find application in other courses.

Page 14: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

IntroductionC t R l tiComputer Revolution:

Automatic teller machines: A computer placed in the wall of banks to distribute and collect cash would have been a ridiculous concept in the 1950s ($500,000/unit, size of a car).Computers on automobiles: Improvement of microprocessors (price and performance) in 1980s. Computers in cars reduce pollution, improve fuel efficiency and increase safety.Laptop computers: Advancement in computer systems makes small size computers.Human genome project: Very expensive g p j y pcomputer system. This could not have been succeeded in 10 or 20 years ago.WWW: A wide variety of information can be

14

WWW: w de v e y o o o c beshared around the world 24/7.

Page 15: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

IntroductionC t R l tiComputer Revolution:

Smartphone/Mobile Phone/Tablet PCInternet of Thingg

15

http://www.symplio.com/2011/09/4-infographics-about-internet-of-things/

Page 16: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

IntroductionC t R l tiComputer Revolution:

SoC: System-on-Chip

16

Page 17: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

IntroductionC t R l tiComputer Revolution:

SoC: System-on-Chip

17

Page 18: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

History of Computers-1st GenElectronic Numerical Integrator and ComputerElectronic Numerical Integrator and Computer (ENIAC): Mainly constructed by vacuum tubes Designed and constructed under supervision of John

Mauchly and John Eckert

18

Page 19: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

ENIAC ( t)

History of Computers-1st GenENIAC (cont): Was the world’s 1st general-purpose

electronic digital computer,g p , Was intended to use for preparing

range and trajectory for weapons.W l diffi l f i Was extremely difficult for entering and altering programs.

Weighted 30 T, occupied 1500 m2g , pspace, contained > 18,000 vacuum tubes, consumed 140 kW of power, performed 5 000 additions/sperformed 5,000 additions/s,

Computed decimal numeric format, Project was completed at 1946 (after

19the end of WW-II).

Page 20: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

ENIAC ( t)

History of Computers-1st GenENIAC (cont): Was used to determine the feasibility of the hydrogen bomb. → This

is the reason why it is the first general purpose computer.y g p p p Disassembled in 1955.

ENIAC vacuum tubes in holders

Detail of the back of a section of ENIAC.

Four ENIAC panels and one of its three function

2020tables

Page 21: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

The von Neumann Machine (1946):

History of Computers-1st GenThe von Neumann Machine (1946): Was in the class of stored program machine, Was named IAS computer, Its general structure consisted of:

Main memory (data and instruction storages) Arithmetic and Logic Unit (ALU)Arithmetic and Logic Unit (ALU) Control Unit Input/Output unit

ALU

MainMemory

CU

I/O Unit

21

CU

CPU

Page 22: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

With rare exceptions all

History of Computers-1st Gen With rare exceptions, all

of today’s computers have this same general structure and function – vonand function von Neumann machines.

22

Page 23: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

C i l C t

History of Computers-1st GenCommercial Computers: 1947, Eckert-Mauchly Computer

Corp. manufactured UNIVAC-I.p 1950s, two companies dominated the

market: Sperry and IBM.S f UNIVAC b il b Successors of UNIVAC were built by Sperry-Rand Corp.

1953, IBM (punched-card processing UNIVAC-I

, (p p gmfg) delivered its 1st electronic stored-program computer, the IBM 701701.

It was primarily targeted at scientific applications.

23 1955, IBM 702, suitable for business

applications, was launched.IBM 701

Page 24: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

The transistor’s era:

History of Computers-2nd GenThe transistor s era: Smaller, cheaper, less power

consumption electronic component. A solid-state device made from silicon. Transistor-based computers were faster

th b d t tJohn Bardeen, William than vacuum-based counterpart. 1957, Digital Equipment Corp. (DEC)

was founded and the PDP-1 was

,Shockley and Walter Brattain

at Bell Labs, 1948

launched as the 1st product. 1964, the more powerful computer from

IBM IBM 7094 was commercializedIBM, IBM 7094, was commercialized. The IBM 7094’s CPU was higher

superior in term of performance.The world’s 1st transistor in 1947 and current

24

The world s 1st transistor in 1947 and current transistor packages.

Page 25: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

The integrated circuit (IC)’s era:

History of Computers-3nd GenThe integrated circuit (IC) s era: Previously, computers’ circuit were

built from discrete components: i i itransistors, resisters, capacitors, on a

PCB. Difficult to make new and powerful

machine. 1964, IBM announced the System/360

with completely difference features The world’s 1st IC developed by from 7000 version.

System/360 covered a wide range of performance and cost. Programs

Kilby 1958 and Intel Pentium Processor

p gwritten for one model could be executed by another model with a difference in the execution time.

25

Page 26: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

The integrated circuit (IC)’s era:

History of Computers-3nd GenThe integrated circuit (IC) s era:

2626

Page 27: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

History of Computers-3nd GenThe integrated circuit (IC)’s era:The integrated circuit (IC)’s era: More than 100M transistors can be packed on a chip. Many chips can be fabricated onto a single silicon wafer.y p g

27

Page 28: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

History of ComputersLater Generations:Later Generations: Beyond the 3rd generation, there have been a number of later

generations. This is based on advances in IC technology. There are different scale of integration:

Large scale integration (LSI) – consists of more than 1,000 components a ge sca e teg at o ( S ) co s sts o o e t a ,000 co po e tson chip,

Very large scale integration (VLSI) – consists of more than 1,000 components on chip

Ultra large scale integration (ULSI) – consists of more than 1M components on chip

Let’s see the progressive of computer’s heart in a current generation.p g p g

28

Page 29: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

History of Computers

29

Page 30: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

History of Computers1971: 4004 MicroprocessorThe 4004 was Intel's first microprocessor. This breakthrough invention powered theThis breakthrough invention powered the Busicom calculator and paved the way for embedding intelligence in inanimate objects as well as the personal computeras well as the personal computer.

1985: Intel386™ MicroprocessorThe Intel386™ microprocessor featured 275,000 transistors--more than 100times as275,000 transistors more than 100times as many as the original 4004. It was a 32-bit chip and was "multi tasking," meaning it could run multiple programs at the same time

30

multiple programs at the same time.

Page 31: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

How microchips are fabricatedTo get an idea about how difficult it is to fabricate a microchipTo get an idea about how difficult it is to fabricate a microchip. Let’s see the following processes:

On the wafer the first thin The wafer is then coatedsilicon wafer

On the wafer, the first thin layer of silicon dioxide is grown by exposing it to extreme heat and gas.

The wafer is then coated with a substance called photoresist. Photoresist becomes soluble when gexposed to ultraviolet light.

In a process called photolithography, ultraviolet light is then passed through

tt d k t il t th

The gooey photoresist is completely dissolved. This reveals a pattern of photoresist made by th k th ili di id Th l d

31

a patterned mask, or stencil, onto the silicon wafer.

the mask on the silicon dioxide. The revealed silicon dioxide is etched away with chemicals.

Page 32: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

How microchips are fabricatedTh t f th h t i t iThe rest of the photoresist is removed. This process leaves ridges of silicon dioxide on the silicon wafer base.

The photoresist is dissolved with solvent to expose the polysilicon and silicon dioxide, which are then

To begin another layer, a second, thinner layer of silicon dioxide is grown over

dioxide, which are then etched away with chemicals.The remaining photoresist i i isilicon dioxide is grown over

the ridges and etched areas of the wafer base.

Then a layer of polysilicon

is removed, leaving ridges of polysilicon and silicon dioxide.

Then, a layer of polysilicon and another layer of photoresist are applied.

Through a process called ion implantation (doping), the exposed areas of the silicon wafer are

Ultraviolet light is then passed through a second mask,

silicon wafer are bombarded with various chemical impurities called ions which alter the way

32

exposing a new pattern on the photoresist.

silicon in these areas conducts electricity..

Page 33: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

How microchips are fabricatedTh l i d kiThe layering and masking processes are repeated, creating windows that allow for connections to be made between the layers.

Atoms of metal are deposited on the wafer filling the

On the wafer, the microscopic circuitry of each and every microprocessor is t t d Th th f i t ithon the wafer, filling the

windows. Another masking and etching stage leaves strips of the metal that make the

tested. Then the wafer is cut with a diamond saw, separating the microprocessors.

electrical connections.

Roughly 20 layers are connected to form the microprocessor's circuitry in a 3-dimensional structure. The exact number of layers

f d d thEach microprocessor is then inserted into

t ti k hi h ll it t33

on a wafer depends on the design of the microprocessor.

a protective package which allows it to connect to other devices

Page 34: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

How microchips are fabricated

34

Page 35: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

EconomicsEconomics

M ’ l i h j d i f hMoore’s law is the major driver of the Information Technology revolution:

“The cost of computing power will be cut in half every 18 months.”

This forecast has held for 35 years, with the industry constantly discovering new ways to miniaturize transistors.constantly discovering new ways to miniaturize transistors.Currently, semiconductor industry is facing challenges on a scale not seen before. Science will overcome these barriers, b i lbut at a cost. Uneconomical!May be Moore’s law will slow down. May be Moore’s law will end May be Moore’s law will continue but we will not

35

will end. May be Moore s law will continue but we will not need the increased computing power.

Page 36: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

History of Moore’s LawIn 1965 Gordon Moore an engineer at FairchildIn 1965, Gordon Moore an engineer at Fairchild Semiconductor predicted that “the number of transistors that can be packed onto a sliver of transistor would double every 12 months.”In the 70s, the law was amended to 24 months.A ll M ’ l i h “ h d fA corollary to Moore’s law is that “the speed of microprocessors, at a constant cost, also doubles every 18 to 24 months.”In other words “By making things smaller, everything gets better simultaneously. The speed of our products goes up, the

d d ”power consumption and cost go down.”The semiconductor industry had only one direction to go: smaller

36

smaller.

Page 37: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Design for PerformanceThe cost of computer systems continues to drop → TheThe cost of computer systems continues to drop → The performance and capacity continue to rise. It is said that “we have virtually free computer power”.y p pThis results in developing applications of astounding complexity and power:

image processing, speech recognition, video conferencing, multimedia authoring, voice and video annotation of files, simulation modeling.

What is fascinating about all this from COA perspective:The basic building blocks for today’s computer miracles are virtually the same as those of the IAS computer (50 years ago)the same as those of the IAS computer (50 years ago),The techniques for squeezing the last iota of performance out of the materials have become increasingly sophisticated.

3737

Page 38: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Design for PerformanceCPU:CPU:

Developed and released under Moore’s law. Raw speed is doubled along with their internal memory.The raw speed of CPUs will not achieve its potential unless it is fed a constant stream of work to do in the form of computer instructions.Chipmakers: fabricate chips of greater and greater density.p p g g yProcessor designers: make ways to come up with ever more techniques for feeding the monster; i.e.: Branch prediction, data flow analysis, speculative execution.y , p

Performance balance: Processor power has raced ahead, other critical components have not k tkept up.Performance balance needs to be performed especially between CPU and main memory.

383838

Page 39: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Design for PerformancePerformance balance:Performance balance:

Let’s see the evolution of DRAM and CPU characteristics: CPU speed and memory capacity have grown rapidly, the data transfer

d h l d b dlspeed has lagged badly.

39393939

Page 40: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Design for PerformancePerformance balance:Performance balance:

Ways to attack the balance between memory and CPU:Make DRAMs wider rather than deeper,Change the DRAM interface to make it more efficient by including cache or buffer,Reduce the frequency of memory access by use of cache,Increase the bandwidth between CPU and memory by use of high speed buses.

Another area of design focus is the handling of I/O devices. New I/O d i d d d d h h ( hi 30 MB/ LANdevices demand tremendous data throughput (graphics = 30 MB/s, LAN = 12 MB/s, full motion video = 67 MB/s). Strategies include:

Caching and buffering schemes, U f hi h d i i bUse of high speed interconnection buses,Use of multiple processors.

40404040

Page 41: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Computer ComponentsAll contemporary computer designs are based on vonAll contemporary computer designs are based on von Neumann concepts: Data and instructions are stored in a single read/write memory, Memory contents are addressable by location, Execution occurs in a sequential fashion (unless explicitly modified). These can be realized in two different approaches: These can be realized in two different approaches:

Program is in the form of hardware: Hardwired program, Program is in the form of software which can be executed by general

purpose hardware componentspurpose hardware components.

With the program is a software approach: The entire program is actually a sequence of steps,The entire program is actually a sequence of steps, At each step, some computation is performed on some data, For each step, a new set of control signals is needed,

hi h i h i i l41

This approach is much easier to implement.

Page 42: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Computer Components

I t ti

Instruction Codes

Sequence ofD t Result

InstructionInterpreter

Sequence of Arithmetic and Logic Function

Data Result Control Signals

Customized Hardware General-PurposeArithmetic and L i F ti

Data Result

Logic Functions

P i i h d P i i S ft42

Programming in hardware Programming in Software

Page 43: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Computer ComponentsThe top-level components + interaction:p p

CPU

PC MAR :Memory

C

IR MBR

:

Instruction

I/O AR:

Data

I/O BR :I/O Module PC Program Counter

Buffers

IR Instruction RegisterMAR Memory Address RegisterMBR Memory Buffer Register

43

uffe sI/O AR I/O Address RegisterI/O BR I/O Buffer Register

Page 44: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Computer FunctionTh b i f ti f t i ti fThe basic function of a computer is execution of a programwhich consists of a set of instructions stored in memory.Program execution = fetch + executionProgram execution = fetch + executionInstruction cycle = the processing required for a single instructioninstruction.

Fetch Cycle Execute Cycle

Start Fetch NextInstruction

ExecuteInstruction Halt

PC = PC + (Instruction Length) InstructionAction

44points to the next instruction to be fetched

IR-Register

Page 45: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

I l th ti f ll i t 4 t i

Computer FunctionIn general the actions fall into 4 categories: Processor-memory: Processor Memory Processor-I/O: Processor Peripheral DevicesProcessor I/O: Processor Peripheral Devices Data processing: performs arithmetic operations on data Control: altering the sequence of execution

An instruction’s execution may involve a combination of the above actions.Consider a Hypothetical Machine:

Opcode Address0 3 4 15

0001 = Load AC from Memoryp

Instruction Format

S Magnitude0 1 15

0010 = Store AC to Memory

0101 = Add to AC from Memory

45

S Magnitude

Integer Format

Page 46: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Computer FunctionC id ti l tiConsider a partial program execution

1 9 4 05 9 4 1

300301

3 0 0ACPC 1 9 4 0

5 9 4 1300301 0 0 0 3

3 0 1ACPC

5 9 4 12 9 4 1

0 0 0 3

301302

940

1 9 4 0 IRAC 5 9 4 1

2 9 4 1

0 0 0 3

301302

940

1 9 4 00 0 0 3

IRAC

0 0 0 30 0 0 2

940941 Step 1

0 0 0 30 0 0 2

940941 Step 2

1 9 4 05 9 4 12 9 4 1

300301302 5 9 4 1

0 0 0 33 0 1

IRACPC 1 9 4 0

5 9 4 12 9 4 1

300301302 5 9 4 1

0 0 0 53 0 2

IRACPC

2 9 4 1

0 0 0 3

302

940

5 9 4 1 IR 2 9 4 1

0 0 0 3

302

940

5 9 4 1 IR

3 + 2 = 5

460 0 0 2941 Step 3 0 0 0 2941 Step 4

Page 47: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Computer Function1 9 4 05 9 4 12 9 4 1

300301302 2 9 4 1

0 0 0 53 0 2

IRACPC 1 9 4 0

5 9 4 12 9 4 1

300301302 2 9 4 1

0 0 0 53 0 2

IRACPC

0 0 0 30 0 0 2

940941 Step 5

0 0 0 30 0 0 2

940941 Step 60 0 0 2941 Step 5 0 0 0 2941 Step 6

The example requires 3 instruction cycles.d i l d i i h iModern processors include instructions that contain more

than one address execution cycle involves more than one reference to memoryreference to memory.In general, the basic instruction cycle can be depicted in the following figure.

47

following figure.

Page 48: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Computer Function

InstructionFetch

OperandFetch

OperandStoreSto e

MultipleO d

Multiple

Instruction Instruction Operand D t Operand

Operands Results

AddressCalculation

OperationDecoding

pAddress

Calculation

DataOperation

pAddress

Calculation

Return for String or Vector Data

Instruction Complete,Fetch Next Instruction

48Instruction Cycle State Diagram

Page 49: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

Interconnection StructuresI t ti t tInterconnection structures:

In general, a computer consists of processor,

ReadWrite

Address Data p ,memory and I/O with the appropriate path connections a network of basic

MemoryAddress

Data a network of basic modules,The collection of paths

ti th iRead

Internalconnecting the various modules: interconnection structure.

WriteAddress

data

Externaldata

The design of interconnection structure depends on the exchanges that must be made

I/O ModuleInternaldata

External

InterruptSignal

49

exchanges that must be made between modules.

data

Page 50: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

I t ti t t

Interconnection StructuresInterconnection structures: The interconnection structure

must support these transfers:pp Processor-memory: Processor Memory

Processor-I/O: Processor CPU

Instruction

Data

Address

Control Signal Processor-I/O: Processor Peripheral Devices

Memory-I/O: Memory Peripheral Devices

CPUDataInterrupt Signal

Peripheral Devices Bus and multiple-bus are the

most common interconnection structure.

50

Page 51: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

B I t ti t t

Bus InterconnectionBus Interconnection structure: A bus is a communication pathway connecting two or more devices. It is a shared transmission medium between multiple devicesIt is a shared transmission medium between multiple devices. Only one device at a time can successfully transmit. A bus consists of multiple communication lines. Each line is capable of transmitting signals representing 0 or 1.

CPU Memory Memory I/O I/O

Control linesAddress lines

D li51

Data lines

Page 52: Computer OrganizationComputer Organization …mit.wu.ac.th/mit/images/editor/files/MIT-101/ITM-691/Co...COA helps you: You are asked to select the most cost effective computer for

B I t ti t t

Bus InterconnectionBus Interconnection structure: Data bus:

Consists of data lines which could be upto 32 lines,Consists of data lines which could be upto 32 lines, Provides a path for moving data between modules. Whose width is a key factor in determining overall system performance

(8 bit data bus width needs 2 times to access 16 bit instruction)(8-bit data bus width needs 2 times to access 16-bit instruction). Address bus:

Is used to designate the source and target of the data on the data bus, Whose width determines the maximum possible memory capacity of the

system, Is also used to address I/O ports.p

Control bus: Is used to control the access to and the use of the data and address buses.

52