2.2 Accumulator Design
In an accumulator-based processor, the Accumulator (AC) register acts as the primary operand source and computational sink. While Chapter 1.3 defined the AC conceptually, this chapter details the physical control gate logic that manages data loading, incrementing, and clearing. We derive the exact Boolean control equations and trace the register timing signals.
Learning Objectives
- Identify the control inputs (LD, INR, CLR) of a standard processor Accumulator (AC) register.
- Explain how register transfer control gates generate the load enable, increment, and clear signals for the Accumulator.
- Construct Boolean logic gates to control the load input of the Accumulator based on a set of assembly microoperations.
- Contrast accumulator-based register units with general-purpose register files in terms of bus traffic and instruction length.
- Evaluate the execution speed trade-off of executing operations in an accumulator vs. temporary ALU buffers.
Before studying this chapter, you must understand Chapter 2.1: ALU Design (Circuits) to see how the ALU routes outputs to the AC register.
1. The Accumulator Register Interface
The Accumulator (AC) is a multi-bit parallel register containing $N$ flip-flops with three primary control inputs:
- Load (
LD): When asserted, the AC registers the data present at its parallel input bus on the next active clock edge. - Increment (
INR): When asserted, the AC increments its stored value by $1$ on the next active clock edge. - Clear (
CLR): When asserted, the AC resets all internal flip-flops to $0$ on the next active clock edge.
2. Deriving the Control Gate Logic
To design the control gates connected to the LD, INR, and CLR pins, we must identify all register transfer statements in the processor design that modify the Accumulator. Let:
- $D_0, D_1, \dots$ be instruction opcode decoder outputs.
- $T_0, T_1, \dots$ be timing states.
- $r$ be the control timing condition for register-reference instructions.
- $B_i$ represent specific instruction bits in the IR.
We list the microoperations that modify the AC:
AND: AC <─ AC ∧ DR (at D_0 T_4)
LOAD: AC <─ DR (at D_2 T_4)
INP: AC <─ INPR (at p T_3, where p = r B_6)
CLA: AC <─ 0 (at r B_11)
INR: AC <─ AC + 1 (at r B_5)
2.1 Synthesizing the Boolean Control Equations
By OR-ing the control conditions for each register transfer action, we obtain the Boolean expressions for the AC control pins:
These expressions are implemented directly using logic gates whose outputs connect to the corresponding control pins on the AC register.
D_0 ───┐
T_4 ───┼──► [ AND ] ───┐
├──► [ OR ] ────────────────────────► LD Pin (AC)
D_1 ───┐ │
T_4 ───┼──► [ AND ] ───┤
│
D_2 ───┐ │
T_4 ───┼──► [ AND ] ───┘
r ─────┐
B_11 ──┴──► [ AND ] ───────────────────────────────────────► CLR Pin (AC)
r ─────┐
B_5 ───┴──► [ AND ] ───────────────────────────────────────► INR Pin (AC)
3. Complete Accumulator Microoperation Trace
To understand the hardware execution process, let us trace a register addition instruction: $$\text{AC} \leftarrow \text{AC} + \text{DR}$$ The cycle proceeds step-by-step:
- Decode Opcode: The instruction opcode is decoded as $D_1$ (representing the ADD instruction).
- Wait for timing state: The processor reaches timing state $T_4$ inside the execution phase.
- Assert Gates: The control line combination $D_1 T_4$ asserts, forcing the AC control logic OR gate to output a high signal on the
LDpin. - ALU Add: The ALU continuously computes the sum of the AC and DR register contents.
- Write-back: On the rising edge of the next clock pulse (at the end of $T_4$), the parallel inputs of AC latch the sum, completing the register load operation.
4. Worked Examples
Custom Accumulator Load Gate Derivation
Problem: Suppose we want to add a new subtraction instruction `SUB` to the processor instruction set. The instruction opcode is decoded as $D_9$, and execution occurs at timing state $T_5$. Write the updated Boolean control equation for the `LD` input of the Accumulator.
Solution:
1. Identify the register transfer statement for subtraction: $$\text{AC} \leftarrow \text{AC} - \text{DR} \quad \text{at } D_9 T_5$$
2. To load the subtraction result from the ALU into the AC, the `LD` pin must be enabled at timing state $D_9 T_5$.
3. We append this condition to the existing `LD` logic equation: $$LD_{\text{new}} = D_0 T_4 + D_1 T_4 + D_2 T_4 + p T_3 + D_9 T_5$$
Answer: The updated equation is **$LD = D_0 T_4 + D_1 T_4 + D_2 T_4 + p T_3 + D_9 T_5$**.
5. Core Comparison Tables
Table 2.2.3: Accumulator vs. General-Purpose Registers (GPR)
| Feature | Accumulator Architecture | General-Purpose Register (GPR) |
|---|---|---|
| Operand Source | Implicitly the AC register. | Explicitly specified in register fields (e.g. R1, R2). |
| Instruction Length | Short (1-address format saves register bits). | Long (3-address format requires destination/source bits). |
| Bus Gating Bottlenecks | High bottleneck at the Accumulator node. | Distributed bus lines with multiplexed register access. |
6. Common Mistakes Students Make
Common Pitfalls & Cognitive Traps
- Missing Clock Sync checks: Students often think that once the LD control line becomes high, the accumulator loads data immediately. They forget that parallel registers are synchronous edge-triggered circuits, meaning the transfer only occurs on the next active transition of the master clock.
- Forgetting to specify opcodes ($D_i$): When deriving control equations, students often write gates using only timing signals (e.g. $LD = T_4$). This is incorrect because it would cause the AC to load data on *every* instruction execution phase at state $T_4$, destroying existing stored values.
🎯 Key Takeaways
- The Accumulator contains **Load (LD)**, **Increment (INR)**, and **Clear (CLR)** input control pins.
- We synthesize AC control gate logic by mapping and OR-ing all register transfer timing signals that write to AC.
- The canonical Load equation is $LD = D_0 T_4 + D_1 T_4 + D_2 T_4 + p T_3$.
- Accumulator-based designs decrease instruction footprint size at the expense of high bus congestion.
🔗 Connection to Next Chapter
Now that we have designed the registers control inputs, we must examine the physical controller that generates these $D_i$ and $T_i$ timing signals. Proceed to **Chapter 2.3: Hardwired Control Unit** to study decoder-counter hardware.
7. Assessment Bank
7.1 Multiple Choice Questions
Answer: (b). Clear AC (CLA) corresponds to register-reference operation timing code $r B_{11}$.
Answer: (c). Incrementing AC utilizes the dedicated register `INR` pin.
7.2 Short Answer Questions
- Why does the Accumulator register load data only at the transition of the clock pulse?
- Write the register transfer statements representing AC clear and AC increment.
7.3 Long Answer Questions
- Trace the timing sequences and gate activations that occur during the execution of a `LOAD AC` ($D_2 T_4$) instruction. Draw the register load path.