2-Computer Function - part1ك
2-Computer Function - part1ك
1
Introduction
Buses 4531
The Control Unit (an instruction interpreter) 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
Revie out inp É
Input module: contains basic components for
2
I
accepting data and instructions in some form and
converting them into an internal form of signals usable
by the system.
y on s y 6AMA E I W Ba fro's
input output 2
Cont.
W
An input device will bring instructions and data
in sequentially. But a program is not invariably
executed sequentially.
Operations on data may require access to more
than just one element at a time in a
predetermined sequence. E WI W IN yo
There must be a place to store temporarily both
instruction, data and results.
Main memory (to distinguish it from external storage).
ta
3
Registers
G B's Cpu my
Use two internal registers to exchange data
between CPU and memory: O d
N W H
MAR: which specifies the address in memory for the
next read or write. J o I K E N d
Ifl
MBR: which contains the data to be written into
memory or receives from memory.
Use two internal registers to exchange data
between CPU and I/O modules:
adores
I/O AR: which specifies a particular I/O device. g
go
I/O BR: used to exchange data
twain
I 4
Memory and I/O Modules
5
Top-Level View
pointer
o est III
tax
artnimatic
go
6
Computer Function
Processor-memory
data transfer between CPU and main memory
Processor I/O
Data transfer between CPU and I/O module
Data processing Tx e o g É
Perform some arithmetic yor logical operation on data
Control
Alteration of sequence of operations, e.g. jump
Combination of above
10
The Fetch-Execute Cycle
11
É É
Interrupts
12
Classes of interrupts
fo 25 E g p ti ie
Program: Generated by some condition that occurs as a
result of an instruction execution, e.g. overflow, division
by zero, execute illegal instruction..
Timer: Generated by internal processor timer.
- Allows the OS to perform certain functions. 82km1
03
- Used in pre-emptive multi-tasking.
I/O: By I/O controller, to signal normal completion of an
operation, or to signal a variety of error conditions.
Hardware failure: e.g. power failure.
in D 51.3
is 26 13
Program Flow Control Type of interrap
I
14
Program Timing:
tax mil
Fet in
Ex cut
interred in
17
Interrupt Handler th'd
Disable interrupts
Processor will ignore further interrupts whilst
processing one interrupt oxW65Ut1
Interrupts remain pending and are checked after first
imwW
interrupt has been processed
Interrupts handled in sequence as they occur
Define priorities a did Mia
Low priority interrupts can be interrupted by higher
priority interrupts
When higher priority interrupt has been processed,
processor returns to previous interrupt 19
type of multipl interrupt
20
Multiple Interrupts - Nested
21
Time Sequence of Multiple Int.
22
Interconnection structures
23
Memory Connection
w MJ
A memory module consists of N words of equal
length.
Each word is assigned a unique numerical address.
A word of data can be read from or written into the
0 memory.
25
The nature of the operation is indicated by read
and write control signals.
The location for the operation is specified by an
address. I 3
i i
035 Z
3
g 24
Input/Output Connection
w ik
Similar to memory from computer’s viewpoint
There are two operations: read and write.
An I/O module may control more than one
external device.
We can refer to each of the interfaces to an external
device as a port and give each a unique address.
There external data paths for the input and output of
data with an external device.
An I/O module may be able to send interrupt
signals to the processor.
25
CPU Connection
26
Computer modules
gotta
t
go I
wid E's
27
Interconnection structures
28
What is a Bus?
34
Control Bus (2)
38