Comprehensive Study Notes: Control Unit Operation and Architecture
Processor Architecture Fundamentals and Functional Requirements
Processor Specification Elements: To define a processor's architecture and operation completely, six functional requirements must be identified:
Operations (Opcodes): Specified by the machine instruction set, defining the functional transformations the processor can execute.
Addressing Modes: Defined by the instruction set, dictating the mechanisms used to reference operands in registers or memory.
Registers: The internal storage structures of the CPU, including general-purpose, data, address, and status registers (e.g., Program Status Word).
I/O Module Interface: Typically specified via the system bus to manage data exchange with external peripheral modules.
Memory Module Interface: Defined by system bus specifications to govern command, address, and data transfers with main memory.
Interrupts: Defined partly by the system bus architecture and partly by the support provided to the operating system for handling asynchronous events.
Basic Functional Elements of a Processor: The internal physical and operational structure of a central processing unit comprises five core elements:
Arithmetic and Logic Unit (ALU): The functional execution core that performs arithmetic (addition, subtraction) and logical (AND, OR, complement) operations.
Registers: Internal memory cells that hold instructions, addresses, intermediate data, and processor status flags.
Internal Data Paths: High-speed communication links and buses used to transfer data between internal registers and between registers and the ALU.
External Data Paths: The system bus links (address lines, data lines, control lines) connecting the processor registers to main memory and I/O modules.
Control Unit (CU): The operational engine that coordinates all internal and external data movements, ALU functions, and execution sequencing by issuing binary control signals.
IAS Computer Register Architecture:

Program Counter (PC): Holds the memory address of the next instruction pair to be fetched from memory.
Memory Address Register (MAR): Specifies the active memory address for read or write operations over the address bus.
Memory Buffer Register (MBR): Holds data or instructions read from memory or stores data waiting to be written to memory.
Instruction Register (IR): Stores the 8-bit opcode of the instruction currently undergoing decoding and execution.
Instruction Buffer Register (IBR): Temporarily holds the right-hand (second) instruction from a fetched 40-bit memory word.
Accumulator (AC): Stores intermediate arithmetic and logic operands and results.
Multiplier-Quotient Register (MQ): Holds the multiplier during multiplication operations and the quotient during division operations.
Main Memory (): Structured as locations ranging from address to .
Primary Tasks of the Control Unit:
Sequencing: Driving the processor through a predetermined, orderly sequence of elementary operations based on the executing program.
Execution: Triggering the execution of each micro-operation by emitting specific binary control signals.
Micro-Operations and Instruction Cycle Subcycles
Nature of Micro-Operations: Micro-operations () are the atomic, functional operations of a processor. Program execution consists of a sequence of instruction cycles, where each instruction cycle decomposes into subcycles (Fetch, Indirect, Execute, Interrupt), and each subcycle consists of a succession of micro-operations.
Four Generic Categories of Micro-Operations:
Register-to-Register Transfer: Movement of binary data from one internal processor register to another via internal data paths.
Register-to-External Transfer: Movement of data from an internal register to an external interface (e.g., placing the contents of the MAR onto the system address bus).
External-to-Register Transfer: Latching data from an external interface into an internal register (e.g., reading from the data bus into the MBR).
Arithmetic or Logical Operations: Execution of an arithmetic or Boolean operation by the ALU using register contents as inputs and storing the result in a destination register.
Instruction Cycle Code (ICC):
A 2-bit processor register designated as the ICC defines the current subcycle of the instruction cycle:
00: Fetch Cycle01: Indirect Cycle10: Execute Cycle11: Interrupt CycleAt the conclusion of any subcycle, the ICC is updated to specify the subsequent subcycle.
The Indirect cycle is always directly followed by the Execute cycle ().
The Interrupt cycle is always directly followed by the Fetch cycle ().
The Fetch and Execute cycles transition conditionally depending on addressing mode bits and interrupt request lines.
Instruction Cycle Flowchart with ICC Tracking:

