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:   

    IAS Computer Internal 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 (MM): Structured as 40964096 locations ranging from address M(0)M(0) to M(4095)M(4095).

  • 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 (μOPs\mu\text{OPs}) 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 Cycle

    • 01: Indirect Cycle

    • 10: Execute Cycle

    • 11: Interrupt Cycle

    • At 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 (ICC=10\text{ICC} = 10).

    • The Interrupt cycle is always directly followed by the Fetch cycle (ICC=00\text{ICC} = 00).

    • The Fetch and Execute cycles transition conditionally depending on addressing mode bits and interrupt request lines.

  • Instruction Cycle Flowchart with ICC Tracking:   

    Instruction Cycle State Flowchart
  • The Fetch Cycle: Transfers the instruction located at the memory address specified by the PC into the IR:

    • Symbolic micro-operation sequence:

    • t1:MAR←(PC)t_1: \text{MAR} \leftarrow (\text{PC})

    • t2:MBR←Memory,PC←(PC)+It_2: \text{MBR} \leftarrow \text{Memory}, \quad \text{PC} \leftarrow (\text{PC}) + I

    • t3:IR←(MBR)t_3: \text{IR} \leftarrow (\text{MBR})

    • (where II 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., MAR←(PC)\text{MAR} \leftarrow (\text{PC}) must complete before MBR←Memory\text{MBR} \leftarrow \text{Memory} 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., MBR←Memory\text{MBR} \leftarrow \text{Memory} and IR←(MBR)\text{IR} \leftarrow (\text{MBR}) cannot occupy the same clock cycle).

    • Alternative Valid Grouping:

      • t1:MAR←(PC)t_1: \text{MAR} \leftarrow (\text{PC})

      • t2:MBR←Memoryt_2: \text{MBR} \leftarrow \text{Memory}

      • t3:PC←(PC)+I,IR←(MBR)t_3: \text{PC} \leftarrow (\text{PC}) + I, \quad \text{IR} \leftarrow (\text{MBR})

  • The Indirect Cycle: Fetches the effective address of an operand if indirect addressing is flagged in the instruction:

    • Symbolic sequence:

    • t1:MAR←(IR(Address))t_1: \text{MAR} \leftarrow (\text{IR}(\text{Address}))

    • t2:MBR←Memoryt_2: \text{MBR} \leftarrow \text{Memory}

    • t3:IR(Address)←(MBR(Address))t_3: \text{IR}(\text{Address}) \leftarrow (\text{MBR}(\text{Address}))

    • Following t3t_3, 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:

    • t1:MBR←(PC)t_1: \text{MBR} \leftarrow (\text{PC})

    • t2:MAR←Save_Address,PC←Routine_Addresst_2: \text{MAR} \leftarrow \text{Save\_Address}, \quad \text{PC} \leftarrow \text{Routine\_Address}

    • t3:Memory←(MBR)t_3: \text{Memory} \leftarrow (\text{MBR})

    • 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):

    • t1:MAR←(IR(address))t_1: \text{MAR} \leftarrow (\text{IR}(\text{address}))

    • t2:MBR←Memoryt_2: \text{MBR} \leftarrow \text{Memory}

    • t3:R1←(R1)+(MBR)t_3: \text{R1} \leftarrow (\text{R1}) + (\text{MBR})

    • Increment and Skip if Zero (ISZ X):

    • t1:MAR←(IR(address))t_1: \text{MAR} \leftarrow (\text{IR}(\text{address}))

    • t2:MBR←Memoryt_2: \text{MBR} \leftarrow \text{Memory}

    • t3:MBR←(MBR)+1t_3: \text{MBR} \leftarrow (\text{MBR}) + 1

    • t4:Memory←(MBR),if ((MBR)=0) then (PC←(PC)+I)t_4: \text{Memory} \leftarrow (\text{MBR}), \quad \text{if } ((\text{MBR}) = 0) \text{ then } (\text{PC} \leftarrow (\text{PC}) + I)

    • Branch and Save Address (BSA X):

    • t1:MAR←(IR(address)),MBR←(PC)t_1: \text{MAR} \leftarrow (\text{IR}(\text{address})), \quad \text{MBR} \leftarrow (\text{PC})

    • t2:PC←(IR(address)),Memory←(MBR)t_2: \text{PC} \leftarrow (\text{IR}(\text{address})), \quad \text{Memory} \leftarrow (\text{MBR})

    • t3:PC←(PC)+It_3: \text{PC} \leftarrow (\text{PC}) + I

