UVMArena
Processor Architecture Overview
Understanding the fundamental subsystems that make up a processor
Introduction
A processor is composed of multiple subsystems that work together to execute programs. Each subsystem has a specific role in the instruction execution process. Programs are formed by a sequence of instructions stored in memory, and the processor reads and executes these instructions step by step.
The main components of a processor architecture include the control unit, instruction register, program memory, general-purpose registers, arithmetic and logic units, data memory, and input/output buffers.
Control Unit
The control unit is the central component of the processor. Its primary role is to read instructions from the instruction register and determine which operation must be performed.
Depending on the instruction, the control unit controls arithmetic operations, logical operations, register access, memory reads and writes, and communication with input/output systems.
Instruction Register
The instruction register is a 32-bit register that stores the current instruction being executed by the processor.
Each instruction contains an opcode and information about the source and destination registers required to perform the operation.
Program Memory
Program memory stores the set of instructions that make up a program.
The processor reads one instruction at a time from program memory and loads it into the instruction register for execution.
Input Buffer (GPIO Interface)
The input buffer allows the processor to receive data from the external world, such as GPIO pins available on an FPGA.
External data is first stored in data memory before it can be used by the processor.
General-Purpose Registers (GPR)
The processor includes 32 general-purpose registers used to store operands and intermediate results.
All arithmetic and logical operations are performed using data stored in these registers, and results are typically written back to them.
Arithmetic and Logic Unit (ALU)
The ALU performs arithmetic operations such as addition and subtraction, as well as logical operations like AND, OR, and XOR.
Operands come from general-purpose registers and the result is written back to the register file.
Data Memory
Data memory provides temporary storage for data used by the processor. It also acts as the interface between the processor and the external world.
Data read from external devices is stored in data memory before being transferred to registers. Likewise, data written to external outputs must first be stored in data memory before being sent to GPIO pins.
Instruction Execution Flow
- A program is stored in program memory.
- The control unit reads one instruction at a time.
- The instruction is loaded into the instruction register.
- The control unit decodes the instruction and activates the required subsystem.
- Operations are executed using the ALU and general-purpose registers.
- Results are stored in registers or data memory.