The Fetch Cycle: Transfers the instruction located at the memory address specified by the PC into the IR:
Symbolic micro-operation sequence:
(where represents the instruction length in addressable units).
Rules for clock cycle grouping:
Sequential Dependency: Preceding values must be established before dependent operations execute (e.g., must complete before because memory read hardware depends on the address stabilized in the MAR).
Conflict Avoidance: A register cannot be read from and written to during the exact same time unit if the result is unpredictable (e.g., and cannot occupy the same clock cycle).
Alternative Valid Grouping:
The Indirect Cycle: Fetches the effective address of an operand if indirect addressing is flagged in the instruction:
Symbolic sequence:
Following , the IR holds the direct effective address of the operand, identical to a direct-addressed instruction ready for execution.
The Interrupt Cycle: Saves processor context (specifically the return address held in the PC) and updates the PC to point to the Interrupt Service Routine (ISR):
Symbolic sequence:
Saving the remaining working registers and status flags is handled by software instructions within the ISR.
The Execute Cycle: Varies completely depending on the specific opcode decoded from the IR:
Add to Register Instruction (
ADD R1, X):Increment and Skip if Zero (
ISZ X):Branch and Save Address (
BSA X):
Micro-Operation Traces across Processor Addressing Modes
Immediate Addressing Mode Execution Trace:
Instruction:
MOV R1, 25H(Instruction length = 1; initial state: , ).Fetch Cycle:
Execute Cycle:
Final Values: , .
Register Addressing Mode Execution Trace:
Instruction:
MOV R1, R2(Instruction length = 1; initial state: , , ).Fetch Cycle:
Execute Cycle:
Final Values: , .
Direct Addressing Mode Execution Trace:
Instruction:
MOV R1, [2500H](Instruction length = 1; initial state: , , ).Fetch Cycle:
Execute Cycle:
Final Values: , , , , .
Implied Addressing Mode Execution Trace:
Instruction:
STC(Set Carry Flag; ).Fetch Cycle:
Execute Cycle:
Register Indirect Addressing Mode Execution Trace:
Load Instruction:
MOV R1, [R2](Initial state: , , , ):Store Instruction:
MOV [R2], R1(Stores content of R1 into memory location addressed by R2):(followed by a memory write cycle: ).
Arithmetic Variant:
ADD R1, [R2]:Cycles through are identical to
MOV R1, [R2].Cycle executes: .
Indexed Addressing Mode Execution Trace:
Data Movement:
MOV R1, [R2 + 100H](Initial state: , , , ):Final: , , , .
Arithmetic Operation:
ADD R1, [R2 + 100H](Initial state: , , , ):Final: , , , .
Internal Processor Organizations and Bus Architectures
Single-Bus CPU Organization with Temporary Registers Y and Z:

Direct interconnections across all registers require prohibitive routing complexity. An internal CPU bus routes data across all internal registers and the ALU.
Function of Register Y: The ALU is purely combinatorial logic with no internal storage. In a two-operand operation, one operand is fed via the shared bus while Register Y latches and stabilizes the second operand.
Function of Register Z: The output of a combinatorial ALU cannot be gated directly back onto the bus feeding its input without causing race conditions and electrical feedback instability. Register Z isolates and latches the output before writing to destination registers.
Micro-Operation Execution Trace with Registers Y and Z (Add Memory to AC):
Internal Bus Timing and Latency Calculations:
System parameters: Bus propagation delay = , ALU computation delay = , Register copy/latch time = .
Data transfer from one register to another via internal bus: Requires bus propagation plus register latching:
Operations involving the ALU must allocate time for bus traversal, register Y latching, ALU combinational settling, and register Z latching.
Control Unit Architecture, Inputs, and Interfacing
Block Diagram of the Control Unit:

External Control Unit Inputs:
Clock: Emits regular pulses defining time units (). The clock period must exceed worst-case signal propagation and stabilization times.
Instruction Register (IR): Supplies the current instruction opcode and addressing mode bits to determine which micro-operations execute.
Flags: 1-bit status indicators (Zero, Carry, Sign, Overflow) revealing previous ALU results; used for branch evaluation.
Control Bus Signals: Provides external inputs including interrupt requests () and acknowledgement lines.
External Control Unit Outputs:
Internal CPU Control Signals: Open/close register gating switches, drive data paths, and select ALU functions.
System Bus Control Signals: Drive memory read (), memory write (), and I/O command lines.
Reference Accumulator Datapath Model:

