forked from Github_Repos/cvw
Modified branch logger to indicate when the warmup period is done.
The branch-predictor-simulator also changed to support this.
This commit is contained in:
parent
0441e3b736
commit
2d49c4582c
@ -27,6 +27,7 @@
|
||||
################################################################################################
|
||||
|
||||
File="$1"
|
||||
TrainLineNumbers=`cat $File | grep -n "TRAIN" | awk -NF ':' '{print $1}'`
|
||||
BeginLineNumbers=`cat $File | grep -n "BEGIN" | awk -NF ':' '{print $1}'`
|
||||
Name=`cat $File | grep -n "BEGIN" | awk -NF '/' '{print $6_$4}'`
|
||||
EndLineNumbers=`cat $File | grep -n "END" | awk -NF ':' '{print $1}'`
|
||||
@ -35,6 +36,7 @@ echo $BeginLineNumbers
|
||||
echo $EndLineNumbers
|
||||
|
||||
NameArray=($Name)
|
||||
TrainLineNumberArray=($TrainLineNumbers)
|
||||
BeginLineNumberArray=($BeginLineNumbers)
|
||||
EndLineNumberArray=($EndLineNumbers)
|
||||
|
||||
@ -43,8 +45,8 @@ Length=${#EndLineNumberArray[@]}
|
||||
for i in $(seq 0 1 $((Length-1)))
|
||||
do
|
||||
CurrName=${NameArray[$i]}
|
||||
CurrStart=$((${BeginLineNumberArray[$i]}+1))
|
||||
CurrTrain=$((${TrainLineNumberArray[$i]}+1))
|
||||
CurrEnd=$((${EndLineNumberArray[$i]}-1))
|
||||
echo $CurrName, $CurrStart, $CurrEnd
|
||||
sed -n "${CurrStart},${CurrEnd}p" $File > branch/${CurrName}_branch.log
|
||||
echo $CurrName, $CurrTrain, $CurrEnd
|
||||
sed -n "${CurrTrain},${CurrEnd}p" $File > branch/${CurrName}_branch.log
|
||||
done
|
||||
|
@ -545,12 +545,16 @@ logic [3:0] dummy;
|
||||
int file;
|
||||
logic PCSrcM;
|
||||
string LogFile;
|
||||
logic resetD, resetEdge;
|
||||
flopenrc #(1) PCSrcMReg(clk, reset, dut.core.FlushM, ~dut.core.StallM, dut.core.ifu.bpred.bpred.Predictor.DirPredictor.PCSrcE, PCSrcM);
|
||||
flop #(1) ResetDReg(clk, reset, resetD);
|
||||
assign resetEdge = ~reset & resetD;
|
||||
initial begin
|
||||
LogFile = $psprintf("branch_%s%d.log", `BPRED_TYPE, `BPRED_SIZE);
|
||||
LogFile = $psprintf("branch_%s%0d.log", `BPRED_TYPE, `BPRED_SIZE);
|
||||
file = $fopen(LogFile, "w");
|
||||
end
|
||||
always @(posedge clk) begin
|
||||
if(resetEdge) $fwrite(file, "TRAIN\n");
|
||||
if(StartSample) $fwrite(file, "BEGIN %s\n", memfilename);
|
||||
if(dut.core.ifu.InstrClassM[0] & ~dut.core.StallW & ~dut.core.FlushW & dut.core.InstrValidM) begin
|
||||
direction = PCSrcM ? "t" : "n";
|
||||
|
Loading…
Reference in New Issue
Block a user