Timing and Control

Orchestrating Computer Operations

⏰Introduction to Timing and Control

Timing and control are fundamental to computer operation, providing the synchronization and command signals necessary for all components to function in harmony.

The control unit, a critical part of the CPU, is responsible for initiating the sequence of micro-operations that execute instructions. All timing in the basic computer is regulated by a master clock generator that produces clock pulses applied to all flip-flops and registers throughout the system.

⚙️Control Unit Implementations

🔧Hardwired Control Unit

  • Implementation: Uses combinational logic circuits (AND, OR, NOT gates) and sequential logic circuits (flip-flops)
  • Flexibility: Less flexible - behavior fixed by physical wiring
  • Modifications: Require physical alterations to circuitry

💾Microprogrammed Control Unit

  • Implementation: Uses microcode stored in special control memory (ROM)
  • Flexibility: More flexible - behavior can be modified through software
  • Modifications: Easy updates by changing microcode without hardware changes

🖥️Hardwired Control Unit

Bus Transfer

A typical hardwired control unit includes several key components working together:

  • Instruction Register (IR): Holds the current instruction being executed
  • 3x8 Operation Decoder: Decodes the 3-bit opcode (bits 12-14) into 8 outputs (D0 to D7)
  • 4x16 Timing Decoder: Decodes the 4-bit sequence counter output
  • 4-bit Sequence Counter (SC): Generates 16 timing signals (T0 through T15)
  • Control Logic Gates: Combine decoder outputs to generate specific control signals

Timing Signals

T0
T1
T2
T3
T4
T5
...
T15

Click on timing signals to see their functions in the instruction cycle!

🧩Clearing of Sequence Counter (SC)

Bus Transfer

Understanding how D₃T₄ = 1 clears the counter in a digital timing sequence

In a control timing circuit, specific combinations of decoder outputs and timing pulses determine how the sequence counter (SC) progresses or resets. When the control function D₃T₄ = 1 becomes active, it triggers the clear operation on SC.

Step 1: The output D₃ from the operation decoder becomes active at the end of timing signal T₂.
Step 2: When T₄ becomes active, the AND gate implementing D₃T₄ outputs a high signal.
Step 3: This high signal is applied to the CLR input of the sequence counter SC, preparing it for a reset.
Step 4: On the next positive clock edge (marked T₄), the counter is cleared to 0.
Step 5: The clearing causes the timing signal T₀ to activate, instead of T₅ that would have appeared if SC had been incremented.

🔄Instruction Cycle Phases

1

Fetch Instruction

T0: AR ← PC
T1: IR ← M[AR],
    PC ← PC + 1

Transfer PC to Address Register, then fetch instruction from memory and increment PC

2

Decode Instruction

T2: D0,...,D7 ← Decode IR(12-14)
    AR ← IR(0-11)
    I ← IR(15)

Decode opcode, transfer address bits to AR, and set mode bit

3

Effective Address

T3: AR ← M[AR] (if indirect)

Read effective address if indirect addressing is used

4

Execute Operation

T4-T15: Execute based on decoded instruction

Perform the actual operation specified by the instruction

🎛️Control Logic Outputs

The control logic circuit generates various outputs to manage computer components:

Register Control

Signals to load, increment, or clear registers (AR, PC, DR, AC, IR, TR, etc.)

LD(AR) = R'T0 + R'T2 + D'7 I T3

Memory Control

Read and Write signals for memory operations

Read = R'T1 + D'7I T3 + (D0+D1+D2+D6)T4

Bus Control

Selection signals (S2, S1, S0) for common bus

S1 = D4T4 + D5T5

ALU Control

Signals for arithmetic and logic operations

D0T5: AND operation with DR into AC

📋Microprogrammed Control

More complex systems use microprogrammed control where control signals are generated by microinstructions stored in dedicated control memory.

Key Components:

  • Microprogram Sequencer: Determines address sequence for control memory
  • Control Address Register (CAR): Holds current microinstruction address
  • Address Sequencing: Supports incrementing, branching, mapping, and subroutines
  • Microinstruction Format: Fields for micro-operations (F1, F2, F3), conditions (CD), branches (BR), and addresses (AD)
Start Instruction Cycle