Control Signal Routing Assignments:
: Address bus MAR
: PC MBR
: PC MAR
: MBR PC
: MBR IR
: Data bus MBR
: MBR ALU input
: AC ALU input
: MBR MAR (or )
: ALU output AC
: MBR AC
: AC MBR
: MBR Data bus
: IR Control Unit
: Read control signal to external system bus
: Write control signal to external system bus
Hardwired Control Unit Design Methodologies
Architectural Classification:
Hardwired Implementation: Pure combinatorial and sequential digital logic circuits generate control signals. Features high speed; typical of RISC architectures.
Microprogrammed Implementation: Control signals are stored as binary words (microinstructions) in an on-chip control ROM. Features flexibility; typical of CISC architectures.
State Table Method:
The control unit is modeled as a tabular state machine:
Rows: Timing states ().
Columns: Distinct instructions ().
Cells (): Control signal(s) active for instruction during time state .
Advantages: Minimal, straightforward implementation suited for small instruction sets.
Drawbacks: Circuitry scales poorly; severe gate duplication across instructions; lacks modularity.
Delay Element (Flowchart) Method:
Hardware behavior is modeled directly from an instruction execution flowchart.
Each micro-operation occupies one clock state (-state).
To guarantee a delay of exactly one -state between consecutive control signals, D flip-flops serve as delay elements.
One-Hot Encoding: Out of all D flip-flops in the control network, exactly one flip-flop is active (stores logic 1) at any given clock state.
Multiple Entry Points: When two or more execution paths merge into a single control point, an OR gate combines the signals:

Decision Boxes: A decision diamond in the flowchart is converted to two complementing AND gates controlled by the condition variable ( and ):

Advantage: Re-utilizes shared paths across instruction subcycles, reducing redundant gate counts.
Drawback: Flip-flop counts scale linearly with execution path lengths, raising hardware cost while leaving most flip-flops idle.
Sequence Counter Method:

The dominant hardwired control unit topology, replacing individual D flip-flops with a centralized counter.
Modulo- Sequence Counter (SC): Increments once per clock pulse via an AND gate to sequence through timing states ().
Timing Decoder ( or ): Converts the binary counter state into distinct, mutually exclusive timing signals ( through ).
Instruction Decoder (): Decodes opcode bits () into discrete instruction lines ( through ).
Control Logic Gates: Combinatorial AND-OR matrix synthesizing active outputs () by combining instruction lines, timing pulses, addressing flags (), and status conditions.
Reset/Clear Logic: An instruction completion signal asserts the counter Clear (CLR) input, resetting the counter to for the next instruction.
General Drawbacks of Hardwired Control Units:
Complexity Scaling: Circuit complexity grows exponentially with instruction set size, rendering hardwiring impractical for complex modern processors.
Debugging Difficulty: Once etched in silicon, debugging errors in large combinatorial gate arrays requires expensive redesign.
Architectural Rigidity: Upgrading or altering instructions requires a complete physical layout redesign.
Hardwired Control Synthesis: Worked Problems and Derivations
Derivation of Control Signal (Memory-to-MBR Data Bus Transfer):
Cycle encoding: (Fetch), (Indirect), (Execute), (Interrupt).
Active conditions in reference datapath:
During Fetch cycle at :
During Indirect cycle at :
Combining Fetch and Indirect cycles:
Incorporating Execute cycle reads for memory-reading instructions (
LDA,ADD,AND):
Synthesis Example:
LOAD 200() andSTORE 300():Micro-operation breakdown:
LOAD 200():(Active: )
(Active: )
(Active: )
STORE 300():(Active: )
(Active: )
(Active: )
Boolean expressions for active signals:
Gate implementation schematic:

