The
primary function of the CPU is to execute sequences of instructions,
which are programs stored in external main memory. When it
executes a program, virtually all the CPU ever does is read binary
numbers from some kind of memory, do arithmetic or logical operations
on them, and write new numbers back into memory. Program
execution is therefore carried out as follows:
-
The CPU transfers instructions and, when necessary, the input data of instructions (operands) from the main memory to registers in the CPU.
-
The CPU executes the instructions in their stored sequence except when the execution sequence is explicitly altered by a branch instruction.
-
When necessary, the CPU transfers output data (results) from the CPU registers to the main memory.
Diagrammatically,
the program execution is depicted below.
A
CPU consists of three fundamental parts. These are the registers,
datapath and control. The function of these is explained below:
Registers:
These are temporary data storage units. This is the working memory
for storage of instructions and data that is being processed.
Usually they form a general-purpose register file, and a 32 data word
capacity is typical. Registers are a very high speed form of memory
that can be accessed within a single clock cycle.
Datapath:
This is the functional and storage circuitry for doing arithmetic and
logic operations (data processing) on data words.
Control: This
is the circuitry for issuing control signals to the datapath,
including selecting the functions to be performed at specific times
and routing the data through the appropriate parts of the datapath.
No comments:
Post a Comment