+ All Categories
Home > Documents > CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

Date post: 04-Jan-2016
Category:
Upload: cairbre-troy
View: 121 times
Download: 6 times
Share this document with a friend
Description:
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION. CSNB123 coMPUTER oRGANIZATION. Expected Course Outcome. What is a program?. A sequence of steps. arithmetic or logical operation is done. a different set of control signals is needed. Function of Control Unit. - PowerPoint PPT Presentation
Popular Tags:
53
COMPUTER ORGANIZATIONS CSNB123 CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION CSNB123 COMPUTER ORGANIZATION
Transcript
Page 1: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

CHAPTER 3TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

CSNB123 COMPUTER ORGANIZATION

Page 2: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 2

Expected Course Outcome# Course Outcome Coverage

1 Explain the concepts that underlie modern computer architecture, its evolution, functions and organization.

2 Identify the best organization of a computer for achieving the best performance when asked to make a selection from the current market.

3 Demonstrate the flow of an instruction cycle. 4 Differentiate types of memory components in terms of its technology

and usage.5 Convert integer and floating point numbers to its internal data

representation.6 Construct a series of computer instructions to perform low-level

processor operations.

7 Explain the RISC and CISC computers, and single core and multi-core computers

May2014

Page 3: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 3

What is a program?

May 2014

A sequence of stepsarithmetic or logical

operation is done

a different set of control signals is needed

Page 4: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 4

Function of Control Unit• A unique code for each operation

Example: ADD, MOVE

May 2014

Hardware Segment

Issues control signalsAccept codes

Page 5: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 5

Computer Components

May 2014

PC = Program CounterIR = Instruction RegisterMAR = Memory Address RegisterMBR = Memory Buffer RegisterI/O AR = Input/Output Address RegisterI/O BR = Input/Output Buffer Register

Computer

Central Processing Unit (CPU)

I/O Module

Buffers

Main Memory

Instruction

...

...

Instruction

Data

Data

...

012...

PC MAR

MBR

I/O AR

I/O BR

IR

Execution Unit

..

SystemBus

Page 6: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 6

Instruction Cycle• Two steps

Fetch cycle Execute cycle

May 2014

Start Fetch Next Instruction

Execute Instruction Halt

Fetch cycle Execution cycle

Page 7: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 7

Fetch Cycle

Program Counter (PC)

•Holds address of next instruction to fetch

Processor

•Fetch instruction from memory location pointed to by PC•Increment PC

Instruction

Register (IR)

•Load the instruction

Processor

•Interprets instruction•Perform required actions

May 2014

Page 8: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 8

Execute Cycle

May 2014

Processor -Memory

Execution Cycle

Processor I/O

Data Processing

Control

Page 9: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 9

Program Execution - Example

May 2014

Page 10: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 10

Instruction Cycle State Diagram

May 2014

Instruction Fetch

Instruction Address

Calculation

Instruction Operation Decoding

Operand Address

Calculation

Data Operation

Operand Address

Calculation

Operand Fetch

Operand Store

Multiple Operands

Multiple Results

Return for string or vector data

Instruction complete, Fetch next instruction

Page 11: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 11

Interrupts• Mechanism by which other modules (e.g. I/O)

may interrupt normal sequence of processing

May 2014

Page 12: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 12

Classes of Interrupts• Program

Stack overflow, division by zero• Timer

Generated by internal processor timer Used in pre-emptive multi-tasking

• I/O I/O controller – signal the error condition

• Hardware failure Power failure

May 2014

Page 13: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 13

Interrupt – Program Flow Control

May 2014

Page 14: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 14

Interrupt Cycle• Added to instruction cycle

May 2014

Start Fetch Next Instruction

Execute Instruction

Halt

Fetch cycle Execution cycle

Check for interrupt; process

interrupt

Interrupt cycle

Interrupts disabled

Interrupts enabled

Page 15: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 15

Interrupt Cycle (Cont.)• Processor checks for interrupt

Indicated by an interrupt signal• If no interrupt, fetch next instruction• If interrupt pending:

Suspend execution of current program Save context Set PC to start address of interrupt handler routine Process interrupt Restore context and continue interrupted program

May 2014

Page 16: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 16

Transfer of Control via Interrupts

May 2014

Page 17: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 17

Program Timing: Short I/O Wait

May 2014

Page 18: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 18

Program Timing: Long I/O Wait

May 2014

Page 19: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 19

Multiple Interrupts - Approaches• Disable interrupts

Processor - ignore that interrupt request signal• Situation: executing the program and interrupt occurs –

interrupts are disable immediately Pending - checked after the processor has enabled

interrupts• After interrupt handler routine completes

Enable interrupts before resume Check additional interrupt Handle interrupt in strict sequential order

May 2014

Page 20: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 20

Multiple Interrupts – Sequential Interrupt Processing

May 2014

Page 21: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 21

Multiple Interrupts – Nested Interrupt Processing

May 2014

Page 22: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 22

Multiple Interrupts – Approaches (Cont.)

• Define priorities Low priority interrupts can be interrupted by

higher priority interrupts When higher priority interrupt has been

processed, processor returns to previous interrupt

May 2014

Page 23: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 23

Time Sequence of Multiple Interrupts - Example

May 2014

Page 24: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 24

Time Sequence of Multiple Interrupts – Example (Cont)

May 2014

Step t Description

1 0 • Program begins

2 10 • Printer interrupt occurs• Place user information on the system stack• Execution continues at the printer interrupt service routine (ISR)

