Next: , Previous: Sampling, Up: Top


4 Path Predictor

The path predictor is the collection of predictors that determine which instructions to fetch. In simple systems the path predictor might just be a PC-indexed branch predictor. In the system simulated by RSIML the path predictor consists of these components: a block predictor that predicts the size and type of the blocks (usually basic blocks) following an address. (The type of a block is the type of control-transfer instruction ending it. The type might be branch, indirect jump, return, etc.) A branch predictor to predict the direction of branches, an indirect jump predictor to predict jump targets, and a return address stack to predict return addresses.

Prediction starts with an address. The block predictor predicts the length of the block starting at that address and the type of CTI at the end of the block. The appropriate predictor will be used to predict the CTI. If the degree of the block predictor is greater than one the block predictor may predict additional blocks in the same cycle, up to the degree (tree height). The predictions are placed in a queue which is drained by the instruction cache.

There are several parameters controlling the capability of the block predictor. At some point they will be explained in more detail here.

There are several different branch predictors that can be selected. The yags predictor is the most accurate for a given GHR length. The hybrid is a close second, and is of lower cost. A gshare predictor and bimodal (called ez) are also provided. There is also a profiled hybrid predictor which is more trouble and less accurate than the regular hybrid. If you want to add your own predictor then see the file ez_pp_branch_pred.cc.

Several jump predictors are provided. Look in the source code for details.