Micro-Operation Traces across Processor Addressing Modes

  • Immediate Addressing Mode Execution Trace:

    • Instruction: MOV R1, 25H (Instruction length = 1; initial state: R1=0000HR1 = 0000\text{H}, PC=1000HPC = 1000\text{H}).

    • Fetch Cycle:

    • T1:MAR←PC  ⟹  MAR=1000HT_1: \text{MAR} \leftarrow \text{PC} \implies \text{MAR} = 1000\text{H}

    • T2:MBR←Memory  ⟹  MBR=MOV R1, 25HT_2: \text{MBR} \leftarrow \text{Memory} \implies \text{MBR} = \text{MOV R1, 25H}

    • T3:IR←MBR  ⟹  IR=MOV R1, 25HT_3: \text{IR} \leftarrow \text{MBR} \implies \text{IR} = \text{MOV R1, 25H}

    • T3:PC←PC+1  ⟹  PC=1001HT_3: \text{PC} \leftarrow \text{PC} + 1 \implies \text{PC} = 1001\text{H}

    • Execute Cycle:

    • T4:R1←25H(IR)  ⟹  R1=0025HT_4: \text{R1} \leftarrow 25\text{H} (\text{IR}) \implies \text{R1} = 0025\text{H}

    • Final Values: R1=0025HR1 = 0025\text{H}, PC=1001HPC = 1001\text{H}.

  • Register Addressing Mode Execution Trace:

    • Instruction: MOV R1, R2 (Instruction length = 1; initial state: R1=1250HR1 = 1250\text{H}, R2=3A40HR2 = 3A40\text{H}, PC=2000HPC = 2000\text{H}).

    • Fetch Cycle:

    • T1:MAR←PC  ⟹  MAR=2000HT_1: \text{MAR} \leftarrow \text{PC} \implies \text{MAR} = 2000\text{H}

    • T2:MBR←Memory  ⟹  MBR=MOV R1, R2T_2: \text{MBR} \leftarrow \text{Memory} \implies \text{MBR} = \text{MOV R1, R2}

    • T3:IR←MBR  ⟹  IR=MOV R1, R2T_3: \text{IR} \leftarrow \text{MBR} \implies \text{IR} = \text{MOV R1, R2}

    • T3:PC←PC+1  ⟹  PC=2001HT_3: \text{PC} \leftarrow \text{PC} + 1 \implies \text{PC} = 2001\text{H}

    • Execute Cycle:

    • T4:R1←R2  ⟹  R1=3A40HT_4: \text{R1} \leftarrow \text{R2} \implies \text{R1} = 3A40\text{H}

    • Final Values: R1=3A40HR1 = 3A40\text{H}, PC=2001HPC = 2001\text{H}.

  • Direct Addressing Mode Execution Trace:

    • Instruction: MOV R1, [2500H] (Instruction length = 1; initial state: R1=0000HR1 = 0000\text{H}, PC=1000HPC = 1000\text{H}, Memory[2500H]=4F2AH\text{Memory}[2500\text{H}] = 4F2A\text{H}).

    • Fetch Cycle:

    • T1:MAR←PC  ⟹  MAR=1000HT_1: \text{MAR} \leftarrow \text{PC} \implies \text{MAR} = 1000\text{H}

    • T2:MBR←Memory  ⟹  MBR=MOV R1, [2500H]T_2: \text{MBR} \leftarrow \text{Memory} \implies \text{MBR} = \text{MOV R1, [2500H]}

    • T3:IR←MBR  ⟹  IR=MOV R1, [2500H]T_3: \text{IR} \leftarrow \text{MBR} \implies \text{IR} = \text{MOV R1, [2500H]}

    • T3:PC←PC+1  ⟹  PC=1001HT_3: \text{PC} \leftarrow \text{PC} + 1 \implies \text{PC} = 1001\text{H}

    • Execute Cycle:

    • T4:MAR←IR(2500H)  ⟹  MAR=2500HT_4: \text{MAR} \leftarrow \text{IR}(2500\text{H}) \implies \text{MAR} = 2500\text{H}

    • T5:MBR←Memory  ⟹  MBR=4F2AHT_5: \text{MBR} \leftarrow \text{Memory} \implies \text{MBR} = 4F2A\text{H}

    • T6:R1←MBR  ⟹  R1=4F2AHT_6: \text{R1} \leftarrow \text{MBR} \implies \text{R1} = 4F2A\text{H}

    • Final Values: MAR=2500H\text{MAR} = 2500\text{H}, MBR=4F2AH\text{MBR} = 4F2A\text{H}, IR=MOV R1, [2500H]\text{IR} = \text{MOV R1, [2500H]}, R1=4F2AHR1 = 4F2A\text{H}, PC=1001HPC = 1001\text{H}.

  • Implied Addressing Mode Execution Trace:

    • Instruction: STC (Set Carry Flag; CF←1\text{CF} \leftarrow 1).

    • Fetch Cycle:

    • T1:MAR←PCT_1: \text{MAR} \leftarrow \text{PC}

    • T2:MBR←MemoryT_2: \text{MBR} \leftarrow \text{Memory}

    • T3:IR←MBR,PC←PC+1T_3: \text{IR} \leftarrow \text{MBR}, \quad \text{PC} \leftarrow \text{PC} + 1

    • Execute Cycle:

    • T4:CF←1T_4: \text{CF} \leftarrow 1

  • Register Indirect Addressing Mode Execution Trace:

    • Load Instruction: MOV R1, [R2] (Initial state: R1=0000HR1 = 0000\text{H}, R2=3000HR2 = 3000\text{H}, PC=1000HPC = 1000\text{H}, Memory[3000H]=4F2AH\text{Memory}[3000\text{H}] = 4F2A\text{H}):

    • T1:MAR←PC  ⟹  MAR=1000HT_1: \text{MAR} \leftarrow \text{PC} \implies \text{MAR} = 1000\text{H}

    • T2:MBR←MemoryT_2: \text{MBR} \leftarrow \text{Memory}

    • T3:IR←MBR,PC←PC+1  ⟹  PC=1001HT_3: \text{IR} \leftarrow \text{MBR}, \quad \text{PC} \leftarrow \text{PC} + 1 \implies \text{PC} = 1001\text{H}

    • T4:MAR←R2  ⟹  MAR=3000HT_4: \text{MAR} \leftarrow \text{R2} \implies \text{MAR} = 3000\text{H}

    • T5:MBR←Memory([R2])  ⟹  MBR=4F2AHT_5: \text{MBR} \leftarrow \text{Memory}([\text{R2}]) \implies \text{MBR} = 4F2A\text{H}

    • T6:R1←MBR  ⟹  R1=4F2AHT_6: \text{R1} \leftarrow \text{MBR} \implies \text{R1} = 4F2A\text{H}

    • Store Instruction: MOV [R2], R1 (Stores content of R1 into memory location addressed by R2):

    • T1:MAR←PCT_1: \text{MAR} \leftarrow \text{PC}

    • T2:MBR←MemoryT_2: \text{MBR} \leftarrow \text{Memory}

    • T3:IR←MBR,PC←PC+1T_3: \text{IR} \leftarrow \text{MBR}, \quad \text{PC} \leftarrow \text{PC} + 1

    • T4:MAR←R2T_4: \text{MAR} \leftarrow \text{R2}

    • T5:MBR←R1T_5: \text{MBR} \leftarrow \text{R1}

    • (followed by a memory write cycle: Memory←(MBR)\text{Memory} \leftarrow (\text{MBR})).

    • Arithmetic Variant: ADD R1, [R2]:

    • Cycles T1T_1 through T5T_5 are identical to MOV R1, [R2].

    • Cycle T6T_6 executes: T6:R1←R1+MBRT_6: \text{R1} \leftarrow \text{R1} + \text{MBR}.

  • Indexed Addressing Mode Execution Trace:

    • Data Movement: MOV R1, [R2 + 100H] (Initial state: R1=0000HR1 = 0000\text{H}, R2=2000HR2 = 2000\text{H}, PC=1000HPC = 1000\text{H}, Memory[2100H]=5A20H\text{Memory}[2100\text{H}] = 5A20\text{H}):

    • T1:MAR←PC  ⟹  MAR=1000HT_1: \text{MAR} \leftarrow \text{PC} \implies \text{MAR} = 1000\text{H}

    • T2:MBR←MemoryT_2: \text{MBR} \leftarrow \text{Memory}

    • T3:IR←MBR,PC←PC+1  ⟹  PC=1001HT_3: \text{IR} \leftarrow \text{MBR}, \quad \text{PC} \leftarrow \text{PC} + 1 \implies \text{PC} = 1001\text{H}

    • T4:MAR←R2+100H  ⟹  MAR=2100HT_4: \text{MAR} \leftarrow \text{R2} + 100\text{H} \implies \text{MAR} = 2100\text{H}

    • T5:MBR←Memory  ⟹  MBR=5A20HT_5: \text{MBR} \leftarrow \text{Memory} \implies \text{MBR} = 5A20\text{H}

    • T6:R1←MBR  ⟹  R1=5A20HT_6: \text{R1} \leftarrow \text{MBR} \implies \text{R1} = 5A20\text{H}

    • Final: MAR=2100H\text{MAR} = 2100\text{H}, MBR=5A20H\text{MBR} = 5A20\text{H}, R1=5A20HR1 = 5A20\text{H}, PC=1001HPC = 1001\text{H}.

    • Arithmetic Operation: ADD R1, [R2 + 100H] (Initial state: R1=2A35HR1 = 2A35\text{H}, R2=3150HR2 = 3150\text{H}, PC=1200HPC = 1200\text{H}, Memory[3250H]=4C27H\text{Memory}[3250\text{H}] = 4C27\text{H}):

    • T1:MAR←PC  ⟹  MAR=1200HT_1: \text{MAR} \leftarrow \text{PC} \implies \text{MAR} = 1200\text{H}

    • T2:MBR←MemoryT_2: \text{MBR} \leftarrow \text{Memory}

    • T3:IR←MBR,PC←PC+1  ⟹  PC=1201HT_3: \text{IR} \leftarrow \text{MBR}, \quad \text{PC} \leftarrow \text{PC} + 1 \implies \text{PC} = 1201\text{H}

    • T4:MAR←R2+100H  ⟹  MAR=3250HT_4: \text{MAR} \leftarrow \text{R2} + 100\text{H} \implies \text{MAR} = 3250\text{H}

    • T5:MBR←Memory  ⟹  MBR=4C27HT_5: \text{MBR} \leftarrow \text{Memory} \implies \text{MBR} = 4C27\text{H}

    • T6:R1←R1+MBR  ⟹  R1=2A35H+4C27H=765CHT_6: \text{R1} \leftarrow \text{R1} + \text{MBR} \implies \text{R1} = 2A35\text{H} + 4C27\text{H} = 765C\text{H}

    • Final: MAR=3250H\text{MAR} = 3250\text{H}, MBR=4C27H\text{MBR} = 4C27\text{H}, R1=765CHR1 = 765C\text{H}, PC=1201HPC = 1201\text{H}.

