Professional Documents
Culture Documents
Lec 2
Lec 2
Organization
Architecture
Lecture 2
Puspanjali Mohapatra
Chapter 3
A Top-Level View of Computer
Function and Interconnection
@PM
Computer Components
• Contemporary computer designs are based on
concepts developed by John von Neumann at the
Institute for Advanced Studies, Princeton
• Referred to as the von Neumann architecture and is
based on three key concepts:
• 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
• Hardwired program
• The result of the process of connecting the various
components in the desired configuration
@PM
Sequence of
Data arithmetic Results
and logic
functions
Hardware
and Software Instruction Instruction
codes
Approaches interpreter
Control
signals
General-purpose
Data arithmetic Results
and logic
functions
@PM
Software
• A sequence of codes or instructions
Software
• Part of the hardware interprets each instruction and
generates control signals
• Provide a new sequence of codes for each new program
instead of rewiring the hardware
Major components:
• CPU
I/O
• Instruction interpreter
Components
• Module of general-purpose arithmetic and logic
functions
• I/O Components
• Input module
• Contains basic components for accepting data and
instructions and converting them into an internal form
of signals usable by the system
• Output module
• Means of reporting results
@PM
Memory address Memory buffer
register (MAR) register (MBR) MEMORY
• Specifies the • Contains the data to
address in memory be written into
for the next read or memory or receives
write the data read from
memory
MAR
@PM
CPU Main Memory
0
System 1
2
PC MAR Bus
Instruction
Instruction
Instruction
IR MBR
I/O AR
Data
Execution
unit Data
I/O BR Data
Data
PC = Program counter
Buffers IR = Instruction register
MAR = Memory address register
MBR = Memory buffer register
I/O AR = Input/output address register
I/O BR = Input/output buffer register
@PM
Fetch Cycle
• At the beginning of each instruction cycle the
processor fetches an instruction from memory
• The program counter (PC) holds the address of the instruction to be
fetched next
@PM
Action Categories
• Data transferred from • Data transferred to or
processor to memory from a peripheral
or from memory to device by transferring
processor between the processor
and an I/O module
Processor- Processor-
memory I/O
Data
Control
processing
• An instruction may • The processor may
specify that the perform some
sequence of execution arithmetic or logic
be altered operation on data
@PM
0 3 4 15
Opcode Address
0 1 15
S Magnitude
@PM
Memory CPU Registers Memory CPU Registers
300 1 9 4 0 3 0 0 PC 300 1 9 4 0 3 0 1 PC
301 5 9 4 1 AC 301 5 9 4 1 0 0 0 3 AC
302 2 9 4 1 1 9 4 0 IR 302 2 9 4 1 1 9 4 0 IR
• •
• •
940 0 0 0 3 940 0 0 0 3
941 0 0 0 2 941 0 0 0 2
Step 1 Step 2
Memory CPU Registers Memory CPU Registers
300 1 9 4 0 3 0 1 PC 300 1 9 4 0 3 0 2 PC
301 5 9 4 1 0 0 0 3 AC 301 5 9 4 1 0 0 0 5 AC
302 2 9 4 1 5 9 4 1 IR 302 2 9 4 1 5 9 4 1 IR
• •
• •
940 0 0 0 3 940 0 0 0 3 3+2=5
941 0 0 0 2 941 0 0 0 2
Step 3 Step 4
Memory CPU Registers Memory CPU Registers
300 1 9 4 0 3 0 2 PC 300 1 9 4 0 3 0 3 PC
301 5 9 4 1 0 0 0 5 AC 301 5 9 4 1 0 0 0 5 AC
302 2 9 4 1 2 9 4 1 IR 302 2 9 4 1 2 9 4 1 IR
• •
• •
940 0 0 0 3 940 0 0 0 3
941 0 0 0 2 941 0 0 0 5
Step 5 Step 6
Multiple Multiple
operands results
Table 3.1
Classes of Interrupts
@PM
User I/O User I/O User I/O
Program Program Program Program Program Program
1 4 1 4 1 4
Interrupt Interrupt
2b Handler Handler
END END
3a
3 3
3b
(a) No interrupts (b) Interrupts; short I/O wait (c) Interrupts; long I/O wait
i
Interrupt
occurs here i+1
Interrupts
Disabled
Check for
Fetch Next Execute
START Interrupt;
Instruction Instruction Interrupts Process Interrupt
Enabled
HALT
@PM
Time
1 1
4 4
I/O operation
I/O operation;
processor waits 2a concurrent with
processor executing
5 5
2b
2
4
I/O operation
4 3a concurrent with
processor executing
I/O operation;
processor waits 5
5 3b
@PM
Time
1 1
4 4
5
2
4
4
3 I/O operation
concurrent with
I/O operation; processor executing;
processor waits then processor
waits
5
5
@PM
Instruction Operand Operand
fetch fetch store
Multiple Multiple
operands results
No
Instruction complete, Return for string interrupt
fetch next instruction or vector data
@PM
Interrupt
User program handler X
Interrupt
handler Y
Interrupt
User program handler X
Interrupt
handler Y
@PM
Printer Communication
User program
interrupt service routine interrupt service routine
t=0
15
0 t=
t =1
t = 25
t= t = 25 Disk
40 interrupt service routine
t=
35
@PM
Read Memory
Write
N Words
Address 0 Data
Data N–1
External
Address M Ports Data
Internal
Data Interrupt
Signals
External
Data
Instructions Address
Control
Data CPU Signals
Interrupt Data
Signals
@PM
The interconnection structure must support the following
types of transfers:
@PM
A communication pathway Signals transmitted by any one
connecting two or more devices device are available for
• Key characteristic is that it is a shared reception by all other devices
transmission medium attached to the bus
• If two devices transmit during the
same time period their signals will
overlap and become garbled
I n
n n
Typically consists of multiple
communication lines
• Each line is capable of transmitting
Computer systems contain a
number of different buses that B t e
signals representing binary 1 and provide pathways between
binary 0 components at various levels of
the computer system hierarchy
u e c n
s r t
System bus
• A bus that connects major computer
components (processor, memory, I/O)
The most common computer
interconnection structures are
based on the use of one or more
c i
system buses
o o
@PM
Data Bus
• Data lines that provide a path for moving data
among system modules
• May consist of 32, 64, 128, or more separate
lines
• The number of lines is referred to as the width of
the data bus
• The number of lines determines how many bits
can be transferred at a time
• The width of the data bus
is a key factor in
determining overall
system performance
@PM
Address Bus Control Bus
@PM
CPU Memory Memory I/O I/O
Control lines
Data lines
@PM
Point-to-Point Interconnect
At higher and higher data
Principal reason for change
rates it becomes increasingly
was the electrical constraints
difficult to perform the
encountered with increasing
synchronization and
the frequency of wide
arbitration functions in a
synchronous buses
timely fashion
@PM