×

Control Unit Organization

Control Unit Organization

The Control Unit is the unit in the CPU, which controls the various components like input  & output devices, logic unit and memory. The Control Unit is the circuitry that controls or directs the component’s operations and tells them how to respond to the instruction received from the program.

Functions of the control unit

CU's main function is to direct the operations during the execution of a program by the processor.

The control unit converts the input into control signals sent to different components and registers to execute its functioning.

The Control Unit cannot store or process the data; it just directs the data signals.

Control unit directs working of all its components. It provides direction to the control signals and send them to the appropriate component to execute the instruction. Control unit components are:- control signal within the CPU, instruction register, input flags, control bus, clock signals, control signals to/from the bus. 

Design of Control Unit

 Every CPU can be designed in a different- different way, same with the control unit. Control unit can be designed in two possible best ways.

  1. Hardwired Control Unit
  2. Micro-programmed Control Unit

Hardwired Control Unit

As the name defined hardwired control unit, going to design the control unit by using the hardware (circuits). The control logic is implemented with Gates, flip-flops, decoders, and other digital circuits in this type.

“Control logic is the unit which generates the control signals which are implemented using the hardware that’s why it is called as hardwired control unit.”

Advantage:  Hardware is always faster. Due to this, it can be optimized to produce a faster mode of operation. It generates the fastest control signal.

Disadvantage: a) If CPU design is very complicated or very much modern, hardwired control is difficult to implement

b) Rearranging the wires among various components is difficult.                    

c) In the hardwired control unit, updation in the control logic is difficult. For example, the CPU has generated a control signal/ control word. The signal goes to registers (R1, R2, R3…), ALU, Memory (Read and Write signals); if a little bit design of the CPU has changed, then the CPU way of operating will also change. The operating method will be updated, and due to this, the control signal/control word will be different. Control signals format changes when we change the hardware circuit, which create difficulty.

From the diagram, we explain the working of the hardwired control unit.

Working of a hardwired control unit is explained with the help of an example:

Suppose,

Step 1) A CPU can execute some 16 different instructions (I1, I2, I3, I4,…….I16).

Step 2) CPU executes each instruction distinctly, each instruction is executed in a different method to others, and it is done by executing small-small micro-operations for each instruction.

Assume, CPU executes instruction 1 with 8 distinct micro-operation. So to execute I 1completely, 8 cycles are required by CPU.

 I 1=> ?opn  1, ?opn  2, ? opn  3, ?opn  4 ….. ? opn  8

For the second instruction, 6 cycles are required.

I 2=> ?opn  1, ?opn  2, ? opn  3, ?opn 4,  ? opn 5, ? opn 6

Same, for completing one instruction, the different or same number of the cycle are required by CPU.

Step 3) For performing one micro-operation, CPU control unit needs to generate a set of control signals called control words.

?opn  1= 010010001001(1 C.W)

?opn  2= 1 C.W

?opn  3=  C.W

?opn  4= 1 C.W

?opn  8=1 C.W

For each micro-operation control, the word will be different, but some signals are enabled in each control word, and some are disabled, and the control unit decides all these signals.

Step 4)  One instruction is generated with micro-operation cycles, which are controlled by the control unit. The Control unit decides at what time which instruction is enabled or disabled. It is discussed in the table:

One who designed the CPU only knows which signal is to be enabled or disabled.  After completing the table, the hardware is designed. After the execution of 1st instruction completely, the timing generator is reset for the second instruction as per the micro-operation cycle is required to complete the second instruction.

Micro-programmed Control Unit

In this control, logic is implemented with micro-programs. That's why it is called a micro-programmed control unit. It’s a midway between hardware and software.

“All possible control words are stored in a memory because it is a part of control unit) and based on the requirements, the specific control word is fetched from memory, then its signals are sent to different components.”

