Advanced Computer Architecture (ACA) Project
This repository contains a high-performance hybrid branch predictor designed for the ChampSim simulator. Our implementation combines the classic GShare predictor with a Hardness-to-Predict (H2P) table and a Perceptron backend to handle complex, non-linear branch behaviors.
- Hybrid Architecture: Dynamic selection between GShare (for simple patterns) and Perceptron (for complex correlations).
- Confidence-Based Training: Implements
mispred || low-confidencethresholding to optimize perceptron learning. - Bias Weighting: Enhanced perceptron entries with dedicated bias weights for improved capture of branch leaning.
- Phase Adaptation: Periodic hardness-table decay to re-evaluate branch complexity over time.
- Instrumentation: Built-in counters for usage rates, training triggers, and hardness promotions.
src/gshare_h2p.h/cc: Core predictor implementation.
configs/champsim_*.json: ChampSim configuration files for various predictor setups.
results/eval_results_final.csv: Comprehensive evaluation across 4 benchmark traces.
LICENSE: MIT License.README.md: Project documentation.
To use this predictor, you must have a ChampSim environment set up.
-
Integrate into ChampSim: Copy the files from
src/into your ChampSimbranch/directory. -
Build:
# Example build command in ChampSim ./config.sh configs/champsim_gshare_h2p.json make -
Run Evaluation:
# Run with a trace ./bin/champsim --warmup_instructions 5000000 --simulation_instructions 20000000 <trace_file>
Extracted from 5M Warmup / 20M Sim on Perlbench trace.
| Predictor | IPC | Branch Accuracy | Branch MPKI |
|---|---|---|---|
| Bimodal | 2.333 | 97.42% | 3.601 |
| GShare | 2.370 | 98.02% | 2.763 |
| Perceptron | 2.424 | 98.57% | 1.993 |
| GShare+H2P (Ours) | 2.380 | 98.18% | 2.546 |
Note
The GShare+H2P hybrid balances accuracy with resource efficiency, providing a significant edge over standard GShare. See results/ for full trace evaluations.
- The ACA Project Team (Advanced Computer Architecture Group)
© 2026 MIT License