Replies: 6 comments 2 replies
-
Sorry we had an internet outage during the SIG meeting, so I missed the last 10 minutes. Initially I didn't want to change the current Fetch implementation too much. The idea was to have separate units instanced underneath it:
Each of these would have their own parameter set, and the user could configure the topology of fetch to swap different algorithms in and out. An example configuration file:
(I'm not sure how feasible this is yet) As for the API, maybe it would be better if I placed the sub-components under a separate BranchPred component rather than fetch so we have a single point of interaction under multiple fetch implementations. Though I'm not sure how practical it would be as the complexity grows. For example if we had a fetch with a small BTB providing fetch PCs in 1 cycle, then a larger BTB which overrides the earlier prediction 2 cycles later (similar to BOOM IIRC). Then it would be heavily coupled with the fetch logic, and the BranchPred API might not be flexible enough for both implementations. Similarly if the predictor sub-components are hidden under BranchPred then it could make more complex topologies more difficult to implement. i.e. a BTB with a separate prefetch port. What are you thoughts? FWIW I started a simple predictor earlier today using an API like:
|
Beta Was this translation helpful? Give feedback.
-
In a correct-path-only trace-driven model, like Olympia is presently, branch prediction primarily affects the timing of sending packets of instructions from the trace to the Decode unit. Like an ITLB or ICache miss, a branch misprediction stalls the sending of the next (i.e., branch target) correct path instruction packet after the mispredicted branch until execution of that prior branch is completed. Initially in Olympia, rather than flushing on misprediction, a mispredicted branch completion need only wake the next fetch packet, which can be mechanized with a SignalOutPort from the branch execution pipe(s) back to Fetch. In such a model, branch prediction can also affect the size of the fetch packet when the predictor predicts a smaller packet than microarchitecture constraints would otherwise require. |
Beta Was this translation helpful? Give feedback.
-
Trying to understand the implications of the comments above on the possible API. Does that mean, a better API would simply be a Fetch API instead of a branch prediction API, i,e, an API that describes the Fetch Packet, instead of the output of the branch prediction? class FetchPacket { This FetchPacket can be output of the Fetch block and input to Decode unit. This is similar to what Olympia does today. Then, there will be more flexibility in implementing Fetch block, including branch prediction, but less opportunity to potentially reuse branch prediction implementations. |
Beta Was this translation helpful? Give feedback.
-
Thinking a little bit more about how branch prediction would work along with STF trace driven fetch. The following is an example uarch, based on BOOM.
|
Beta Was this translation helpful? Give feedback.
-
Sorry for the delay I've been on leave since last Thursday.
Maybe.. The discussion is moving away from branch predictors somewhat, perhaps it's due to branch predictor being an overloaded term referring either to the actual branch prediction algorithm (i.e. gshare/tage), or the component that synchronizes the various predictors to stream addresses into the instruction cache. I've been concentrating more on the branch prediction algorithm part, or branch direction predictor. |
Beta Was this translation helpful? Give feedback.
-
Some points captured in our meeting earlier today
|
Beta Was this translation helpful? Give feedback.
-
Per previous discussion, we would like to develop an API that can support various branch prediction implementations, including possibly any existing open-source implementations.
As an example, the API should be such that it can support:
Output of the branch predictor is a Fetch Packet. Each Fetch Packet represents a sequence of instructions and is characterized by at least :
Thus a simple API would like:
Beta Was this translation helpful? Give feedback.
All reactions