Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Module - 3

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 13

MODULE -3

CONTROL UNIT AND INPUT/OUTPUT


Control Unit: Micro operations, Control of the processor – Functional
requirements, Control signals, Internal processor organization;
Hardwired implementation, Microinstructions, Microprogrammed
control unit, Micro instruction sequencing – Design considerations,
sequencing techniques, Address generation; Micro instruction
execution- A taxonomy of microinstructions, Microinstruction encoding.

Input/Output: External devices, I/O modules, Direct memory access


function, I/O Channels and Processors, PCI Physical and Logical
Architecture
Micro operations
A micro-operation refers to the smallest tasks performed by the CPU’s control unit.
These micro-operations helps to execute complex instructions. They involve simple
tasks like moving data between registers, performing arithmetic calculations, or
executing logic operations. Each micro-operation is completed in a single clock cycle.

These are low level instructions used in some designs to implement complex machine
instructions. They generally perform operations on data stored in one or more registers.
In executing a program, operation of a computer consists of a sequence of instruction
cycles, with one machine instruction per cycle. Each instruction cycle is made up of a
number of smaller units – Fetch, Decode, Execute and Interrupt cycles.
Micro operations
Examples of Micro-Operations:
1. Load: Moves data from memory into a register.
2. Store: Saves data from a register back into memory.
3. Add: Adds two values and stores the result in a register.
4. Subtract: Subtracts one value from another and stores the result in a register.
5. AND: Performs a logical AND operation on two values and stores the result in
a register.
6. OR: Performs a logical OR operation on two values and stores the result in a
register.
7. NOT: Reverses the bits of a value and stores the result in a register.
8. Shift: Moves the bits of a value to the left or right within a register.
9. Rotate: Rotates the bits of a value left or right in a register.

Micro-Operations Working: Example ADD a,b


1. First, a load operation to move values into registers.
2. Then, an add operation to perform the calculation.
3. Finally, a store operation to save the result in memory.
Control of the processor
Control Unit (CU) is a critical component of a computer’s CPU (Central Processing
Unit). It acts as the brain within the brain, managing and directing the operations of
the CPU and coordinating how data moves through the system.

Functions of the Control Unit:


1. Instruction Fetching: Retrieves instructions from memory.
2. Instruction Decoding: Interprets the instruction and determines the required
actions.
3. Control Signal Generation: Sends control signals to other components of the
CPU, like the ALU (Arithmetic Logic Unit), memory, and input/output
devices.
4. Execution Coordination: Ensures that the execution of instructions occurs in
the correct sequence.
5. Data Flow Management: Directs the flow of data between the CPU, memory,
and input/output devices.

Types of Control Units:


6. Hardwired Control Unit: Uses fixed logic circuits to control signals. It's fast
but less flexible.
7. Microprogrammed Control Unit: Uses microinstructions stored in memory
to generate control signals. It's more flexible and easier to modify.
Functional requirements
The control unit (CU) is a core part of the CPU (Central Processing Unit) that
manages the execution of instructions and coordinates the activities of the entire
computer system. Its functional requirements outline the specific tasks the CU must
perform to ensure the CPU operates correctly and efficiently.
Functional requirements
Instruction Fetching: The control unit must retrieve instructions from memory,
based on the address stored in the Program Counter (PC). It ensures the correct
instruction is fetched at the right time.

Instruction Decoding:Decodes the fetched instruction to determine the operation type


(e.g., addition, data transfer). Identifies the required operands and addressing modes.

Control Signal Generation: Sends control signals to other parts of the CPU, such as
the ALU (Arithmetic Logic Unit), registers, and memory. These signals activate
specific circuits to execute the decoded instruction.

Data Flow Control: Directs the movement of data between memory, registers, and the
ALU. Ensures the correct data is used and stored during operations.

Timing and Synchronization: Maintains proper timing for all operations using the
system clock. Ensures the CPU components work in harmony without conflicts.
Functional requirements

Execution Control: Activates the ALU or other functional units to perform the
operation specified in the instruction (e.g., arithmetic, logical, or shift operations).

Control of Program Flow: Manages control flow instructions like jumps, branches,
and loops, ensuring the program counter is updated correctly. Handles subroutine calls
and returns.

Interrupt and Exception Handling: Detects and responds to interrupts (external


events) or exceptions (errors). Temporarily suspends normal instruction execution to
handle the interrupt or error, then resumes where it left off.

Pipelining Support (if applicable): In modern CPUs, coordinates the execution of


multiple instructions simultaneously in a pipeline. Manages dependencies and ensures
smooth execution in different pipeline stages.

Power Management: Optimizes energy usage by selectively activating or deactivating


components based on workload.
Control signals
Internal processor organization
Microprocessor 8085 . It is a general purpose 8 bit microprocessor. This
microprocessor was first designed in 1977 by intel.

The basic configuration of 8085 are


1.Data bus of 8 bit
2.Address bus of 16 bit
3.Stack pointer of 16 bit
4.Program counter of 16 bit
5.Six registers of 8 bit. Arranged in three pair : BC, DE, HL.
6.It works at 5 V DC supply when operated at 3.2 MHz clock of single phase.

Functional units of microprocessor 8085:

1. Arithmetic and logic unit ( ALU ):This function is used to perform all kind of
arithmetic and logical operations on 8 bit data. The arithmetic operations include
addition, subtraction, division & multiplication. The logical operation includes AND,
OR , NOT, etc.
Internal processor organization
2. General purpose register: Microprocessor 8085 has 6 general purpose registers.
Names as B, C, D, E, H & L. each register has a capacity to store 8 bit data.
These registers can hold 16 bit data by working in pairs. The registers are pared like
BC, DE, HL.

3. Accumulator: Accumulator is an 8 bit register. It is used to perform input output


( I/O ), logical and arithmetic operations. It is connected to Arithmetic Logic Unit
( ALU ) and internal data bus. The accumulator is also known as heart of
microprocessor. It is because for most of the operations that are carried by different
instructions are stored in accumulator after performance.

4. Program counter: Program counter is a 16-bit register used to store the location of
memory address of the next instruction that needs to be executed.

5. Temporary register: Temporary register is a 8 bit register which holds the data of
arithmetic and logical operations temporarily.
Internal processor organization
6. Flag register:Flag register is a 8 bit register having 5 flip flops of 1 bit. These flip
flops hold digital value, either 0 or 1 that depends upon the result stored in
accumulator.
The five 1 bit flip flops are known as
Sign (S) flag
Zero (Z) flag
Auxiliary Carry (AC) flag
Parity (P) flag
carry (CY) flag

7. Instruction register and decoder: This register is of 8 bit. An instruction register


stores the instruction that is fetched from memory.

8. Stack pointer: Stack pointer is a 16 bit register that works like stack. This pointer is
used for stack related operations like push and pop operations. The address of only one
data is required, that is at the top.
Internal processor organization
9. Timing and control unit: The microprocessor gets timing and control signals from
this unit.
The timing and control signals are –
Control Signals – RD’, WR’, ALE, READY
DMA Signals – HLDA, HOLD
Status Signals – IO/M’, S0, S1
Reset Signals – RESET OUT, RESET IN

10. Serial input/output control: It uses two instructions – SOD ( Serial Output Data )
& SID ( Serial Input Data ) to control serial data communication.

11. Interrupt control:Interrupt control signal controls the interrupts during processing.
Whenever an interrupt occurs in a microprocessor during executing a main program, it
shifts the control from main program to process the incoming interrupt request. The
control again goes back to main program after the request is completed.

You might also like