Computer Organization UNIT-3 Processor and Control Unit: Fundamental Concepts
Computer Organization UNIT-3 Processor and Control Unit: Fundamental Concepts
UNIT-3
Processor and Control Unit
Fundamental Concepts:
Executing an Instruction:
Fetch the contents of the memory location pointed to by the PC and load the
content of memory location into the Instruction Register (IR).
IR [PC]
PC PC + 4
Instruction decoder and control unit is responsible for issuing the control
signals to all the units inside the processor.
The number and function of processor registers R0 to R(n-1) vary considerably
from one machine to another. They may be used for general purpose or
some may be dedicated as special purpose registers such as index register or
stack pointers.
ALU
o “A” gets the operand from the output of the multiplexer (MUX).
o “B” input gets the operand directly from the processor bus.
o There are two options provided for “A” input of the ALU. Mux is used
to select one of the 2 inputs. MUX selects either output of Y or
constant value 4 (which is used to increment PC content).
Program Counter (PC) is used to store the address of the next instruction to
be executed.
Memory Address Register (MAR) holds the address generated by processor
where operation is being performed.
Memory Data Register (MDR) holds the data on which the operation is being
performed. It holds the data that is being transferred from memory to
processor and from processor to memory.
Register Y, Z, Temp are used by the processor for temporary storage during
the instruction execution.
ALU control lines activate one of the operations such as Add, Sub… The
activated operation is performed by ALU and result is placed in Z.
e.g., If Add=1, then ALU performs addition operation.
Result stored in Z is transferred to specified destination (memory location or
general purpose register)
Whenever an instruction is fetched it is stored in instruction register (IR).
Note:- The connection between ALU, register and the internal processor is
known as data path.
This bus organization is the simplest and least expensive, but it limits the
amount of data transfer that can be done in the same clock cycle, which will
slow down the overall performance.
The two selection lines S1 and S0 are connected to the selection inputs of all
four multiplexers. The selection lines choose the four bits of one register and
transfer them into the four-line common bus. When S1S0 = 00, the 0 data
inputs of all four multiplexers are selected and applied to the outputs that
form the bus. This causes the bus lines to receive the content of register A.
The transfer of information from a bus into one of many destination registers
can be accomplished by connecting the bus lines to the inputs of all
destination registers and activating the load control of the particular
destination register selected. For example: transfer register C content to
register A. This transfer is represented as follows:
CBus
BusA
Three-State Bus Buffers
A Tri-state Buffer can be thought of as an input controlled switch with an
output that can be electronically turned “ON” or “OFF” by means of an
external “Control” or “Enable” ( EN ) signal input. Tri-state Buffer being in
one state allowing its output to operate normally producing the required
output or in another state were its output is blocked or disconnected.
A three-state gate is a digital circuit that exhibits three states. The three
states are logic 1 and 0, high–impedance state. The high-impedance state
behaves like an open circuit, which means that the output is disconnected
and does not have a logic significance.
The control input determines the output state. When the control input is
equal to 1, the output is enabled and the gate behaves like any conventional
buffer, with the output equal to the normal input. When the control input is
0, the output is disabled and the gate goes to a high-impedance state,
regardless of the value in the normal input.
They allow multiple logic devices to be connected to the same wire or bus
without damage or loss of data.
Tri-state buffer
To construct a common bus for four registers of n bits each using three- state
buffers, n circuits with four buffers in each is needed as shown in Fig.
Each group of four buffers receives one significant bit from the four registers.
Each common output produces one of the lines for the common bus for a
total of n lines.
The decoder is used to to select between the four registers.
A one stage logic circuit with its function table is given below
Shift Microoprations
Example: - Let control unit contains 64 control signals. What is the size of
control word used in bits a) Horizontal Programming b) Vertical
programming
Sol: - a) Horizontal: 1 control signal=1 bit, so 64 control signals= 64bits.
b)Vertical: n control signals = log2n bits, 64 control signals = log264 bits = 6
bits
Microinstruction Format