Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GShare + H2P Hybrid Branch Predictor

Advanced Computer Architecture (ACA) Project

C++ License ChampSim

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.


🚀 Key Features

  • Hybrid Architecture: Dynamic selection between GShare (for simple patterns) and Perceptron (for complex correlations).
  • Confidence-Based Training: Implements mispred || low-confidence thresholding 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.

📁 Project Structure

  • 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.

🛠️ How to Build and Run

To use this predictor, you must have a ChampSim environment set up.

  1. Integrate into ChampSim: Copy the files from src/ into your ChampSim branch/ directory.

  2. Build:

    # Example build command in ChampSim
    ./config.sh configs/champsim_gshare_h2p.json
    make
  3. Run Evaluation:

    # Run with a trace
    ./bin/champsim --warmup_instructions 5000000 --simulation_instructions 20000000 <trace_file>

📊 Performance Snapshot

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.


👥 Contributors

  • The ACA Project Team (Advanced Computer Architecture Group)

© 2026 MIT License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages