diff --git a/bin/CModelBTBAccuracy.sh b/bin/CModelBTBAccuracy.sh index 5cde4238c..e4a26fb85 100755 --- a/bin/CModelBTBAccuracy.sh +++ b/bin/CModelBTBAccuracy.sh @@ -52,6 +52,6 @@ do # with such long precision bc outputs onto multiple lines # must remove \n and \ from string Product=`echo "$Product" | tr -d '\n' | tr -d '\\\'` - GeoMean=`perl -E "say $Product**(1/$Count)"` + GeoMean=`perl -E "say $Product**(1/$Count) * 100"` echo "$Pred$Size $GeoMean" done diff --git a/bin/SeparateBranch.sh b/bin/SeparateBranch.sh index eb4ee4494..c81ba32c9 100755 --- a/bin/SeparateBranch.sh +++ b/bin/SeparateBranch.sh @@ -43,7 +43,8 @@ TrainLineNumberArray=($TrainLineNumbers) BeginLineNumberArray=($BeginLineNumbers) EndLineNumberArray=($EndLineNumbers) -mkdir -p branch +OutputPath=${File%%.*} +mkdir -p $OutputPath Length=${#EndLineNumberArray[@]} for i in $(seq 0 1 $((Length-1))) do @@ -51,5 +52,5 @@ do CurrTrain=$((${TrainLineNumberArray[$i]}+1)) CurrEnd=$((${EndLineNumberArray[$i]}-1)) echo $CurrName, $CurrTrain, $CurrEnd - sed -n "${CurrTrain},${CurrEnd}p" $File > branch/${CurrName}_branch.log + sed -n "${CurrTrain},${CurrEnd}p" $File > $OutputPath/${CurrName}_${File} done diff --git a/bin/parseHPMC.py b/bin/parseHPMC.py index bb6d2871e..8e274a200 100755 --- a/bin/parseHPMC.py +++ b/bin/parseHPMC.py @@ -32,10 +32,12 @@ import math import numpy as np import argparse -RefData = [('twobitCModel6', 'twobitCModel', 64, 9.65280765420711), ('twobitCModel8', 'twobitCModel', 256, 8.75120245829945), ('twobitCModel10', 'twobitCModel', 1024, 8.1318382397263), +RefDataBP = [('twobitCModel6', 'twobitCModel', 64, 9.65280765420711), ('twobitCModel8', 'twobitCModel', 256, 8.75120245829945), ('twobitCModel10', 'twobitCModel', 1024, 8.1318382397263), ('twobitCModel12', 'twobitCModel', 4096, 7.53026646633342), ('twobitCModel14', 'twobitCModel', 16384, 6.07679338544009), ('twobitCModel16', 'twobitCModel', 65536, 6.07679338544009), ('gshareCModel6', 'gshareCModel', 64, 10.6602835418646), ('gshareCModel8', 'gshareCModel', 256, 8.38384710559667), ('gshareCModel10', 'gshareCModel', 1024, 6.36847432155534), ('gshareCModel12', 'gshareCModel', 4096, 3.91108491151983), ('gshareCModel14', 'gshareCModel', 16384, 2.83926519215395), ('gshareCModel16', 'gshareCModel', 65536, .60213659066941)] +RefDataBTB = [('BTBCModel6', 'BTBCModel', 64, 1.11806778745097), ('BTBCModel8', 'BTBCModel', 256, 0.183833943219956), ('BTBCModel10', 'BTBCModel', 1024, 0.0109271020749376), + ('BTBCModel12', 'BTBCModel', 4096, 0.00437600802791213), ('BTBCModel14', 'BTBCModel', 16384, 0.00188756234204305), ('BTBCModel16', 'BTBCModel', 65536, 0.00188756234204305)] def ParseBranchListFile(path): '''Take the path to the list of Questa Sim log files containing the performance counters outputs. File @@ -436,7 +438,8 @@ performanceCounterList = BuildDataBase(predictorLogs) # builds a databas benchmarkFirstList = ReorderDataBase(performanceCounterList) # reorder first by benchmark then trace benchmarkDict = ExtractSelectedData(benchmarkFirstList) # filters to just the desired performance counter metric -if(args.reference): benchmarkDict['Mean'].extend(RefData) +if(args.reference and args.direction): benchmarkDict['Mean'].extend(RefDataBP) +if(args.reference and args.target): benchmarkDict['Mean'].extend(RefDataBTB) #print(benchmarkDict['Mean']) #print(benchmarkDict['aha-mont64Speed']) #print(benchmarkDict) diff --git a/linux/devicetree/wally-artya7.dts b/linux/devicetree/wally-artya7.dts index 6dab66c7b..1ad559bbc 100644 --- a/linux/devicetree/wally-artya7.dts +++ b/linux/devicetree/wally-artya7.dts @@ -31,6 +31,7 @@ status = "okay"; compatible = "riscv"; riscv,isa = "rv64imafdcsu"; + riscv,isa-extensions = "imafdc", "sstc", "svinval", "svnapot", "svpbmt", "zba", "zbb", "zbc", "zbs", "zicbom", "zicbop", "zicbopz", "zicntr", "zicsr", "zifencei", "zihpm"; mmu-type = "riscv,sv48"; interrupt-controller { diff --git a/linux/devicetree/wally-virt.dts b/linux/devicetree/wally-virt.dts index 7cc0f757a..edf602df3 100644 --- a/linux/devicetree/wally-virt.dts +++ b/linux/devicetree/wally-virt.dts @@ -31,6 +31,7 @@ status = "okay"; compatible = "riscv"; riscv,isa = "rv64imafdcsu"; + riscv,isa-extensions = "svadu"; mmu-type = "riscv,sv48"; interrupt-controller { diff --git a/sim/bpred-sim.py b/sim/bpred-sim.py index 209e21fc4..530fab70c 100755 --- a/sim/bpred-sim.py +++ b/sim/bpred-sim.py @@ -114,7 +114,20 @@ def main(): grepstr="") configs.append(tc) - if(args.target or args.iclass): + if(args.target): + # BTB and class size sweep + bpdSize = [6, 8, 10, 12, 14, 16] + for CurrBPSize in bpdSize: + name = 'BTB'+str(CurrBPSize) + configOptions = "+define+INSTR_CLASS_PRED=0 +define+BPRED_OVERRIDE +define+BPRED_TYPE=\`BP_GSHARE" + "+define+BPRED_SIZE=16" + "+define+RAS_SIZE=16+define+BTB_SIZE=" + str(CurrBPSize) + "+define+BTB_OVERRIDE" + tc = TestCase( + name=name, + variant="rv32gc", + cmd="vsim > {} -c <