In this type, the control word is used to store the control signals encoded during the execution of a program and control words are stored in the memory. Memory can be easily changed; we can change the value (0 or 1) in the control word, enabling and disabling signals. We do not need to change the whole control word format as it can work on a variable format of 16-64 bit, or we can easily update the control logic. 

The sequence logic inputs are given by ALU flags, clock pulses and instruction register, which holds the instructions to be executed from the above diagram.

Instruction register-The instruction register sends data into sequence logic, and data is further sent to the control address register sequentially.

Control address register holds the address of the instruction/ control word data sequentially, sent by sequence logic. It holds the control word signals to execute the instruction and send them to control memory. It also helps to specify the address of the next micro-instruction to be executed.

Control memory is just a ROM (read-only memory). Control memory cannot perform any operation, and it's just read the data and stores the data input.  Content of given control word in ROM at a given address specifies a micro-instruction required to execute the instruction. So, "A series of micro-instruction is stored in ROM." One instruction can be executed through the number of micro-operation/instruction cycle. Control memory used for another purpose also for example:-

  1. Control memory is used to fetch, generate instruction from the main memory.
  2. Used to evaluate effective address.
  3. Execute the specified operation.
  4. Store written operation used to fetch instruction.

Control buffer register- Data read from control memory is stored in the control buffer register, which sends internal and external control signals with which microinstructions are executed. Control buffer register sends a signal to sequence logic to execute the next instruction, and the same further process is carried out to execute the instruction. 

Types of the micro-programmed control unit

  1. The horizontal micro-programmed control unit
  2. The vertical micro-programmed control unit

Advantage of MP control unit: Updating the control logic is easy as all the control signals are stored in memory, easily changed according to instruction requirements.

A micro-programmed control unit is implemented in high-level computers because it is easy to design, test, and implement.

The MP control unit's disadvantage is slower than the hardwired control unit because here, we have more flexibility in design.

Difference between  Micro-programmed Control and Hardwired control unit

Hardwired ControlMicro-programmed Control
Hardwired control unit technology is circuit-based. Micro-programmed control unit technology is software-based.
 Flip-flops, gates, decoders etc., are used in the implementation. In controlling the execution of instructions, signals are generated by microinstructions.
It uses the fixed instruction format.It uses the variable instruction format (16-64 bits per instruction).
Instructions are register-based.Instructions are not register-based.
 For information and data (instruction), ROM (Read Only Memory) is not used. For information and data (instruction), ROM (Read Only Memory) is used.
The hardwired control unit is used in RISC.The micro-programmed control unit is used in CISC.
It does decoding at a very fast rate.It provides slow decoding.
It isn't easy to modify, as it follows a fixed instruction format.It is easy to modify as it follows a variable instruction format.
It has less chip area.It has a large chip area.

How exactly are the control words stored?

Suppose CPU has = 16 instructions (I 1 to I 16)

For each instruction = 8 micro-operations ( 8 control words are required to generate one set of instruction)

In the control memory, whenever you are storing the control word, store each control word in a sequence required to execute one instruction like to execute I 1 type instruction 8 control words are required which are stored in sequence in the control memory.  Same with the instruction  I 2, I 3…I 16.

Total control words in memory = 16 x 8

                                                    = 27 = 128

Control memory address size = 7 bits.

Note: It's mandatory to store all the control words required for instruction (I 1, I2…) in a sequence manner. Because whenever the CPU's control unit understands that it has to execute I 1 instruction afterward, the control unit is not dependent on any external thing. The control unit doesn't need to take any external input to execute the I 1 instruction, and it sends control word signals one by one in a sequence manner. 


Related Topics

Data Path, ALU and Control Unit

Data Path, ALU(Arithmetic Logic Unit) and Control Unit What is the Data path? Suppose any data processing operation should be performed in the CPU like transferring the content of register from one...

5 minutes read.

Computer Organization and Architecture Data Formats

Data Formats In the digital world, everything is based on digits. In every method, the calculation is processed on the digits, and most importantly, the computer only understands the binary language...

