From ea403e02ffd5daf288a5efd9157b11689bfb3f47 Mon Sep 17 00:00:00 2001 From: Rose Thompson Date: Mon, 23 Oct 2023 16:09:40 -0500 Subject: [PATCH] Updated bpred-sim.py to take command line options to select between sweeping direction, target, class, or ras prediction. --- sim/bpred-sim.py | 117 ++++++++++++++++++++++++++--------------------- 1 file changed, 65 insertions(+), 52 deletions(-) diff --git a/sim/bpred-sim.py b/sim/bpred-sim.py index 9a59e8866..9e7ec12a6 100755 --- a/sim/bpred-sim.py +++ b/sim/bpred-sim.py @@ -11,6 +11,7 @@ # ################################## import sys,os,shutil +import argparse class bcolors: HEADER = '\033[95m' @@ -46,55 +47,6 @@ configs = [ ) ] -# bpdSize = [6, 8, 10, 12, 14, 16] -# bpdType = ['twobit', 'gshare', 'global', 'gshare_basic', 'global_basic', 'local_basic'] -# for CurrBPType in bpdType: -# for CurrBPSize in bpdSize: -# name = CurrBPType+str(CurrBPSize) -# configOptions = "+define+INSTR_CLASS_PRED=0 +define+BPRED_OVERRIDE +define+BPRED_TYPE=" + str(bpdType.index(CurrBPType)) + "+define+BPRED_SIZE=" + str(CurrBPSize) -# tc = TestCase( -# name=name, -# variant="rv32gc", -# cmd="vsim > {} -c < {} -c < {} -c < {} -c < {} -c < {} -c < {} -c < {} -c <