COA Notes
Intel Core architecture, micro-op translation, out-of-order engine, and cache hierarchy.
Introduction
When you hear "Intel Core i7" or "13th Gen Intel", what exactly is inside that chip? Modern Intel processors are marvels of engineering — they take the decades-old x86 instruction set (which was designed for simplicity in 1978) and execute it at speeds the original designers never imagined. The secret? Internally, these chips translate complex x86 instructions into simpler micro-operations and execute them out of order, reordering hundreds of instructions to keep every execution unit busy. Let's peel back the layers and understand how a modern Intel core actually works.
The x86 Translation Layer
Here is the fundamental challenge Intel faces: the x86 instruction set has variable-length instructions (1 to 15 bytes), complex addressing modes, and instructions that do multiple things at once. This is terrible for a fast pipeline. Intel's solution since the Pentium Pro (1995) is a translation layer:
Most simple x86 instructions (ADD, MOV, CMP) translate to a single micro-op. Complex instructions (REP MOVSB, ENTER) may generate dozens of micro-ops from a microcode ROM. This means the front-end is CISC, but the back-end execution engine is effectively RISC.
Pipeline Architecture (Golden Cove / Raptor Cove)
Intel's 12th-14th Gen "Performance cores" (P-cores) use approximately 20+ pipeline stages:
Front-End (Fetch and Decode)
Branch Predictor: Uses a sophisticated TAGE (Tagged Geometric) predictor with multiple history lengths. Achieves 97%+ prediction accuracy.
Micro-op Cache (DSB): Stores already-decoded micro-ops. On a cache hit, the decode stage is bypassed entirely — this saves power and increases throughput. The DSB can deliver up to 8 micro-ops per cycle.
Legacy Decode Pipeline: When DSB misses, the traditional decoder handles it. Golden Cove has 6 decoders — one "complex" decoder (handles multi-μop instructions) and five "simple" decoders (1 μop each).
Back-End (Out-of-Order Engine)
Register Rename: Maps 16 architectural x86 registers to ~280 physical registers, eliminating false dependencies (WAR, WAW).
Reorder Buffer (ROB): Holds up to 512 in-flight micro-ops (Golden Cove). This massive window lets the CPU look far ahead for independent instructions to execute.
Scheduler: Distributes micro-ops to 12 execution ports:
- Ports 0, 1, 5, 6: Integer ALU
- Ports 0, 1: FP/Vector multiply
- Ports 2, 3, 11: Load (three load ports!)
- Ports 4, 9: Store data
- Port 7, 8: Store address
Execution Units
| Port | Capabilities |
|---|---|
| 0 | Integer ALU, FP MUL, Vector ALU, Branch |
| 1 | Integer ALU, FP ADD, Vector ALU, LEA |
| 2, 3, 11 | Load Address Generation |
| 4, 9 | Store Data |
| 5 | Integer ALU, Vector Shuffle, Branch |
| 6 | Integer ALU, LEA |
| 7, 8 | Store Address Generation |
This width means the CPU can execute up to 6 ALU operations + 3 loads + 2 stores in a single cycle — far more than one instruction per clock.
Cache Hierarchy
Modern Intel CPUs have three levels of cache, each with specific design trade-offs:
L1 Cache (Per Core)
- L1 Instruction: 32 KB, 8-way, 4-cycle latency
- L1 Data: 48 KB, 12-way, 5-cycle latency
- Split design: separate caches for code and data avoid structural hazards
L2 Cache (Per Core)
- 1.25 MB (Golden Cove) or 2 MB (Raptor Cove), 10-way
- ~12-14 cycle latency
- Inclusive or non-inclusive depending on generation
L3 Cache (Shared)
- 30-36 MB shared across all cores
- Ring bus or mesh interconnect
- ~40-50 cycle latency
- Serves as victim cache and coherence point
Out-of-Order Execution in Action
Let's trace how instructions actually execute. Consider this code:
| 1 | LOAD R1, [addr1] ; Cache miss! 200 cycles |
| 2 | ADD R2, R1, #5 ; Depends on instruction 1 |
| 3 | LOAD R3, [addr2] ; Independent - cache hit |
| 4 | MUL R4, R3, R3 ; Depends on instruction 3 |
| 5 | ADD R5, R4, #10 ; Depends on instruction 4 |
An in-order processor would stall at instruction 2 waiting for the cache miss, blocking everything. The out-of-order engine does this:
| Cycle 1 | Issue LOAD R1 (goes to memory) |
| Cycle 2 | Issue LOAD R3 (independent! no need to wait) |
| Cycle 3 | Issue MUL R4 (R3 ready from L1 hit) |
| Cycle 6 | Issue ADD R5 (R4 ready after MUL) |
| Cycle 200 | LOAD R1 returns from memory |
| Cycle 201 | Issue ADD R2 (R1 finally available) |
| Cycle 202 | Retire all in program order |
The CPU executed instructions 3, 4, 5 while waiting for instruction 1's cache miss. This is why out-of-order execution is so powerful — it hides memory latency.
Hybrid Architecture (12th Gen+)
Starting with Alder Lake (12th Gen), Intel introduced a hybrid design similar to ARM's big.LITTLE:
- P-cores (Performance): Full out-of-order, wide execution, high IPC — for heavy workloads
- E-cores (Efficiency): Simpler, in-order-ish, narrow — for background tasks at lower power
- Thread Director: Hardware unit that guides the OS scheduler to place threads on appropriate cores
A 13th Gen i9-13900K has 8 P-cores + 16 E-cores = 24 cores total.
Branch Prediction Importance
Branch misprediction is catastrophic in a 20+ stage pipeline — you lose 15-20 cycles flushing the pipeline. Intel's predictor uses:
- Branch Target Buffer (BTB): 12K+ entries predicting target addresses
- Two-level adaptive predictor: Pattern history of recent branches
- Loop detector: Identifies counted loops and predicts iteration count
- Indirect branch predictor: For virtual function calls and switch statements
- Return Stack Buffer: Predicts return addresses (16-32 deep)
Real-World Performance Impact
Why does all this matter for your daily computing?
- Gaming: Out-of-order execution hides memory latency during texture loads. Large caches keep frequently accessed game data close.
- Compilation: Wide execution handles the many independent operations in parsing and code generation.
- Web browsing: Branch prediction matters hugely because JavaScript is branch-heavy.
- Video editing: SIMD/AVX units process multiple pixels simultaneously (512-bit AVX-512 on some models).
Key Takeaways
- Modern Intel CPUs translate x86 CISC instructions into RISC-like micro-ops internally
- The out-of-order engine with 512-entry ROB can execute instructions far ahead of program order
- The micro-op cache (DSB) bypasses the decoder for hot code, saving power and time
- Three levels of cache (L1: 5 cycles, L2: 14 cycles, L3: 50 cycles) bridge the CPU-memory speed gap
- Hybrid P-core/E-core design optimizes for both peak performance and power efficiency
- Branch prediction accuracy above 97% is essential — even 1% more misses significantly impacts performance in deep pipelines
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Modern Intel CPU.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Computer Organization & Architecture topic.
Search Terms
computer-organization, computer organization & architecture, computer, organization, case, studies, modern, intel
Related Computer Organization & Architecture Topics