3 15 • Routine in (2) still executing• Communication interrupt occurs higher priority than printer

4 20 • Routine in (3) still executing• Disk interrupt occurs low priority than communication ISR but

priority is higher than printer5 25 • Communication ISR is completed

• Continue to execute disk ISR6 35 • Disk ISR is completed

• Continue to execute printer ISR7 40 • Routine completes

• Return to the user program

Page 25: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 25

Interconnection Structures• Collection of paths connecting the various

modules• Modules:

Memory Processor I/O module

May 2014

Page 26: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 26

Modules: Major Form of Input and Output - Memory

• Word of data - Read from or written into the memory Assigned a unique

numerical address

• Nature of the operation – indicated by read and write control signals

• Address – specify the location for the operation

May 2014

Page 27: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 27

Modules: Major Form of Input and Output - Processor

• Reads instruction and data

• Writes out data (after processing)

• Sends control signals to other units

• Receives (& acts on) interrupts

May 2014

Page 28: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 28

Modules: Major Form of Input and Output – I/O Module

• Operations; Read Write

• Control more than one external device

• External data path – input and output of data

• Send interrupt signals to CPU

May 2014

Page 29: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 29

Modules: Major Form of Input and Output

May 2014

Page 30: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 30

Types of Transfers• Memory to processor: Processor reads

instruction/data from memory• Processor to memory: Processor writes data to

memory• I/O to processor: Processor reads data from I/O

device (via I/O module)• Processor to I/O: Processor sends data to I/O device• I/O to/from memory: allowed to exchange data

using Direct Memory Access (DMA) – exclude processor

May 2014

Page 31: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 31

Bus Interconnection• Communication pathway connecting two or

more devices• Key characteristic: shared transmission

medium• Consists of multiple communication

pathways/lines Lines – transmit signals representing binary 1 and

0 – one data at a time

May 2014

Page 32: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 32

System Bus• A bus that connects major computer

components (CPU, memory, I/O)• Computer interconnection structures – use

one or more system buses• Consists of 50 to hundreds of separate lines

Each line – function. E.g: power

May 2014

Page 33: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 33

Data Line• Provide a path for moving data among system

modules• Collective – data bus

May 2014

Page 34: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 34

Data Bus• Collective of data lines• Width of the data bus - Number of lines;

32, 64, 128 … Key factor in determining overall system

performance• Number of data lines – represents number of

data can be transferred at a time

May 2014

Page 35: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 35

Address Lines• Designate the source or destination of the

data on data bus

May 2014

Page 36: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 36

Address Bus• Collective of address lines• Width of the address bus determines the

maximum possible memory capacity of the system

May 2014

Page 37: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 37

Control Lines• Used to control the access to and the use of

the data and address lines• Control signals transmit both command and

timing information among system modules Command signals – specify operations to be

performed Timing signals – validity of data and address

information

May 2014

Page 38: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 38

Bus Interconnection Scheme

May 2014

Page 39: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 39

Operation of the Bus

May 2014

• Send data Obtain the use of the bus Transfer data via the bus

• Request data Obtain the use of the bus Transfer a request to the other module over

appropriate control and address lines

Page 40: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 40

System Bus - Physical

• Number of parallel electrical conductors – metal lines on the circuit board

May 2014

Page 41: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 41

Physical Realization of Bus Architecture

May 2014

Page 42: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 42

Single Bus - Problem• Many of devices on one bus leads to:

Propagation delays• Long data paths mean that co-ordination of bus use can

adversely affect performance• If aggregate data transfer approaches bus capacity

• Most systems use multiple buses to overcome these problems

May 2014

Page 43: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 43

Traditional (ISA) - with cache

May 2014

Page 44: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 44

High Performance Bus

May 2014

Page 45: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 45

Types of Bus• Dedicated

Separate data & address lines• Multiplexed

Shared lines Address valid or data valid control line Advantage

• Fewer lines Disadvantages

• More complex control• Reduction in performance

May 2014

Page 46: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 46

Bus Arbitration• Process of insuring only 1 devices places

information onto the bus at a time• Master - slave mechanism

• Master is given control of the bus and can place information onto it• Slave receives the information from the master

Two methods• Centralized• Decentralized

May 2014

Page 47: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 47

Master–Slave Mechanism: Methods• Centralized

Central bus controller mediates all device requests for the bus

May be part of CPU or a hardware of its own (arbiter)

• Decentralized No centralized controller All devices contain logic to control access to the

bus

May 2014

Page 48: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 48

Bus Timing• Synchronous

Occurrence of events on the bus is determined by the clock All events start at the beginning of a clock cycle Example: PCI bus (Peripheral Component Interface bus

• Asynchronous The occurrence of one event follows and depends on the

occurrence of a previous event More flexible than synchronous bus but more complicated

as well Accommodates wider range of device speeds Example: Futurebus+

May 2014

Page 49: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 49

Synchronous Timing Diagram

May 2014

Page 50: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 50

Asynchronous Timing – Read Diagram

May 2014

Page 51: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 51

Asynchronous Timing – Write Diagram

May 2014

Page 52: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 52

Additional Reference• William Stallings, Computer Organization and

Architecture: Designing for Performance, 8th. Edition, Prentice-Hall Inc., 2010

May2014

Page 53: CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION

COMPUTER ORGANIZATIONSCSNB123

Systems and Networking 53May2014

This teaching material is belongs to

Systems and Networking DepartmentCollege of Information Technology

Universiti Tenaga Nasional (UNITEN)Malaysia

2014


Recommended