Data path and Control path in Computer architecture

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 place to another, from one register to another register, performing the addition of two numbers in ALU, copying something in memory and copying to register. So, any data processing operation happens in the CPU, then for that data operation, data follows a specific path, which is called "data path.”

“Data path is the collection of functional units such as arithmetic logic units or multipliers. Data path is required to perform data processing operations.”

To perform any operation in the CPU, data follows a specific path within the CPU to execute the instruction. That followed path is known as a data path.

This data path diagram tells how data follows a specific path. It's not a standard diagram as every CPU can have a different data path diagram. Components in the diagram:-

Data path and Control path in Computer architecture

Registers- Here, we have five registers used to store in-out signal data named as instruction register (IR), a program counter (PC), data(D) register, Address(A)-register. Registers are like gates here through which signals are further sent to components to do the micro-operation. Registers are controlled, and signals of registers are directed by the control- unit.

Instruction Register- IR works on  IN-OUT signal value. It carries the value of micro-operation which is going to be performed by the CPU.

Data register- In the diagram, we have two data registers named D1 and D2, which save the input data used to perform the micro-operation. D1 data directly goes to ALU, and D2 data moves to MUX 1.

Program Counter- It can take two signals in-out signal. Value of PC sent to MUX forwarded to ALU. The program counter has its incrementer through which the PC's value is incremented in the same register, and it requires a signal named INC. If INC is enabled having value 1, it increases the program counter value and disables having value 0.     

Multiplexer- multiplexer is a combinational circuit that takes multiple signals and sends them further as one signal. The diagram shows two multiplexers of 2x1 named MUX 1 and MUX 2, which uses the selected signal to carry the data. It depends on micro-operation. If the select signal is 1, then MUX is enabled, and if the select signal is 0, then MUX is disabled.

Memory- Data is kept in memory with two functions, i.e., the Read and Write function.  When the Read function is enabled, data is sent from memory to CPU, and when they write function is enabled, then data is stored in CPU to memory. Read signal enabled than write signal is disabled and vice-versa.

Address bus – Address bus directly carries the input address from the address register to memory.

Data bus- Data bus is used to carry data from memory to registers and registers to memory. Here data bus transfer data from memory to MUX 2.

ALU: Arithmetic Logic Unit

Arithmetic Logic Unit is the full form of ALU. It is present in every CPU to perform operations like addition, subtraction, division, multiplication and many more. It is the main component of the system to apply logic to execute a particular instruction or program. ALU takes two operands as input and function code. ALU can perform multiple functions like subtraction, X-NOR, division and many more. It becomes necessary to provide a function code(assume 10100), which indicates or tells what kind of  function ALU has to perform on the given inputs.

Data path and Control path in Computer architecture

Instruction Fetch

Instruction fetch is getting the instruction or reading/fetching an instruction from memory to CPU. Instruction will be fetched from a particular address on which the next instruction is present, and this address is stored in a register called a program counter register. Memory is accessed on an address stored in the program counter, and then on that memory address, instruction is available, and it is kept in the instruction register.

                                                          IRß M[PC]

But this operation cannot be completed in a single step. So to do this complete operation, various steps are required because one component can perform only one operation at one time:-

  1. Firstly, bring the program counter (PC) value into the address register because we cannot bring the value of the program counter to memory. It should be copied to the address register first.

                                        AR ßPC           …….(i)

  • Content of the address register is sent directly to memory, and content can be read from memory. Further, the content of the register is copied to the instruction register. Along with this value of the program in program counter, it is incremented by 1.

                                         IRß M[AR],   PCß PC +1     …..(2)

Note: Two micro-operation can only perform together only when the operation components are different for both operations.

Control Unit

Control unit generates all the signals (in-out) based on which all other component works. The unit generates the signal and sends those signals to components, and components work accordingly. The Control unit is a component present in the CPU which guides the input and signals to reach their required destination (components). It tells computer memory, input/output signal, arithmetic logic unit to respond to the instructions sent to the processor.

Two devices require a control unit:-

1) Central Processing Units (CPU’s)

 2) Graphics Processing Unit(GPU’s)

Data path and Control path in Computer architecture

What is the control Variable?

Control variable- To every signal, we have assigned some names. For example:  Read and write signal for memory, I-Register having control signal named IN-OUT, the select signal for multiplexer 1 and 2, out a signal for D1 and D2.

“Control variable is the name of  control signal.”

What is the control word?

All the control signals in the process of execution of the program are collected at one place, known as the control word. The control word is collecting all the signals during the fetching of instruction by the components like registers, multiplexer, ALU etc. Control word generates a signal in 0 or 1 form(binary digits), 0 is for disabling, and 1 is for enabling. All the components take these signals meant for them and work accordingly because the different signal is meant for a different component. Components together operate and perform micro-operation.