6 minutes read.

Fixed and Floating-Point Number

Fixed and Floating-Point Number: In digital technology, data is stored in memory registers with binary bits 0’s and 1’s because the computer only understands binary language. When we enter data...

6 minutes read.

Advantages and Disadvantages of Flash Memory

What is Flash Memory? Electrically Erasable Programmable Read-Only Memory (EEPROM) and Erasable Programmable Read-Only Memory (EPROM) are used for flash memory (EEPROM). Although technically the word flash is used in the industry...

3 minutes read.

Ethernet Frame Format

What is Ethernet? As we know in computer networking, LAN (Local Area Network) is used to connect devices in limited geographical areas like schools or a building.LAN uses different topologies (arrangement...

3 minutes read.

8085 Pin Configuration

Introduction: Intel 8085 is consist 40 pin IC. The pin name of 8085 is A8 – A15; AD0 – AD7; ALE; IO/M; S0, S1; RD; WR; READY; HOLD; HLDA; INTR; INTA;...

6 minutes read.

Flag Register of 8086 Microprocessor

In this article, we are going to study about the one of the registers named flag registers of 8086 microprocessor. We are also going to know where and how to...

3 minutes read.

IEEE Standard 754 Floating Point Numbers

Floating Point Representation: IEEE- 754 There were many problems in the conventional representation of floating-point notation like we could not express 0(zero), infinity number. To solve this, scientists have given a...

8 minutes read.

Use Case Diagram for the online bank system

What is a Use Case Diagram? A tool is called a Use Case Diagram which is used to create, present, and comprehend the functional requirements for a system. The Use Case...

3 minutes read.

CarryLook Ahead Adder

What is Adder? Adder is the combinational circuit that is used to add the bits in digital electronics. As we know, in the digital system, every number is represented in the...

4 minutes read.

COA: Interrupt and its types

Introduction: In general terms, the word interrupt means to stop the progress of ongoing work in between or to break the continuation of the work. In early digital computing, the...

5 minutes read.

8085 Arithmetic Instructions

Arithmetic instructions are a type of instruction in a computer's instruction set that perform arithmetic operations on data. These operations can include addition, subtraction, multiplication, and division. Arithmetic instructions can...

4 minutes read.

Instruction Cycle: Computer Organization and Architecture

What is an effective Address? “Effective address is the address of operand in a computation-type instruction.” Computation type instructions are like ADD, SUB, MOV, OR, AND, etc., which require operand to...

4 minutes read.

Convert a number from base 2 to base 6

Base 2 Base 2 is the format where you can represent any number with just two values which are 0 and 1. With the help of 0s and 1s, we can...

4 minutes read.

Computer Organization and Architecture Tutorial

Introduction to Computer Organization and Architecture In this modern era, or we can say computer era, Technology from all around surrounds us. Human is conserved, connected and absorbed by Technology. From...

4 minutes read.

Types of Microprocessors

Introduction:Microprocessor is known as the computer processor. The IC or integrated Circuit makes the microprocessor. That is the brain of the computer machine.  The microprocessor is the Processor or CPU (Central...

3 minutes read.

Micro-Operations

Micro-Operations If CPU wants to perform any operation, suppose execution of only one instruction or even break it down one particular execution phase (like fetch instruction, write back, decode, operand fetch...

9 minutes read.

BCD to 7 Segment Decoder

What is BCD? BCD is called Binary Coded Decimal. As you know there are a lot of forms in which we can represent the number like Binary, decimal, hexadecimal, and octal...

3 minutes read.

Digital Number System

Digital Number System: The computer understands digital language only. Many number systems are used in digital technology. The most common are Decimal, Binary, Octal and Hexadecimal number systems. Types of the...

7 minutes read.

Machine Instructions

What is a Digital Computer? A computer that takes input in a binary form and produces output in binary form. The question arises of what kind of input the computer takes...

4 minutes read.