Skip to main content

GPP operation: datapath and controller

Short answer

A GPP has a controller (PC, IR, control logic) that fetches, decodes, and sequences instructions, and a datapath (register file, ALU, buses) that performs computations. The controller decodes opcodes to generate control signals, moving data through the ALU and storing results in a repeating fetch-decode-execute cycle.

Draw the basic architecture of a general-purpose processor and describe its operation in terms of datapath and controller.

A general-purpose processor (GPP) is a programmable processor suited to many applications. It has a controller (control unit) that sequences operations and a datapath that performs them, plus memory that holds the program and data.

Basic architecture

  +----------------- Processor -----------------+
  | Controller (control unit)                    |
  |  +----+  +----+  +-----------------+        |
  |  | PC |  | IR |  | Control logic / |        |
  |  +----+  +----+  | state register  |        |
  |                  +--------+--------+        |
  |        control signals     |  status        |
  | Datapath                   v                |
  |  +-----------+   +-------------+            |
  |  | Register  |-->|     ALU     |--> flags   |
  |  | file      |<--|             |            |
  |  +-----------+   +-------------+            |
  +-------+-------------------+-----------------+
          | address/data bus  |
     +----+--------+     +----+---------+
     | Program mem |     |  Data memory |
     +-------------+     +--------------+

Datapath

Consists of registers (accumulator, general registers, status), the ALU (arithmetic and logic operations) and internal buses/multiplexers. Data from registers or memory flows through the ALU and results are stored back. It performs the actual computation, in response to control signals.

Controller

Contains the program counter (PC) (address of next instruction), instruction register (IR) (current instruction), and control logic/state register that decodes the opcode and generates control signals (register selects, ALU function, read/write, etc.). Control logic may be hardwired or microprogrammed.

Operation (instruction cycle)

  1. Fetch: IR <- Memory[PC]; PC <- PC + 1.
  2. Decode: the control logic interprets the opcode and selects the registers/ALU operation.
  3. Execute (and fetch operands): the datapath operates, e.g. R1 <- R1 + R2.
  4. Store result: write result to a register or memory. The cycle repeats for the next instruction.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Embedded System chapter 2 questions →