Data path and Control path in Computer architecture

  • Read
  • Discuss
  • Improve Article

    Save Article

    Representing and storing numbers were the basic operation of the computers of earlier times. The real go came when computation, manipulating numbers like adding, multiplying came into the picture. These operations are handled by the computer’s arithmetic logic unit (ALU). The ALU is the mathematical brain of a computer. The first ALU was INTEL 74181 implemented as a 7400 series is a TTL integrated circuit that was released in 1970. 

    The ALU is a digital circuit that provides arithmetic and logic operations. It is the fundamental building block of the central processing unit of a computer. A modern CPU has a very powerful ALU and it is complex in design. In addition to ALU modern CPU contains a control unit and a set of registers. Most of the operations are performed by one or more ALU’s, which load data from the input register. Registers are a small amount of storage available to the CPU. These registers can be accessed very fast. The control unit tells ALU what operation to perform on the available data. After calculation/manipulation, the ALU stores the output in an output register. 

    Data path and Control path in Computer architecture

    The CPU can be divided into two sections: the data section and the control section. The DATA section is also known as the data path.BUS: In early computers “BUS” were parallel electrical wires with multiple hardware connections. Therefore a bus is a communication system that transfers data between components inside a computer, or between computers. It includes hardware components like wires, optical fibers, etc and software, including communication protocols. The Registers, ALU, and the interconnecting BUS are collectively referred to as data paths. 

    Types of the bus are: 
     

    1. Address bus: The buses which are used to carry address. 
       
    2. Data bus: The buses which are used to carry data. 
       
    3. Control bus: If the bus is carrying control signals. 
       
    4. Power bus: If it is carrying clock pulse, power signals it is known as a power bus, and so on. 
       

    The bus can be dedicated, i.e., it can be used for a single purpose or it can be multiplexed, i.e., it can be used for multiple purposes. When we would have different kinds of buses, different types of bus organizations will take place. 
     

    • Program Counter – 
      A program counter (PC) is a CPU register in the computer processor which has the address of the next instruction to be executed from memory. As each instruction gets fetched, the program counter increases its stored value by 1. It is a digital counter needed for faster execution of tasks as well as for tracking the current execution point. 
    • Instruction Register – 
      In computing, an instruction register (IR) is the part of a CPU’s control unit that holds the instruction currently being executed or decoded. An instruction register is the part of a CPU’s control unit that holds the instruction currently being executed or decoded. The instruction register specifically holds the instruction and provides it to the instruction decoder circuit. 
    • Memory Address Register – 
      The Memory Address Register (MAR) is the CPU register that either stores the memory address from which data will be fetched from the CPU, or the address to which data will be sent and stored. It is a temporary storage component in the CPU(central processing unit) that temporarily stores the address (location) of the data sent by the memory unit until the instruction for the particular data is executed. 
    • Memory Data Register – 
      The memory data register (MDR) is the register in a computer’s processor, or central processing unit, CPU, that stores the data being transferred to and from the immediate access storage. Memory data register (MDR) is also known as memory buffer register (MBR). 
    • General Purpose Register – 
      General-purpose registers are used to store temporary data within the microprocessor. It is a multipurpose register. They can be used either by a programmer or by a user.

    One Bus organization – 

    Data path and Control path in Computer architecture

    In one bus organization, a single bus is used for multiple purposes. A set of general-purpose registers, program counters, instruction registers, memory address registers (MAR), memory data registers (MDR) are connected with the single bus. Memory read/write can be done with MAR and MDR. The program counterpoints to the memory location from where the next instruction is to be fetched. Instruction register is that very register will hold the copy of the current instruction. In the case of one bus organization, at a time only one operand can be read from the bus. 

    As a result, if the requirement is to read two operands for the operation then the read operation needs to be carried twice. So that’s why it is making the process a little longer. One of the advantages of one bus organization is that it is one of the simplest and also this is very cheap to implement. At the same time a disadvantage lies that it has only one bus and this “one bus” is accessed by all general-purpose registers, program counter, instruction register, MAR, MDR making each and every operation sequential. No one recommends this architecture nowadays. Two Bus organizations – 
    To overcome the disadvantage of one bus organization another architecture was developed known as two bus organization. In two bus organizations, there are two buses. The general-purpose register can read/write from both the buses. In this case, two operands can be fetched at the same time because of the two buses. One bus fetch operand for ALU and another bus fetch for register. The situation arises when both buses are busy fetching operands, the output can be stored in a temporary register and when the buses are free, the particular output can be dumped on the buses. 

    There are two versions of two bus organizations, i.e., in-bus and out-bus. From in-bus, the general-purpose register can read data and to the out bus, the general-purpose registers can write data. Here buses get dedicated. 

    Data path and Control path in Computer architecture

    Data path and Control path in Computer architecture

    Three Bus organization – 
    In three bus organizations we have three buses, OUT bus1, OUT bus2, and an IN bus. From the out buses, we can get the operand which can come from the general-purpose register and evaluated in ALU and the output is dropped on In Bus so it can be sent to respective registers. This implementation is a bit complex but faster in nature because in parallel two operands can flow into ALU and out of ALU. It was developed to overcome the “busy waiting” problem of two bus organizations. In this structure after execution, the output can be dropped on the bus without waiting because of the presence of an extra bus. The structure is given below in the figure. 

    Data path and Control path in Computer architecture

    The main advantages of multiple bus organizations over the single bus are as given below. 
     

    1. Increase in size of the registers. 
       
    2. Reduction in the number of cycles for execution. 
       
    3. Increases the speed of execution or we can say faster execution.