MRM MRM MRM MRM
SYSTEM BOOTING
Back to projects
Computer Architecture

Superscalar Processor Simulation & Optimization

A quantitative architecture study using SimpleScalar to optimize cache, branch prediction and pipeline design under a strict 512-byte hardware budget.

Difficulty — expert Complexity — 9/10 Category — Computer Architecture

Overview

A comprehensive SimpleScalar-based evaluation framework built to answer a concrete engineering question: how do cache hierarchy, branch prediction strategy and pipeline configuration each contribute to superscalar processor performance, and what is the best possible processor achievable under a hard 512-byte memory constraint? The study spans SPEC95 benchmarks with markedly different memory behavior, giving the conclusions real generality rather than tuning to a single workload.

Architecture

The evaluation is organized into five phases — cache hierarchy analysis, branch predictor comparison, pipeline parameter sweeps, constraint-based processor design, and a Python automation layer that turns raw simulator text output into structured performance reports.

Key Features

  • Four cache hierarchy tiers (Small/Medium/Large/Excessive) benchmarked against ijpeg, go, gcc and vortex workloads.
  • Bimodal, Two-Level Adaptive and Hybrid branch predictors compared across multiple BTB sizes on direction/address-hit accuracy.
  • Independent sweeps of fetch-queue depth, decode/issue width, and in-order vs. out-of-order execution to isolate each parameter's contribution.
  • A final processor design that allocates a fixed 512-byte hardware budget across I-cache, D-cache, L2 and predictor for maximum throughput.

Development Process

  • Baselined performance under minimal cache and in-order execution to establish a lower bound.
  • Swept one architectural parameter at a time, holding the rest constant, to isolate its effect on CPI/IPC.
  • Iterated candidate constrained-budget processors, rejecting configurations that violated the 512-byte limit despite lower miss rates.
  • Built a regex-based Python parser to eliminate manual transcription of simulator output into comparison tables.

Challenges & Solutions

Challenge

Diminishing cache returns made it hard to justify hardware spend: ijpeg improved ~39% from smallest to largest cache, but most of that gain arrived by the Medium tier.

Solution

Used the Medium-tier data point as the real design target rather than chasing the theoretical maximum, freeing budget for the instruction cache instead.

Challenge

Longer branch-history registers in the Two-Level Adaptive predictor introduced history aliasing that degraded accuracy rather than improving it.

Solution

Benchmarked multiple history widths directly instead of assuming 'longer is better', and selected the width with the best measured direction accuracy.

Results & Impact

Out-of-order execution alone cut execution cycles by roughly 55% versus in-order — the single largest lever in the entire study — while the Bimodal predictor already exceeded 99% direction accuracy on ijpeg with a comparatively small BTB. The final constrained design allocated the majority of its 512-byte budget to the instruction cache, which produced the largest improvement under the memory ceiling.

Future Improvements

  • Extend the benchmark set beyond SPEC95 to a modern instruction mix.
  • Model energy/area trade-offs alongside raw performance.
  • Automate the constrained-design search instead of manual iteration.