You are on page 1of 35

Computer Architecture & Organization (YCS4001)

Module 3: Processor Unit Design

Soumya Majumdar
Register Transfer
● Registers define the storage area that influences the data and instructions. It can send data and
instructions from one register to another register, memory to register, and memory to memory,
the register transfer approach is used

R2←R1

Above statement indicates a transfer of the content of register R1 into register R2. It labelled a
replacement of the content of R2 by the content of R1. The content of the source register R1 does not
shift after the transfer.

● Register Transfer refers to the availability of hardware logic circuits that can perform a given
micro-operation and transfer the result of the operation to the same or another register
Register Transfer
Register Transfer
● The memory address register is designated by MAR.
● Program Counter PC holds the next instruction's address.
● Instruction Register IR holds the instruction being executed.
● R1 (Processor Register).
● We can also indicate individual bits by placing them in parenthesis. For instance, PC (8-15), R2 (5), etc.
● Data Transfer from one register to another register is represented in symbolic form by means of
replacement operator.
● Typically, most of the users want the transfer to occur only in a predetermined control condition. This
can be shown by following if-then statement:
If (P=1) then (R2 ← R1); Here P is a control signal generated in the control section.
Register Transfer

Letter 'n' indicates the number of bits for the register. The 'n' outputs of the register R1 are
connected to the 'n' inputs of register R2
Bus architecture
● Bus is a subsystem that transfers data between components inside a computer, or between
computers.
● Early computer buses were literally parallel electrical wires with multiple connections.
● But Modern computer buses can use both parallel and bit serial connections.
● To achieve a reasonable speed of operation, a computer must be organized so that all its units
can handle one full word of data at a given time.
● When a word of data is transferred between units, all its bits are transferred in parallel, that is,
the bits are transferred simultaneously over many wires, or lines, one bit per line. A group of
lines that serves as a connecting path for several devices is called a bus.
● In addition to the lines that carry the data, the bus must have lines for address and control
purposes.
Single bus architecture
Single bus architecture
● Simplest way to interconnect functional units is to use a single bus
● All units are connected to this bus.
● Only two units can actively use bus at any given time because bus can be used for only one
transfer at a time
● Bus control lines are used to arbitrate multiple requests for use of the bus.
● Main virtue of single-bus structure is its low cost and is flexibility for attaching peripheral
devices.
Bus interconnection scheme

Bus interconnection scheme
● Address bus: Address bus is used to carry the address. It is unidirectional bus. The address is
sent to from CPU to memory and I/O port and hence unidirectional. It consists of 16, 20, 24 or
more parallel signal lines.
● Data bus: Data bus is used to carry or transfer data to and from memory and I/O ports. They are
bidirectional. The processor can read on data lines from memory and I/O port and as well as it
can write data to memory. It consists of 8, 16, 32 or more parallel signal lines.
● Control bus: Control bus is used to carry control signals in order to regulate the control
activities. They are bidirectional. The CPU sends control signals on the control bus to enable the
outputs of addressed memory devices or port devices. Some of the control signals are: MEMR
(memory read), MEMW (memory write), IOR (I/O read), IOW (I/O write), BR (bus request),
BG (bus grant), INTR (interrupt request), INTA (interrupt acknowledge), RST (reset), RDY
(ready), HLD (hold), HLDA (hold acknowledge),
Multi bus architecture
● In single bus architecture, all devices use a common bus for data transfer => system’s efficiency
and performance became lower.
● When many devices need the bus at the same time, this creates a state of conflict called bus
contention; some wait for the bus while another has control of it => waiting wastes time and
slowing the computer down
● In multiple bus organization wasted time lowers down => speed and performance of entire system
boost up.
● In multi bus architecture, one bus is used to fetch instruction and another bus is used to fetch data
(required for execution).
Single bus vs Multibus
Control Unit
● Control Unit is the part of the computer’s central processing unit (CPU), which directs the
operation of the processor.
● Responsibility of the Control Unit to tell the computer’s memory, arithmetic/logic unit and input
and output devices how to respond to the instructions that have been sent to the processor.
● Fetches internal instructions of programs from main memory to processor instruction register,
and based on this register contents, the control unit generates a control signal that supervises the
execution of these instructions.
Control Unit
Function of Control Unit
● It coordinates sequence of data movements into, out of, and between a processor’s many
sub-units.
● It interprets instructions.
● It controls data flow inside the processor.
● It receives external instructions or commands to which it converts to sequence of control
signals.
● It controls many execution units(i.e. ALU, data buffers and registers) contained within a CPU.
● It also handles multiple tasks, such as fetching, decoding, execution handling and storing results.
Types of Control Unit
● Hardwired control unit
● Microprogrammed control unit
Hardwired Control Unit
● A hardwired control: method of generating control signals with the help of Finite State Machines
(FSM).
● The control signals necessary for instruction execution control in the Hardwired Control Unit are
generated by specially built hardware logical circuits (done by physically connecting components
such as flip-flops, gates, and drums)
● Change of the signal production mechanism is not possible without physically changing circuit
structure

