






















Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!























Marco Scianna Centro ALGORITMI Department of Industrial Electronics School of Engineering, University of Minho, Guimarães - PORTUGAL
ARCHITECTURE DATAPATH SIMULATION
INTRODUCTION
What Is a Microprocessor?
A microprocessor is an integrated circuit that implements the functions of a CPU on a single chip.
It executes instructions in sequence: it reads, decodes, and processes data according to a stored program.
In every modern electronic device — from PCs to smart appliances.
Unlike a simple circuit, it is programmable : behavior changes with software, not hardware.
1945 — STILL RELEVANT TODAY
The Von Neumann
Model
Proposed by John von Neumann in 1945 , this architectural scheme still defines the fundamental structure of almost every modern computer today.
Unified memory: instructions and data share the same memory space — the principle of the "stored program". Shared bus: CPU, memory, and I/O communicate through a common bus, the cause of the classic Von Neumann bottleneck.
The Harvard architecture physically separates data and instruction memory, overcoming this limit in modern embedded systems.
CPU Component Map
ALU · Control Unit (CU)
Internal bus · System bus
Hardware Implementation
A circuit-level schematic showing the PC register's internal logic gates and connections.
Functional Block Diagram
A high-level block diagram showing the PC register with clock input, reset signal, increment logic, and output.
The Instruction Register (IR)
The IR stores the instruction currently being executed , fetched from memory during the fetch phase.
The most significant bits encode what to do — e.g. ADD, LOAD, STORE, JUMP.
The remaining bits indicate what to operate on — a memory address or an immediate value.
16-bit example:
[ 0110 | 0000 1011 0100 ]
→ Opcode ADD (0110) + Address 0x0B
The Control Unit reads the opcode from the IR to generate the appropriate control signals for the rest of the datapath.
FUNCTIONAL UNIT
The ALU — Arithmetic
Logic Unit
The computational heart of the CPU. It receives two operands as input, performs the operation selected by the CU, and produces a result.
Addition, subtraction, integer multiplication, negation.
AND, OR, NOT, XOR — essential for masks and bit tests.
Zero (Z) · Carry (C) · Overflow (V) — used by the CU for conditional branches.
The Control Unit (CU)
The CU is the CPU's "orchestra conductor": it reads the opcode from the IR and generates the control signals that coordinate every component of the datapath.
Hardwired combinational logic — maximum speed, minimum flexibility. Used in modern RISC CPUs.
Complex instructions translated into micro- operations via internal ROM. Flexible, used in CISC architectures.
The generated signals include: RegRead, ALUop, MemWrite, RegWrite, Branch.
The Fetch–Decode–Execute Cycle
The CPU repeats this cycle millions of times per second — it is the heartbeat of every processor.
Fetch
PC Increment
Decode
Execute
Understanding this cycle is the key to reading any architecture — from a simple microcontroller to an out-of-order superscalar CPU.
FETCH: Reading the Instruction
The Fetch phase retrieves the instruction from memory and brings it into the IR. The PC is then incremented to point to the next instruction.
MDR ← Data IR ← MDR PC +
Memory Access
PC → MAR
Each arrow corresponds to a data transfer on the internal bus. The cycle starts with every clock pulse.
EXECUTE: Execute the
Instruction
Concrete example: execution of ADD x — each micro-operation takes one clock cycle.
1
Saves the accumulator in the temporary register
2
M[x] → T Reads the operand from memory
3
Calculates the sum and writes the result
What is an ISA
The Instruction Set Architecture is the processor's "vocabulary": it defines every operation the CPU is able to execute.
Each instruction is made up of opcode + operand The opcode identifies the operation (e.g. 0001 = LOAD) The operand specifies the address or the data Example: 0001 000010110100 = LOAD 180
The ISA is the boundary between hardware and software: the compiler translates source code into ISA instructions.
Example 16-bit Instruction Encoding
Each instruction is divided into opcode and operand. The opcode identifies the operation, while the operand specifies data or address information. This simple ISA is enough to implement loading, arithmetic, storing, branching, and halting.
TOOL
Logisim-
Evolution
Free and open-source software for digital circuit simulation , used at universities around the world.
Available on Windows, Linux, and macOS (including Apple Silicon M1)
Adopted in computer architecture courses internationally