static.py 271 Bytes
Newer Older
Alan Marchiori's avatar
Alan Marchiori committed
1 2 3 4 5 6 7 8 9 10

class static_predictor:
    def __init__(self):
        pass
    
    def predict(self, pc, target, outcome, verbose):
        if target > pc:
            return 'N' # target is after PC, --> FORWARD branch
        else:
            return 'T' # backwards branch