The Datapath

Nirmani warakaulla
4 min readJul 7, 2021

--

What is the mean by “Datapath”

A data path (also written as a database) is a collection of functional units that perform data processing operations. It is made up of a CPU (central processing unit) of a computer system with a data system, the control unit of the system. Researchers are trying to find ways to imprint data paths on fabrics and make them reconfigurable.

A= Program counter

B= Instruction Memory

C= Adder

D= Multiplexer

E= Registers

F= Sign-extension unit

G= Multiplexer

H= Shifter

I= Adder

J= ALU

K= Data Memory unit

L= Multiplexer

Functions Of Each Part

B = Instruction Memory

• A memory unit to store instructions of a program and supply instructions given/requested an address

• Needs to provide only read access (once the program is loaded).

  • The control signal is no need for it.

A = Program counter

• PC (Program Counter or Instruction address register) is a special register that holds the address of the currently executing instruction.

  • A new value is written to it every clock cycle. The control signal is not required to enable write.

C , I = Adder

• Adder is used to increment the PC to the address of the next instruction.

• An ALU permanently wired to do only the addition.

It is not required for other extra control signals.

C: Adds 4 to program counter address for pointing to the next consecutive address.

I: Adds branch offset to the current address to calculate the branch destination.

E = Registers

  • When we describe this is also a collection of the registers.

• Any of the registers can be read or written by specifying the number of the register.

  • Contains the register state of the computer.

Read from register file

• 2 inputs to the register file specifying the numbers.

o 5 bits wide inputs for the 32 registers

• 2 outputs from the register file with the read values.

o 32 bits wide

  • For all instructions. Control signals are not required.

Write to register file

• 1 input to the register file specifying the number

▪ 5 bits wide inputs for the 32 registers

• 1input to the register file with the value to be written

▪ 32 bits wide

• Only for some instructions. RegWrite control signal. Control signals are required.

J = ALU

• Takes two 32 bits inputs and produces a 32 bits output.

• if the result is 0, then the sets one-bit signal.

• The operation done by ALU is controlled by 4 bits control signal input. This is set according to the instruction.

  • Performs arithmetic and logic operations.

K = Data Memory unit

• Stores program data

• State element with

•input for address and data to be written

•output for reading result

• Separate control for reading and writing.

  • Control for reading is required because reading from invalid addresses can lead to problems.

F= Sign-extension unit

  • The sign-extension unit takes 16 bits input and extends it to 32 bits output.

H= Shifter

• Performs shift by 2. To multiply a given branch offset by 4.

D,G,L = Multiplexer

• An ALU might need input from two registers or one register and one immediate field (or offset)

• To choose correctly from multiple sources, a hardware element called multiplexer is used with appropriate control signals.

  • The data written to registers may come from data memory or Arithmetic and Logic Unit.

D: Selects between the consecutive address and a branching address to be executed next.

G: select between a register stored value and a direct absolute value for the second operand.

L: Selects between loaded data from data memory and computed data from ALU to be written back to the registers.

--

--

Nirmani warakaulla
Nirmani warakaulla

Written by Nirmani warakaulla

Experienced UI/UX engineer deeply committed to creating impactful solutions through innovative design.

No responses yet