- 實作Branch prediction
- 2-Bit History
- SETUP
- Environment:WIN10
- IDE:Pycharm 4.0 Python 3.7
- Language:Python
Initial state:
initialstate0='N'##Initial state
initialstate1='N'#Initial state
Eample : N,T,T,N,T,T,N,T,T,N,T,T
-------------------Round51-------------------
2BC State:WN,ST,ST,SN
Selector=01,Pred=T,Outcome=T,Hit
Misprediction=0.098039
REGstate()
Example:
2BC State:WN,ST,ST,SN
Selector=01,Pred=T,Outcome=T,Hit
for i in range (len(outcome))
Misprediction=0.098039