Forums - Open Redstone Engineers
2Bit Branch Predictor (saturation counter) - Printable Version

+- Forums - Open Redstone Engineers (https://forum.openredstone.org)
+-- Forum: ORE General (https://forum.openredstone.org/forum-39.html)
+--- Forum: Tutorials (https://forum.openredstone.org/forum-24.html)
+---- Forum: Advanced Tutorials (https://forum.openredstone.org/forum-26.html)
+----- Forum: Devices (https://forum.openredstone.org/forum-27.html)
+----- Thread: 2Bit Branch Predictor (saturation counter) (/thread-14203.html)



2Bit Branch Predictor (saturation counter) - greatgamer34 - 06-25-2018




So its just an down/up 2 bit counter with edge protection. This is also called a saturation counter, IE) when decrementing and at state 00 it will remain at state 00 instead of decrementing to 11; when incrementing at state 11 it will remain at state 11 instead of incrementing to 00. The MSB is the BP's prediction(1=take, 0 =dont take), the LSB is the last outcome of the CPU(did it take the branch or not?; 1 = taken, 0 = did not take). The down/up control line comes from the result of the branch after the result is found(1 clock cycle later).