The simulation shows a gshare branch predictor tracking a loop's taken/not-taken pattern, updating 2-bit saturating counters and flushing the pipeline whenever a prediction turns out wrong.
Step through loop iterations to watch the global history register shift, the indexed counter update, and use the controls to change the branch pattern or history length and see prediction accuracy respond.
Step/play controls for loop iterations, sliders for history register length and branch bias pattern
Scott McFarling's original 1993 gshare paper used just a handful of history bits, yet the core XOR-indexing idea still underlies the far more elaborate TAGE predictors shipping in CPUs today.
The simulation shows a gshare branch predictor tracking a loop's taken/not-taken pattern, updating 2-bit saturating counters and flushing the pipeline whenever a prediction turns out wrong.
The simulation shows a gshare branch predictor tracking a loop's taken/not-taken pattern, updating 2-bit saturating counters and flushing the pipeline whenever a prediction turns out wrong.
Step through loop iterations to watch the global history register shift, the indexed counter update, and use the controls to change the branch pattern or history length and see prediction accuracy respond.
Scott McFarling's original 1993 gshare paper used just a handful of history bits, yet the core XOR-indexing idea still underlies the far more elaborate TAGE predictors shipping in CPUs today.