[libre-riscv-dev] branches, prediction and backtrack

Luke Kenneth Casson Leighton lkcl at lkcl.net
Mon Feb 24 21:36:26 GMT 2020


On Mon, Feb 24, 2020 at 9:32 PM Staf Verhaegen <staf at fibraservi.eu> wrote:
>
> All,
>
> I may have missed it, but up to now I haven't seen anything on how
> branches will be handled coupled with the Dependency Matrix etc.
> Will branch prediction be included and if so how will a branch
> misprediction be handled ?

if you have mitch alsup's book chapters (let me know if i have sent
them to you already) it is described, there, and correctly implemented
in the soc git repo score6600.py.

i literally just described this mechanism 3 minutes ago and it is here:
http://bugs.libre-riscv.org/show_bug.cgi?id=186#c18

shadows are used for exceptions, branch speculative cancellation,
predication, LD/ST page faults - everything.

hypothetically we could execute both halves of the branch however i
could not get it to work, and instead it only takes one path (that can
be cancelled).

l.



More information about the libre-riscv-dev mailing list