Synthesis Example:
LOAD 200() andADD 300():Micro-operations for
ADD 300():(Active: )
(Active: )
(Active: )
Shared datapath Boolean equations:
Synthesis Example:
ADD 200() andSUB 300():Both instructions utilize identical datapath control lines across execution subcycles:
(Active: )
(Active: )
(Active: )
Synthesized Boolean expressions:
Microprogrammed Control Unit Architecture
Core Principle: Control signals are stored as binary words (microinstructions) organized into microprograms within a specialized control memory (ROM), replacing combinatorial gate arrays.
Wilkes' Microprogrammed Design (1951):
Control Memory (CM): Storage matrix where each row represents one microinstruction.
Control Memory Address Register (CMAR): Latches the address of the microinstruction to be accessed.
Decoder: Converts the address in CMAR into a single line selection driving control memory.
Control Field: Emits dedicated binary signals ( through ) directly activating functional CPU paths.
Address Field: Supplies the base address of the subsequent microinstruction.
Status Flag: Evaluated by conditional branch gates to determine whether to select the sequential or branched address.
Operational Cycle: Machine opcode loads into CMAR Decoder selects CM line Control signals activate Next address field latches into CMAR conditioned on status flags Loop continues until execution terminates.
Modern Microprogrammed Architecture (Using Microprogram Counter):
Microprogram Counter ( / CMAR): Tracks active microinstruction locations.
Incrementer (): Generates sequential next addresses () without requiring an explicit next-address field inside every microinstruction.
Multiplexer (MUX) and Branch Logic: Selects between the incremented address, a branch target address, or an opcode mapping address based on status flag inputs.
Operational Sequence:
Machine instruction fetched from memory into IR.
Opcode maps to microprogram entry address, loaded into .
Microinstruction read from Control Memory into Microinstruction Register (.
Control field triggers micro-operations.
Non-branching microinstructions increment .
Unconditional branch loads target address into .
Conditional branch tests MUX-selected flag: if true, branch address is loaded; if false, increments.
Horizontal vs. Vertical Microinstructions:


Structural Comparison of Microinstruction Formats:
Bit Correspondence: In horizontal microinstructions, every bit maps directly to a distinct control signal. In vertical microinstructions, bits are encoded into fields requiring decoding.
Decoder Requirement: Horizontal requires no decoder; vertical requires combinational decoders (e.g., decoder).
Signal Capacity: In horizontal, bits yield control signals. In vertical, encoded bits can yield up to control signals.
Simultaneous Signal Generation: Horizontal microinstructions can fire multiple control signals simultaneously in a single cycle. Vertical formats can fire only one signal per encoded field per cycle.
Memory Dimensional Growth: As total control signals increase, horizontal control memory grows wider (horizontal growth). Vertical control memory requires more microinstructions to fire sequential signals, growing deeper (vertical growth).
Execution Speed: Horizontal executes faster due to zero decoding delay. Vertical executes slower due to decoder propagation delays.
Word Width and Memory Volume: Horizontal microinstructions are wide, resulting in large overall control memory bit volume. Vertical microinstructions are narrow, optimizing memory storage density.
Circuit Complexity: Horizontal circuitry is simpler (direct wiring). Vertical circuitry is more complex due to decoding logic.
Advanced Control Paradigms: Two-Level Control and Nanoprogramming
Motivation: Horizontal microprogramming provides fast, parallel signal activation but wastes memory with wide, sparse control words. Vertical microprogramming saves space but sacrifices speed and parallel signal generation. Nanoprogramming combines both into a two-level hierarchy.
Two-Level Control Memory Organization:
Microcontrol Memory (): Stores vertically encoded, highly compacted microinstructions. Addressed by the Microprogram Counter () and latched into the Microinstruction Register ().
Nanocontrol Memory (): Stores unique, wide horizontal nanoinstructions containing raw control patterns. Addressed by the Nanoprogram Counter () and latched into the Nanoinstruction Register ().
Step-by-Step Nanoprogramming Execution:
Fetch Instruction: Processor loads machine instruction into IR.
Microprogram Selection: Opcode specifies starting address loaded into .
Fetch Microinstruction: selects vertical word from into .
Decode Microinstruction: Vertical bits are decoded to produce a pointer to the required horizontal word in .
Select Nanoinstruction: latches this pointer to address .
Generate Control Signals: Nanoinstruction enters ; wide horizontal bit fields directly assert parallel control signals across the CPU datapath.
Continue Execution: Sequencing logic advances and through subsequent micro- and nano-steps.
Advantages of Nanoprogramming:
Massive Storage Optimization: Eliminates bit duplication in control memory when identical control signal patterns repeat across different microinstructions.
Parallelism Preservation: Retains the ability of horizontal control words to activate multiple execution units simultaneously.
Architectural Compromise: Achieves an optimal balance between the compactness of vertical microcode and the raw performance of horizontal microcode.
Comprehensive Processor Case Study: Intel 8085 Architecture
Intel 8085 Microprocessor Block Diagram:

Internal Component Architecture:
ALU & Accumulator: 8-bit computational core paired with an 8-bit accumulator and an 8-bit temporary register.
Flags Register: 8-bit register holding status indicators reflecting ALU operation outcomes.
Instruction Register & Decoder: 8-bit IR feeding an instruction decoder that drives the internal timing and control unit.
General-Purpose Register Array: Includes six 8-bit working registers () that can be paired as 16-bit register pairs ().
Specialized 16-Bit Registers: Program Counter (PC) and Stack Pointer (SP).
Incrementer/Decrementer Address Latch: Dedicated 16-bit logic that directly increments or decrements the PC or SP, bypassing the ALU to prevent execution stalls.
Serial I/O Controller: Provides 1-bit communication lines via Serial Input Data (SID) and Serial Output Data (SOD).
Interrupt Controller: Manages multiple priority-ordered hardware interrupt inputs.
External Signal Classifications and Pin Functions:
Address and Data Lines:
High Address (): High-order 8 bits of the 16-bit address space (unidirectional).
Address/Data Bus (): Time-multiplexed low-order 8 bits of the address and 8-bit bidirectional data bus, reducing physical pin counts.
Timing and Control Lines:
Clock Signals (): Inputs connected to an external crystal driving the internal clock generator.
: System clock output providing synchronization pulses for external peripheral devices.
Address Latch Enable (ALE): Emitted during the first clock state () of a machine cycle; its falling edge latches the multiplexed address lines () into external latches.
Status Lines (): Output signals specifying read, write, or fetch operations.
: Distinguishes between I/O operations (logic 1) and memory operations (logic 0).
Read Control (): Active-low signal indicating the addressed memory or I/O device is to be read onto the data bus.
Write Control (): Active-low signal indicating data on the bus is to be written into the addressed location.
Bus Arbitration and Handshaking Lines:
HOLD: Requests the CPU to float its address, data, and control lines for Direct Memory Access (DMA).
Hold Acknowledge (HLDA): Confirms the CPU has entered a hold state, granting bus mastership.
READY: Synchronizes the CPU with slow memories or peripherals; when low, the CPU enters wait states.
Interrupt Request Lines (Descending Priority Order):
TRAP: Highest priority; non-maskable restart interrupt.
RST 7.5: High-priority maskable restart interrupt.
RST 6.5: Medium-priority maskable restart interrupt.
RST 5.5: Lower-priority maskable restart interrupt.
INTR: General-purpose interrupt request line.
: Interrupt acknowledge output issued by the control unit.
System Initialization and Power:
: Active-low input resetting the PC to .
: Acknowledges processor reset and synchronizes system-wide resets.
and : power supply and electrical ground connections.
8085 Timing Hierarchy and Machine Cycle Structure:
Hierarchy: Instruction Cycle Machine Cycles ( to per instruction) States ( to -states per machine cycle).
State Definition: Each -state corresponds to exactly one clock cycle.
Machine Cycle Definition: Equivalent to an external bus transaction (e.g., Opcode Fetch, Memory Read, Memory Write, I/O Read, I/O Write).
Execution Example:
OUTInstruction Timing (3 Machine Cycles: ):(Opcode Fetch):
: The control unit sets and emits an ALE pulse. The PC outputs the upper address on and lower address on . On the trailing edge of ALE, external latches capture the address.
: The control unit asserts . The memory module places the instruction opcode on the bus.
: The data bus contents are latched into the processor's IR; is negated.
: Bus idle state; internal logic decodes the fetched
OUTopcode.
(Memory Read): Fetches the 8-bit port address byte from memory.
(Output Write): Asserts , places the port address on the address lines, gates the Accumulator data onto , and pulses to complete the I/O transfer.