Internal Processor Organizations and Bus Architectures

  • Single-Bus CPU Organization with Temporary Registers Y and Z:   

    Single-Bus Internal CPU Architecture
    • 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):

    • t1:MAR←(IR(address))t_1: \text{MAR} \leftarrow (\text{IR}(\text{address}))

    • t2:MBR←Memoryt_2: \text{MBR} \leftarrow \text{Memory}

    • t3:Y←(MBR)t_3: \text{Y} \leftarrow (\text{MBR})

    • t4:Z←(AC)+(Y)t_4: \text{Z} \leftarrow (\text{AC}) + (\text{Y})

    • t5:AC←(Z)t_5: \text{AC} \leftarrow (\text{Z})

  • Internal Bus Timing and Latency Calculations:

    • System parameters: Bus propagation delay = 20 ns20\,\text{ns}, ALU computation delay = 100 ns100\,\text{ns}, Register copy/latch time = 10 ns10\,\text{ns}.

    • Data transfer from one register to another via internal bus: Requires bus propagation plus register latching:     Delay=20 ns+10 ns=30 ns\text{Delay} = 20\,\text{ns} + 10\,\text{ns} = 30\,\text{ns}

    • 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:   

    Control Unit Functional Model
  • External Control Unit Inputs:

    • Clock: Emits regular pulses defining time units (T1,T2,T3,…T_1, T_2, T_3, \dots). 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 (INTR\text{INTR}) 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 (CRC_R), memory write (CWC_W), and I/O command lines.

  • Reference Accumulator Datapath Model:   

    Datapath and Control Switches
  • Control Signal Routing Assignments:

    • C0C_0: Address bus →\rightarrow MAR

    • C1C_1: PC →\rightarrow MBR

    • C2C_2: PC →\rightarrow MAR

    • C3C_3: MBR →\rightarrow PC

    • C4C_4: MBR →\rightarrow IR

    • C5C_5: Data bus →\rightarrow MBR

    • C6C_6: MBR →\rightarrow ALU input

    • C7C_7: AC →\rightarrow ALU input

    • C8C_8: MBR →\rightarrow MAR (or IR(Address)→MAR\text{IR}(\text{Address}) \rightarrow \text{MAR})

    • C9C_9: ALU output →\rightarrow AC

    • C10C_{10}: MBR →\rightarrow AC

    • C11C_{11}: AC →\rightarrow MBR

    • C12C_{12}: MBR →\rightarrow Data bus

    • C13C_{13}: IR →\rightarrow Control Unit

    • CRC_R: Read control signal to external system bus

    • CWC_W: 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 (T1,T2,…,TmT_1, T_2, \dots, T_m).

    • Columns: Distinct instructions (I1,I2,…,InI_1, I_2, \dots, I_n).

    • Cells (CijC_{ij}): Control signal(s) active for instruction IjI_j during time state TiT_i.

    • 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 (TT-state).

    • To guarantee a delay of exactly one TT-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:     

      Multiple Entry Point Using OR Gate
    • Decision Boxes: A decision diamond in the flowchart is converted to two complementing AND gates controlled by the condition variable (xx and x‾\overline{x}):     

      Decision Box Replacement with Complementary AND Gates
    • 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:   

    Sequence Counter Architecture with Decoder and Logic Gates
    • The dominant hardwired control unit topology, replacing individual D flip-flops with a centralized counter.

    • Modulo-kk Sequence Counter (SC): Increments once per clock pulse via an AND gate to sequence through timing states (T0,T1,…,Tk−1T_0, T_1, \dots, T_{k-1}).

    • Timing Decoder (1/k1/k or 4×164 \times 16): Converts the binary counter state into distinct, mutually exclusive timing signals (T0T_0 through T15T_{15}).

    • Instruction Decoder (3×83 \times 8): Decodes opcode bits (IR14−12\text{IR}_{14-12}) into discrete instruction lines (D0D_0 through D7D_7).

    • Control Logic Gates: Combinatorial AND-OR matrix synthesizing active outputs (CiC_i) by combining instruction lines, timing pulses, addressing flags (II), and status conditions.

    • Reset/Clear Logic: An instruction completion signal asserts the counter Clear (CLR) input, resetting the counter to T0T_0 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 C5C_5 (Memory-to-MBR Data Bus Transfer):

    • Cycle encoding: PQ=00PQ = 00 (Fetch), PQ=01PQ = 01 (Indirect), PQ=10PQ = 10 (Execute), PQ=11PQ = 11 (Interrupt).

    • Active conditions in reference datapath:

    • During Fetch cycle at T2T_2: MBR←Memory  ⟹  P‾ Q‾ T2\text{MBR} \leftarrow \text{Memory} \implies \overline{P}\,\overline{Q}\,T_2

    • During Indirect cycle at T2T_2: MBR←Memory  ⟹  P‾ Q T2\text{MBR} \leftarrow \text{Memory} \implies \overline{P}\,Q\,T_2

    • Combining Fetch and Indirect cycles:     C5=P‾ Q‾ T2+P‾ Q T2C_5 = \overline{P}\,\overline{Q}\,T_2 + \overline{P}\,Q\,T_2

    • Incorporating Execute cycle reads for memory-reading instructions (LDA, ADD, AND):     C5=P‾ Q‾ T2+P‾ Q T2+P Q‾ (LDA+ADD+AND) T2C_5 = \overline{P}\,\overline{Q}\,T_2 + \overline{P}\,Q\,T_2 + P\,\overline{Q}\,(\text{LDA} + \text{ADD} + \text{AND})\,T_2

  • Synthesis Example: LOAD 200 (AA) and STORE 300 (BB):

    • Micro-operation breakdown:

    • LOAD 200 (AA):

      • t1:MAR←IR(Address)t_1: \text{MAR} \leftarrow \text{IR}(\text{Address}) (Active: C8C_8)

      • t2:MBR←Memoryt_2: \text{MBR} \leftarrow \text{Memory} (Active: C5,CRC_5, C_R)

      • t3:AC←MBRt_3: \text{AC} \leftarrow \text{MBR} (Active: C10C_{10})

    • STORE 300 (BB):

      • t1:MAR←IR(Address)t_1: \text{MAR} \leftarrow \text{IR}(\text{Address}) (Active: C8C_8)

      • t2:MBR←ACt_2: \text{MBR} \leftarrow \text{AC} (Active: C11C_{11})

      • t3:Memory←MBRt_3: \text{Memory} \leftarrow \text{MBR} (Active: C12,CWC_{12}, C_W)

    • Boolean expressions for active signals:     C8=A t1+B t1=(A+B)t1C_8 = A\,t_1 + B\,t_1 = (A + B)t_1     C5=A t2C_5 = A\,t_2     CR=A t2C_R = A\,t_2     C10=A t3C_{10} = A\,t_3     C11=B t2C_{11} = B\,t_2     C12=B t3C_{12} = B\,t_3     CW=B t3C_W = B\,t_3

    • Gate implementation schematic:     

      Logic Gate Implementation for LOAD and STORE
  • Synthesis Example: LOAD 200 (AA) and ADD 300 (BB):

    • Micro-operations for ADD 300 (BB):

    • t1:MAR←IR(Address)t_1: \text{MAR} \leftarrow \text{IR}(\text{Address}) (Active: C8C_8)

    • t2:MBR←Memoryt_2: \text{MBR} \leftarrow \text{Memory} (Active: C5,CRC_5, C_R)

    • t3:AC←AC+MBRt_3: \text{AC} \leftarrow \text{AC} + \text{MBR} (Active: C6,C7,C9C_6, C_7, C_9)

    • Shared datapath Boolean equations:     C8=(A+B)t1C_8 = (A + B)t_1     C5=CR=(A+B)t2C_5 = C_R = (A + B)t_2     C10=A t3C_{10} = A\,t_3     C6=C7=C9=B t3C_6 = C_7 = C_9 = B\,t_3

  • Synthesis Example: ADD 200 (AA) and SUB 300 (BB):

    • Both instructions utilize identical datapath control lines across execution subcycles:

    • t1:MAR←IR(Address)t_1: \text{MAR} \leftarrow \text{IR}(\text{Address}) (Active: C8C_8)

    • t2:MBR←Memoryt_2: \text{MBR} \leftarrow \text{Memory} (Active: C5,CRC_5, C_R)

    • t3:AC←AC±MBRt_3: \text{AC} \leftarrow \text{AC} \pm \text{MBR} (Active: C6,C7,C9C_6, C_7, C_9)

    • Synthesized Boolean expressions:     C8=(A+B)t1C_8 = (A + B)t_1     C5=(A+B)t2C_5 = (A + B)t_2     CR=(A+B)t2C_R = (A + B)t_2     C6=(A+B)t3C_6 = (A + B)t_3     C7=(A+B)t3C_7 = (A + B)t_3     C9=(A+B)t3C_9 = (A + B)t_3

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 (C0C_0 through C7C_7) 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 →\rightarrow Decoder selects CM line →\rightarrow Control signals activate →\rightarrow Next address field latches into CMAR conditioned on status flags →\rightarrow Loop continues until execution terminates.

  • Modern Microprogrammed Architecture (Using Microprogram Counter):

    • Microprogram Counter (μPC\mu\text{PC} / CMAR): Tracks active microinstruction locations.

    • Incrementer (+1+1): Generates sequential next addresses (μPC+1\mu\text{PC} + 1) 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 μPC\mu\text{PC}.

    • Microinstruction read from Control Memory into Microinstruction Register (μIR\mu\text{IR}.

    • Control field triggers micro-operations.

    • Non-branching microinstructions increment μPC\mu\text{PC}.

    • Unconditional branch loads target address into μPC\mu\text{PC}.

    • Conditional branch tests MUX-selected flag: if true, branch address is loaded; if false, μPC\mu\text{PC} increments.

  • Horizontal vs. Vertical Microinstructions:   

    Horizontal Microinstruction FormatVertical Microinstruction Format
  • 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., 4:164:16 decoder).

    • Signal Capacity: In horizontal, NN bits yield NN control signals. In vertical, NN encoded bits can yield up to 2N2^N 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 (μCM\mu\text{CM}): Stores vertically encoded, highly compacted microinstructions. Addressed by the Microprogram Counter (μPC\mu\text{PC}) and latched into the Microinstruction Register (μIR\mu\text{IR}).

    • Nanocontrol Memory (nCM\text{nCM}): Stores unique, wide horizontal nanoinstructions containing raw control patterns. Addressed by the Nanoprogram Counter (nPC\text{nPC}) and latched into the Nanoinstruction Register (nIR\text{nIR}).

  • Step-by-Step Nanoprogramming Execution:

    • Fetch Instruction: Processor loads machine instruction into IR.

    • Microprogram Selection: Opcode specifies starting address loaded into μPC\mu\text{PC}.

    • Fetch Microinstruction: μPC\mu\text{PC} selects vertical word from μCM\mu\text{CM} into μIR\mu\text{IR}.

    • Decode Microinstruction: Vertical bits are decoded to produce a pointer to the required horizontal word in nCM\text{nCM}.

    • Select Nanoinstruction: nPC\text{nPC} latches this pointer to address nCM\text{nCM}.

    • Generate Control Signals: Nanoinstruction enters nIR\text{nIR}; wide horizontal bit fields directly assert parallel control signals across the CPU datapath.

    • Continue Execution: Sequencing logic advances μPC\mu\text{PC} and nPC\text{nPC} 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:   

    Intel 8085 CPU Architectural 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 (B,C,D,E,H,LB, C, D, E, H, L) that can be paired as 16-bit register pairs (BC,DE,HLBC, DE, HL).

    • 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 (A15−A8A_{15}-A_8): High-order 8 bits of the 16-bit address space (unidirectional).

    • Address/Data Bus (AD7−AD0AD_7-AD_0): 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 (X1,X2X_1, X_2): Inputs connected to an external crystal driving the internal clock generator.

    • CLK(OUT)CLK(OUT): System clock output providing synchronization pulses for external peripheral devices.

    • Address Latch Enable (ALE): Emitted during the first clock state (T1T_1) of a machine cycle; its falling edge latches the multiplexed address lines (AD7−AD0AD_7-AD_0) into external latches.

    • Status Lines (S0,S1S_0, S_1): Output signals specifying read, write, or fetch operations.

    • IO/M‾IO/\overline{M}: Distinguishes between I/O operations (logic 1) and memory operations (logic 0).

    • Read Control (RD‾\overline{RD}): Active-low signal indicating the addressed memory or I/O device is to be read onto the data bus.

    • Write Control (WR‾\overline{WR}): 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.

    • INTA‾\overline{INTA}: Interrupt acknowledge output issued by the control unit.

    • System Initialization and Power:

    • RESET IN‾\overline{RESET\,IN}: Active-low input resetting the PC to 0000H0000\text{H}.

    • RESET OUTRESET\,OUT: Acknowledges processor reset and synchronizes system-wide resets.

    • VCCV_{CC} and VSSV_{SS}: +5 V+5\,\text{V} power supply and electrical ground connections.

  • 8085 Timing Hierarchy and Machine Cycle Structure:

    • Hierarchy: Instruction Cycle →\rightarrow Machine Cycles (11 to 55 per instruction) →\rightarrow States (33 to 55 TT-states per machine cycle).

    • State Definition: Each TT-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: OUT Instruction Timing (3 Machine Cycles: M1,M2,M3M_1, M_2, M_3):

    • M1M_1 (Opcode Fetch):

      • T1T_1: The control unit sets IO/M‾=0IO/\overline{M} = 0 and emits an ALE pulse. The PC outputs the upper address on A15−A8A_{15}-A_8 and lower address on AD7−AD0AD_7-AD_0. On the trailing edge of ALE, external latches capture the address.

      • T2T_2: The control unit asserts RD‾\overline{RD}. The memory module places the instruction opcode on the bus.

      • T3T_3: The data bus contents are latched into the processor's IR; RD‾\overline{RD} is negated.

      • T4T_4: Bus idle state; internal logic decodes the fetched OUT opcode.

    • M2M_2 (Memory Read): Fetches the 8-bit port address byte from memory.

    • M3M_3 (Output Write): Asserts IO/M‾=1IO/\overline{M} = 1, places the port address on the address lines, gates the Accumulator data onto AD7−AD0AD_7-AD_0, and pulses WR‾\overline{WR} to complete the I/O transfer.