The processor core: an educational datapath and a modern core
A core is a machine that continuously fetches instructions from memory and executes them. This level shows two views: an educational single-cycle datapath of a 64-bit RISC-V, where every connection is visible and everything is actually computed, and a generalized modern core with out-of-order execution, like the x86-64 and ARM64 cores of 2022–2025. From the outside both look the same: instructions are executed in order. Inside, the second one keeps hundreds of instructions in flight at once.
What a core does and how its speed is measured
A program, for a core, is a sequence of instructions in memory. The core repeats one cycle: take the instruction at the address in the program counter, figure it out, execute it, move on to the next. Everything else — caches, predictors, renaming, queues — exists only to make this cycle run as fast as possible without breaking the visible order.
A core’s performance is the product of two numbers: the clock frequency and the number of instructions completed per cycle (IPC, instructions per cycle). The frequencies of desktop processors have barely grown for a long time — 4–6 GHz — because going higher runs into heat and wire delays. All the progress of the last twenty years has been in IPC: a simple core completes less than one instruction per cycle, while a modern wide core manages 3–5 on ordinary code and 6–8 at peak.
How do you raise IPC? Execute several independent instructions at the same time. But a program is written sequentially, and neighboring instructions often depend on each other. So a modern core looks far ahead — hundreds of instructions — finds the independent ones among them and executes them as soon as their data is ready, not in program order. This is out-of-order execution, and most of the blocks in the model exist precisely for it.
On the left side of the level you can switch to the educational datapath: it is much simpler, but it runs the same program instruction by instruction.
Educational datapath: fetch, decoder, registers
The educational core is single-cycle: an instruction travels the whole path in one clock cycle. The PC supplies an address, and the fetch block reads the 4 bytes of the instruction there — in the model from the same 256 bytes of memory that hold the data, in a real core from the L1i instruction cache. The decoder splits the 32-bit word into the fields opcode, rd, rs1, rs2, funct3/funct7 and decides which blocks to turn on.
At the same time the register file outputs the values of registers rs1 and rs2, and the immediate generator assembles imm from the instruction fields and sign-extends it to 64 bits. All of this happens in parallel: the decoder is still deciding whether the constant is needed, but it has already been computed — if it isn’t needed, it simply won’t be selected.
Wire colors: light blue is data, amber is addresses, purple is control. Take a program step — only the blocks and wires involved in that instruction light up. Each block can be opened with a double click: on the “Core blocks” level it is expanded down to individual bits.
The clock period of a single-cycle core is set by the slowest instruction — a load from memory, which passes through every block in a row. All the other instructions are forced to wait just as long. This is the main drawback of the single-cycle design, and the pipeline fixes it (the “Pipeline” level).
Educational datapath: ALU, memory, write-back, branches
The B multiplexer selects the ALU’s second operand: register rs2 for add or sub, the constant imm for addi, loads and stores. The ALU computes the result: a sum, a difference, a logic operation, a shift or a comparison. For loads and stores the ALU result is an address.
For sw and sd, the memory port sends the address and the data from register rs2 to memory — in the model, out through the RAM output to the memory on the motherboard; for lw and ld it receives bytes from there. Bytes are stored little-endian: the least significant one at the lower address.
The write-back block chooses what to put into rd: the ALU result (arithmetic), data from memory (a load) or PC + 4 (jal and jalr — the return address). For beq and bne the branch unit compares registers by subtraction and, if the condition holds, puts a new address into the PC.
Run a program with a loop: on the step with beq or bne you can see the path from the branch unit to the PC light up, and the next instruction is taken not from PC + 4 but from the start of the loop.
Front end: predictor, fetch, decoders
The front end’s job is to deliver 6–8 instructions to the execution part every cycle, without waiting for the earlier ones to finish. To do this it has to know where the program will go before the branches have been computed. That is the branch predictor’s work: from the instruction’s address and the history of recent branches, it guesses whether there is a branch here, where it leads and whether it will be taken. Modern predictors (based on TAGE schemes and perceptrons) guess 95–99% of conditional branches correctly and store thousands of target addresses.
Fetch takes 32–64 bytes of code per cycle from the L1i instruction cache (32–64 KB, 3–4 cycles) at the address given by the predictor. The predictor runs dozens of instructions ahead, so the instruction cache has time to bring in the needed lines in advance.
The decoders — 4–8 of them in parallel — translate instructions into micro-operations: simple internal instructions of the core with a fixed format. A RISC-V or ARM instruction usually produces one micro-operation. x86 instructions have variable length (1 to 15 bytes) and can be complex: add [rbx+8], rax is a load, an addition and a store — three micro-operations. Finding the boundaries of x86 instructions in a stream of bytes is hard work of its own, so x86 decoders are power-hungry.
The micro-op cache stores instructions that have already been decoded (about 4–8 thousand micro-operations). In hot loops, where a program spends most of its time, the decoders can be left off entirely — micro-operations come straight from this cache. This saves both cycles and energy.
Renaming and the scheduler
A program uses a small set of architectural registers: 16 in x86-64, 31 in ARM64, 32 in RISC-V. The compiler has no choice but to reuse them, and false dependencies appear between instructions. Suppose instruction 1 writes x5, instruction 2 reads it, and instruction 3 writes a completely different value into x5 again. Instruction 3 cannot execute before instruction 2 — otherwise 2 would read the wrong value — even though logically they are independent.
Renaming removes such dependencies. Each new result gets a fresh physical register from a pool of hundreds (about 200–300 integer registers), and the rename table remembers which physical register currently holds the up-to-date value of each architectural one. Instruction 3 no longer writes into “the same” x5 but into a new physical register, and can execute whenever it likes. Only true dependencies remain — when an instruction really needs the result of an earlier one.
The scheduler holds queues of micro-operations waiting for their operands (on the order of 100–200 entries). Every cycle it notes whose operands have become ready and launches the oldest of the ready ones onto free execution ports — not necessarily in program order. If an instruction waits 300 cycles for data from memory, the instructions after it that don’t depend on it are executed in the meantime.
Vector registers (256–512 bits, AVX2/AVX-512 in x86, NEON and SVE in ARM) hold several numbers at once for SIMD instructions: a single instruction adds or multiplies 8 double-precision or 16 single-precision numbers at a time. They are renamed too and have their own physical register file.
Execution ports
Ports are parallel execution units to which the scheduler sends micro-operations. The model has 8: 4 integer ALUs, 2 AGUs for computing memory addresses and 2 vector/FPU units for floating-point and vector computation. Real cores of 2024–2025 have 10–20 ports, depending on how you count them.
An integer ALU performs addition, logic, shifts, comparisons and branches in 1 cycle; multiplication takes 3–4 cycles, division 10–20 or more. An AGU computes the address register + offset and passes it to the load-store unit. Vector units perform a fused multiply-add (FMA) on a whole vector per cycle, but with a latency of 4–5 cycles: the unit is pipelined, and new operations can be launched every cycle.
A port’s result is immediately broadcast over the bypass network to the inputs of all ports: a dependent instruction can start as early as the next cycle, without waiting for the write to the register file.
The port number in the model is chosen by the type of the current program instruction: add goes to an ALU, sw to an AGU. Double-clicking an ALU port opens the inner workings of the ALU.
The ROB: order is restored
The reorder buffer (ROB) remembers the original order of all instructions “in flight” — 300–600 entries in modern cores. Each instruction gets a slot at the tail of the ROB during renaming and leaves it (retires) only from the head, strictly in order, once it and all the earlier ones have been executed. Only at that moment does its result become final — architectural.
Why is this needed? The core executes instructions speculatively: along the predicted path, without knowing whether a branch was guessed correctly, and without knowing whether some earlier instruction will raise an exception (for example, an access to a nonexistent memory page). If the predictor was wrong, everything in the ROB after the mispredicted branch is simply discarded, the rename table is rolled back to a saved state, and fetching restarts from the correct address. A misprediction costs 15–20 cycles.
This is how the core looks to a program like a simple sequential one, even though inside dozens of instructions are executing at once and hundreds are waiting their turn. The size of the ROB determines how far ahead the core can look — for example, how much independent work it can find while one load is waiting for RAM.
Core memory: queues, L1d, L2
The load and store queues (LSQ) keep track of all memory accesses in flight. Stores don’t write to the cache right away: they wait in the queue until retirement — after all, the instruction may turn out to be on the wrong path. If a load reads an address for which an earlier store is already waiting in the queue, it takes the value straight from there (store-to-load forwarding).
Loads are executed speculatively, without waiting until the addresses of all earlier stores are known. If it later turns out that one of them wrote to the same address, the load and everything after it are restarted. A dependence predictor remembers such pairs so that the mistake is not repeated.
The L1d data cache is 32–48 KB, responds in 4–5 cycles and serves 2–3 loads and 1–2 stores per cycle. The core’s private L2 cache is 1–3 MB, shared by instructions and data, at roughly 14–17 cycles. Behind it is the L3 on the die, shared by all cores.
How a cache works is covered in detail on the “L1 cache” level; how cores share the L3 and memory is on the “Die” level.
The path of one instruction through a modern core
Take the instruction add x3, x1, x2 inside a loop. Cycles 1–2: the predictor decided the loop continues and supplied the address; fetch read a block of code containing our instruction from L1i. Cycles 3–5: the decoder (or the micro-op cache) turned it into a single micro-operation.
Cycle 6: renaming. The table says x1 currently lives in physical register p47 and x2 in p103. A free p210 is allocated for the result, and the table now knows that x3 = p210. The micro-operation gets a slot in the ROB and in the scheduler queue.
Cycle 7 and beyond: the scheduler waits until p47 and p103 are ready. If x1 is being computed by an earlier load that missed the cache, the wait can last hundreds of cycles — and meanwhile the core executes the following independent instructions. As soon as the operands are ready, the micro-operation goes to a free ALU port; a cycle later the result appears in p210 and, via the bypass network, immediately reaches the instructions waiting for it.
A few cycles later, when all the earlier instructions have completed, the add retires from the ROB: x3 = p210 becomes the official value, and the physical register that held the previous x3 is returned to the free pool. The whole path takes 15–20 cycles, but every cycle 6–8 new instructions enter the same machine.
Two threads per core (SMT)
Even a wide core often sits idle: waiting for memory, recovering from a misprediction. Simultaneous multithreading (SMT, called Hyper-Threading by Intel) lets one core run two instruction streams: each has its own set of architectural registers and its own PC, while the execution units, caches and queues are shared.
The operating system sees such a core as two logical processors. The gain from the second thread is usually 10–30%, not double: the threads share the same resources. Some new cores (for example, Intel Lion Cove in Core Ultra 200) have dropped SMT for the sake of simplicity and energy efficiency.
Scale: the numbers of modern cores
A desktop processor core of 2024–2025 occupies 3–5 mm² of the die (including L2) and contains from hundreds of millions to a billion transistors, most of them in caches and register files. At full frequency one core draws 10–30 W.
Typical parameters: decoding 6–8 instructions per cycle, a micro-op cache of 4–8 thousand, a ROB of 400–600 entries, 200–300 physical integer registers, 4–6 integer ALUs, 3–4 load-store ports, 2–4 vector units 256–512 bits wide. The pipeline is 14–20 stages, and a branch misprediction costs 15–20 cycles.
For comparison: the Intel Pentium (1993) executed up to 2 instructions per cycle in order with 3.1 million transistors, and the first out-of-order chip, the Pentium Pro (1995), kept 40 micro-operations in flight. Over thirty years the out-of-order window has grown more than tenfold.
Common misconceptions
“A processor executes instructions one at a time, in program order.” That is how it looks from the outside — and that is what the ROB guarantees. Inside, hundreds of instructions are in flight at once, and they execute in the order their data becomes ready.
“More gigahertz means faster.” A 4 GHz core with an IPC of 5 is faster than a 5 GHz core with an IPC of 3. Comparing processors by frequency only makes sense within the same architecture.
“Mispredicted instructions vanish without a trace.” Their results are discarded, but traces in the caches remain. This is the basis of the Spectre class of attacks (2018): speculatively executed code leaves a trace in the cache that can be used to discover secret data. Since then, processors and operating systems have gained special protections.
“x86 is slower than ARM because it is CISC.” Inside, both kinds of cores work with similar micro-operations and are built in almost the same way. The difference lies in the complexity of x86 decoders and in specific implementations, not in the principle.