forked from Github_Repos/cvw
Added script to separate branch.log into separate logs for each benchmark.
This commit is contained in:
parent
568d0031d2
commit
ae42150519
24
bin/separateBrnach.sh
Executable file
24
bin/separateBrnach.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
File="$1"
|
||||
BeginLineNumbers=`cat $File | grep -n "BEGIN" | awk -NF ':' '{print $1}'`
|
||||
Name=`cat $File | grep -n "BEGIN" | awk -NF '/' '{print $6}'`
|
||||
EndLineNumbers=`cat $File | grep -n "END" | awk -NF ':' '{print $1}'`
|
||||
echo $Name
|
||||
echo $BeginLineNumbers
|
||||
echo $EndLineNumbers
|
||||
|
||||
NameArray=($Name)
|
||||
BeginLineNumberArray=($BeginLineNumbers)
|
||||
EndLineNumberArray=($EndLineNumbers)
|
||||
|
||||
mkdir -p branch
|
||||
Length=${#EndLineNumberArray[@]}
|
||||
for i in $(seq 0 1 $((Length-1)))
|
||||
do
|
||||
CurrName=${NameArray[$i]}
|
||||
CurrStart=$((${BeginLineNumberArray[$i]}+1))
|
||||
CurrEnd=$((${EndLineNumberArray[$i]}-1))
|
||||
echo $CurrName, $CurrStart, $CurrEnd
|
||||
sed -n "${CurrStart},${CurrEnd}p" $File > branch/${CurrName}_branch.log
|
||||
done
|
@ -544,9 +544,11 @@ logic [3:0] dummy;
|
||||
string direction;
|
||||
int file;
|
||||
logic PCSrcM;
|
||||
string LogFile;
|
||||
flopenrc #(1) PCSrcMReg(clk, reset, dut.core.FlushM, ~dut.core.StallM, dut.core.ifu.bpred.bpred.Predictor.DirPredictor.PCSrcE, PCSrcM);
|
||||
initial begin
|
||||
file = $fopen("branch.log", "w");
|
||||
LogFile = $psprintf("branch_%s%d.log", `BPRED_TYPE, `BPRED_SIZE);
|
||||
file = $fopen(LogFile, "w");
|
||||
end
|
||||
always @(posedge clk) begin
|
||||
if(StartSample) $fwrite(file, "BEGIN %s\n", memfilename);
|
||||
|
Loading…
Reference in New Issue
Block a user