Characteristics of Hardwired Control Unit
● Two decoders, sequence counter and logic gates make up a Hardwired Control.
● Instruction register stores an instruction retrieved from the memory unit (IR).
● Instruction register consists of the operation code, the I bit, and bits 0 through 11.
● A 3 x 8 decoder is used to encode the operation code in bits 12 through 14.
● The decoder’s outputs are denoted by the letters D0 through D7.
● The bit 15 operation code is transferred to a flip-flop with the symbol I.
● Control logic gates are programmed with operation codes from bits 0 to 11.
● Sequence counter (or SC) can count from 0 to 15 in binary.
Designing of Hardwired Control Unit
● Some of ways for constructing hardwired control logic that have been proposed are: Sequence
Counter Method, Delay Element Method, State Table Method
● Sequence Counter Method: most practical way to design a somewhat complex controller.
● Delay Element Method: this method relies on the usage of timed delay elements for creating the
sequence of control signals,.
● State Table Method: standard algorithmic approach to designing the Notes controller utilising the
classical state table method is used in this method.
Hardwired Control Unit
Microprogrammed Control Unit
● Microprogrammed control unit is a control unit that saves binary control values as words in
memory.
● Controller generates the instructions to be executed by creating a certain collection of signals at
every system clock beat.
● Each one of these output signals causes a single micro-operation
● Program made up of microinstructions is used to carry out a series of micro-operations.
● Control unit’s control memory stores a microprogram composed of microinstructions
● Creation of a set of control signals is dependent on the execution of a microinstruction
Microprogrammed Control Unit
Characteristics of Microprogrammed Control Unit
● Microinstruction address is specified in control memory address register.
● All control information is saved in control memory, which is considered to be a ROM.
● Microinstruction received from memory is stored in control register.
● Control word in the microinstruction specifies one or multiple micro-operations for a data
processor.
● Next address is calculated in circuit of next address generator and then transferred to control
address register for reading next microinstruction when micro-operations are being executed.
● Next address generator is also known as a microprogram sequencer because it determines the
sequence of addresses received from control memory.
Microprogrammed Control Unit
Microprogrammed Control Unit
Microprogrammed Control Unit
● Control Word: A control word is a word whose individual bits represent various control
signals.
● Micro-routine: A sequence of control words corresponding to the control sequence of a
machine instruction constitutes the micro-routine for that instruction.
● Micro-instruction: Individual control words in this micro-routine are referred to as
microinstructions.
● Micro-program: A sequence of micro-instructions is called a micro-program, which is
stored in a ROM or RAM called a Control Memory (CM).
● Control Store: the micro-routines for all instructions in the instruction set of a computer are
stored in a special memory called the Control Store.
Microprogrammed Control Unit Classifications
● Horizontal micro-programmed control unit: control signals are represented in the decoded
binary format, i.e., 1 bit/CS. Here ‘n’ control signals require n bit encoding.
● Vertical micro-programmed control unit: control signals are represented in the encoded
binary format. Here ‘n’ control signals require log2n bit encoding.
● Diagonal micro-programmed control unit: compromise between horizontal and vertical.
Microprogrammed Control Unit Classifications

Horizontal Vertical Diagonal

Long format Short format Moderate length format

Ability to express a high No degree of parallelism Some degree of parallelism


degree of parallelism

Little encoding of the control Considerable encoding of the Some encoding of the control
information control information information
Microprogrammed Control Unit Advantages
● Allows for a more methodical control unit design.
● Easier to troubleshoot and modify.
● Can keep the control function’s fundamental structure.
● Can make the control unit’s design easier. As a result, it is less expensive and less prone to
errors or glitches.
● Has the ability to design in a methodical and ordered manner.
● Used to control software-based functions rather than hardware-based functions.
● Used to do complex functions with ease
● More adaptable.
Microprogrammed Control Unit Disadvantages

● Adaptability comes at a higher price.


● It is comparatively slower than a control unit that is hardwired.
Differences between hardwired and microcontrolled
Hardwired Control Unit Microprogrammed Control Unit

Hardwired control unit generates the control Microprogrammed control unit generates the
signals needed for the processor using logic control signals with the help of micro
circuits instructions stored in control memory

Hardwired control unit is faster when compared


to microprogrammed control unit as the This is slower than the other as micro
required control signals are generated with the instructions are used for generating signals here
help of hardwares

Difficult to modify as the control signals that Easy to modify as the modification need to be
need to be generated are hard wired done only at the instruction level
Differences between hardwired and microcontrolled
Hardwired Control Unit Microprogrammed Control Unit

Less costlier than hardwired control as only


More costlier as everything has to be realized in
micro instructions are used for generating
terms of logic gates
control signals

It cannot handle complex instructions as the


It can handle complex instructions
circuit design for it becomes complex

Only limited number of instructions are used Control signals for many instructions can be
due to the hardware implementation generated

Used in computer that makes use of Reduced Used in computer that makes use of Complex
Instruction Set Computers(RISC) Instruction Set Computers(CISC)

You might also like