IFT 212 Data Path and Control Unit Design
IFT 212 Data Path and Control Unit Design
Learning Outcomes:
Understand the components and functionality of the data path.
Explain the role of the control unit in CPU operation.
Describe the interaction between the data path and control unit.
Analyze hardwired and microprogrammed control unit designs.
Introduction to Data Path and Control Unit
• Data Path: The data path is the collection of functional units (e.g.,
ALU, registers, buses) that perform data processing and transfer
operations.
• Interaction: The control unit uses the instruction opcode and timing
signals to generate control signals that operate the data path.
Components of the Data Path
• The data path consists of the following key components:
1. Registers:
1. Store data temporarily during processing.
2. Examples: Program Counter (PC), Instruction Register (IR), General-Purpose Registers (R0, R1, etc.).
2. Arithmetic Logic Unit (ALU):
1. Performs arithmetic (e.g., ADD, SUB) and logical (e.g., AND, OR) operations.
3. Buses:
1. Data Bus: Transfers data between components.
2. Address Bus: Transfers memory addresses.
3. Control Bus: Transfers control signals.
4. Multiplexers (MUX):
Select between multiple input sources for a single output.
5. Memory Unit:
Stores instructions and data.
6. Program Counter (PC):
Holds the address of the next instruction to be executed.
7. Instruction Register (IR):
Holds the current instruction being executed.
Data Path Operation
• Instruction Execution Cycle:
• Fetch:
• The PC sends the address of the next instruction to memory.
• The instruction is fetched and stored in the IR.
• Decode:
• The control unit decodes the instruction opcode.
• Execute:
• The control unit generates control signals to operate the data path.
• The ALU performs the required operation.
• Writeback:
• The result is written to a register or memory.
• Example: Executing an ADD instruction:
• Fetch the instruction.
• Decode the opcode and operands.
• Read operands from registers.
• Perform addition using the ALU.
• Write the result to the destination register.
Control Unit Design
• The control unit generates control signals based on the instruction
opcode and timing signals. It can be implemented in two ways:
A. Hardwired Control
• Definition: Control signals are generated using combinational logic
circuits.
• Design:
• Logic gates, decoders, and encoders are used to generate control signals.
• The control logic is fixed and optimized for speed.
• Advantages:
• Fast operation.
• Efficient for simple instruction sets.
• Disadvantages:
• Inflexible; difficult to modify or extend.
• Complex to design for large instruction sets.
Control Unit Design
B. Microprogrammed Control
• Definition: Control signals are generated using a sequence of
microinstructions stored in control memory.
• Design:
• Control memory (ROM) stores microinstructions.
• A microprogram counter (MPC) sequences through the microinstructions.
• Each microinstruction specifies the control signals for one clock cycle.
• Advantages:
• Flexible and easy to modify or extend.