From 27fea2fe14a81f4e73e0e3e53ec5ac5db07a5d82 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sat, 19 Mar 2022 12:05:44 +0000 Subject: Delete extra data files and scripts --- .gitignore | 4 ++ benchmarks/polybench-syn-div/exec.csv | 27 ----------- benchmarks/polybench-syn-div/poly.csv | 26 ----------- benchmarks/polybench-syn-div/quartus_synth.tcl | 35 -------------- benchmarks/polybench-syn-div/run-vericert.sh | 41 ----------------- benchmarks/polybench-syn-div/script.R | 29 ------------ benchmarks/polybench-syn-div/setup-syn-vericert.sh | 24 ---------- benchmarks/polybench-syn-div/syn-remote.sh | 51 --------------------- benchmarks/polybench-syn/poly.csv | 26 ----------- benchmarks/polybench-syn/quartus_synth.tcl | 35 -------------- benchmarks/polybench-syn/run-vericert.sh | 46 ------------------- benchmarks/polybench-syn/script.R | 29 ------------ benchmarks/polybench-syn/setup-syn-vericert.sh | 24 ---------- benchmarks/polybench-syn/syn-remote.sh | 51 --------------------- scripts/quartus_synth.tcl | 35 ++++++++++++++ scripts/run-vericert.sh | 46 +++++++++++++++++++ scripts/script.R | 29 ++++++++++++ scripts/syn-remote.sh | 51 +++++++++++++++++++++ scripts/synthesis-results.scm | 5 +- src/hls/main | Bin 0 -> 54136 bytes 20 files changed, 167 insertions(+), 447 deletions(-) delete mode 100644 benchmarks/polybench-syn-div/exec.csv delete mode 100644 benchmarks/polybench-syn-div/poly.csv delete mode 100644 benchmarks/polybench-syn-div/quartus_synth.tcl delete mode 100755 benchmarks/polybench-syn-div/run-vericert.sh delete mode 100644 benchmarks/polybench-syn-div/script.R delete mode 100755 benchmarks/polybench-syn-div/setup-syn-vericert.sh delete mode 100755 benchmarks/polybench-syn-div/syn-remote.sh delete mode 100644 benchmarks/polybench-syn/poly.csv delete mode 100644 benchmarks/polybench-syn/quartus_synth.tcl delete mode 100755 benchmarks/polybench-syn/run-vericert.sh delete mode 100644 benchmarks/polybench-syn/script.R delete mode 100755 benchmarks/polybench-syn/setup-syn-vericert.sh delete mode 100755 benchmarks/polybench-syn/syn-remote.sh create mode 100644 scripts/quartus_synth.tcl create mode 100755 scripts/run-vericert.sh create mode 100644 scripts/script.R create mode 100755 scripts/syn-remote.sh create mode 100755 src/hls/main diff --git a/.gitignore b/.gitignore index 4acfbb0..586f3a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +/benchmarks/**/* +!/benchmarks/**/*.* +!/benchmarks/**/*/ + .*.aux *.a *.cma diff --git a/benchmarks/polybench-syn-div/exec.csv b/benchmarks/polybench-syn-div/exec.csv deleted file mode 100644 index e28109b..0000000 --- a/benchmarks/polybench-syn-div/exec.csv +++ /dev/null @@ -1,27 +0,0 @@ -adi,1422354 -heat-3d,580770 -fdtd-2d,901430 -jacobi-1d,19622 -seidel-2d,664780 -jacobi-2d,344072 -nussinov,954402 -floyd-warshall,5373798 -3mm,536114 -2mm,404478 -doitgen,351988 -bicg,53916 -mvt,70204 -atas,58424 -syrk,271816 -gemver,117394 -symm,240172 -gesummv,37700 -gemm,328104 -trmm,144688 -syr2k,436520 -cholesky,2535686 -trisolv,25192 -lu,2853646 -ludcmp,2601382 -durbin,22974 -covariance,288392 diff --git a/benchmarks/polybench-syn-div/poly.csv b/benchmarks/polybench-syn-div/poly.csv deleted file mode 100644 index fe71983..0000000 --- a/benchmarks/polybench-syn-div/poly.csv +++ /dev/null @@ -1,26 +0,0 @@ -benchmark,legupcycles,legupfreqMHz,leguplogicutilisation,legupregs,leguprams,legupdsps,legupcomptime,vericertcycles,vericertfreqMHz,vericertlogicutilisation,vericertregs,vericertrams,vericertdsps,vericertcomptime -durbin,15106,188.61,2509,4008,0,8,4.77,19852,199.2,3027,6168,0,8,0.077 -lu,482766,244.62,3116,4593,0,10,4.72,2634766,92.97,54806,106037,0,6,0.097 -ludcmp,470843,249.69,3605,5397,0,15,4.87,2401354,83.52,57145,111408,0,10,0.132 -trisolv,35382,213.9,2412,3749,0,3,4.73,33550,112.59,28101,55109,0,2,0.086 -2mm,60088,226.5,1114,1936,0,7,4.80,427098,116.9,32600,63212,0,18,0.136 -3mm,204195,188.96,4210,4801,0,43,4.88,539430,97.13,45073,89719,0,18,0.147 -atas,126288,193.24,3026,3719,0,10,4.80,92000,130.41,28603,56646,0,6,0.069 -bicg,11907,303.4,308,537,0,6,4.78,121134,122.74,30091,58799,0,8,0.097 -mvt,16806,384.47,372,597,0,4,4.79,139194,119.93,30753,60450,0,6,0.130 -doitgen,57199,252.14,909,1402,0,2,5.05,350302,126.18,19898,38461,0,4,0.105 -symm,64903,284.41,2155,3170,0,10,4.63,248930,113.92,27693,54514,0,14,0.115 -syrk,57395,278.01,598,976,0,2,4.73,309018,87.15,76889,57816,0,8,0.094 -syr2k,125705,240.85,3149,3679,0,6,4.85,478040,78.6,120116,82032,0,12,0.116 -trmm,41432,281.61,610,990,0,4,4.71,147528,105.61,64031,40502,0,4,0.089 -gemm,83676,192.68,1029,1544,0,35,4.79,360772,121.61,31853,62126,0,16,0.104 -gemver,28087,303.49,1854,2380,0,8,4.68,175326,107.27,32615,64118,0,14,0.099 -gesummv,6634,310.46,298,504,0,4,4.77,111094,79.97,113876,72908,0,10,0.101 -covariance,109992,245.16,2098,3096,0,5,4.77,297450,110.57,28729,56660,0,4,0.083 -fdtd-2d,214153,262.61,2736,3801,0,2,4.73,831912,108.23,31333,61421,0,6,0.116 -heat-3d,41059,115.54,3132,2910,0,60,4.92,555930,110.42,33915,67273,0,9,0.181 -jacobi-1d,6914,386.25,1355,1885,0,0,4.72,16606,277.93,1636,3305,0,0,0.071 -jacobi-2d,84609,240.79,2347,3185,0,2,4.81,357100,113.53,30393,59782,0,4,0.079 -seidel-2d,345294,232.4,2128,3337,0,2,4.68,875758,127.99,26948,53133,0,2,0.091 -floyd-warshall,1238764,235.52,1869,2367,0,2,4.71,4762766,109.4,59859,118101,0,2,0.094 -nussinov,216467,273.07,1078,1431,0,2,4.79,837958,90.73,60663,119303,0,0,0.080 diff --git a/benchmarks/polybench-syn-div/quartus_synth.tcl b/benchmarks/polybench-syn-div/quartus_synth.tcl deleted file mode 100644 index 6edbf0c..0000000 --- a/benchmarks/polybench-syn-div/quartus_synth.tcl +++ /dev/null @@ -1,35 +0,0 @@ -# PRiME pre-KAPow kernel flow -# Performs pre-KAPow run steps for instrumenting arbitrary Verilog for power monitoring -# James Davis, 2015 - -load_package flow - -project_new -overwrite syn -set_global_assignment -name FAMILY "Arria 10" -set_global_assignment -name DEVICE 10AX115H4F34E3LG -set_global_assignment -name SYSTEMVERILOG_FILE top.v -set_global_assignment -name TOP_LEVEL_ENTITY main -#set_global_assignment -name SDC_FILE syn.sdc -#set_global_assignment -name auto_resource_sharing on -#set_global_assignment -name enable_state_machine_inference on -#set_global_assignment -name optimization_technique area -#set_global_assignment -name synthesis_effort fast -#set_global_assignment -name AUTO_RAM_RECOGNITION on -#set_global_assignment -name remove_duplicate_registers on -#set_instance_assignment -name RAMSTYLE_ATTRIBUTE LOGIC -to ram - -execute_module -tool map - -execute_module -tool fit - -execute_module -tool sta - -#execute_module -tool eda -args "--simulation --tool=vcs" - -# set_global_assignment -name POWER_OUTPUT_SAF_NAME ${kernel}.asf -# set_global_assignment -name POWER_DEFAULT_INPUT_IO_TOGGLE_RATE "12.5 %" -# set_global_assignment -name POWER_REPORT_SIGNAL_ACTIVITY ON -# set_global_assignment -name POWER_REPORT_POWER_DISSIPATION ON -# execute_module -tool pow - -project_close diff --git a/benchmarks/polybench-syn-div/run-vericert.sh b/benchmarks/polybench-syn-div/run-vericert.sh deleted file mode 100755 index 6cf4cd9..0000000 --- a/benchmarks/polybench-syn-div/run-vericert.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash - -rm exec.csv - -top=$(pwd) - #set up -while read benchmark ; do - echo "Running "$benchmark - ./$benchmark.gcc > $benchmark.clog - cresult=$(cat $benchmark.clog | cut -d' ' -f2) - echo "C output: "$cresult - ./$benchmark.iver > $benchmark.tmp - veriresult=$(tail -1 $benchmark.tmp | cut -d' ' -f2) - cycles=$(tail -2 $benchmark.tmp | head -1 | tr -s ' ' | cut -d' ' -f2) - echo "Verilog output: "$veriresult - - #Undefined checks - if test -z $veriresult - then - echo "FAIL: Verilog returned nothing" - #exit 0 - fi - - # Don't care checks - if [ $veriresult == "x" ] - then - echo "FAIL: Verilog returned don't cares" - #exit 0 - fi - - # unequal result check - if [ $cresult -ne $veriresult ] - then - echo "FAIL: Verilog and C output do not match!" - #exit 0 - else - echo "PASS" - fi - name=$(echo $benchmark | awk -v FS="/" '{print $NF}') - echo $name","$cycles >> exec.csv -done < benchmark-list-master diff --git a/benchmarks/polybench-syn-div/script.R b/benchmarks/polybench-syn-div/script.R deleted file mode 100644 index 0be16da..0000000 --- a/benchmarks/polybench-syn-div/script.R +++ /dev/null @@ -1,29 +0,0 @@ -library("psych") - -data = read.csv("poly.csv", header=TRUE) -leguptime = (data$legupcycles/data$legupfreqMHz) -veritime = data$vericertcycles/data$vericertfreqMHz -print(lm(veritime ~ leguptime)) -leguputil = data$leguplogicutilisation/427200*100 -veriutil = data$vericertlogicutilisation/427200*100 -print(lm (veriutil ~ leguputil)) -legupct = data$legupcomptime -verict = data$vericertcomptime -print(lm ( verict ~ legupct )) - -cycleslowdown=data$vericertcycles/data$legupcycles - -print("Cycle count slow down") -print(geometric.mean(cycleslowdown)) -print("Wall clock slow down") -print(geometric.mean(veritime/leguptime)) -print("Area overhead") -print(geometric.mean(veriutil/leguputil)) -print("Compilation time speedup") -print(geometric.mean(legupct/verict)) -print("LegUp RAM use") -print(geometric.mean(data$legupregs)) -print("Vericert RAM use") -print(geometric.mean(data$vericertregs)) -print("Area overhead") -print(geometric.mean(data$vericertregs/data$legupregs)) diff --git a/benchmarks/polybench-syn-div/setup-syn-vericert.sh b/benchmarks/polybench-syn-div/setup-syn-vericert.sh deleted file mode 100755 index 22356f7..0000000 --- a/benchmarks/polybench-syn-div/setup-syn-vericert.sh +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/bash - -top=$(pwd) - #set up - basedir=poly-syn - sshhost=$1 - ssh $sshhost "cd ~; rm -r $basedir" - ssh $sshhost "cd ~; mkdir $basedir" - scp quartus_synth.tcl $sshhost:$basedir - scp syn-remote.sh $sshhost:$basedir - rm syn-list - - while read benchmark ; - do - echo "Copying "$benchmark" over" - name=$(echo $benchmark | awk -v FS="/" '{print $NF}') - echo "Name: "$name - benchdir="~/$basedir/$name" - scp $benchmark.v $sshhost:~/$basedir - echo $name >> syn-list - done < benchmark-list-master - - # copy list over - scp syn-list $sshhost:$basedir diff --git a/benchmarks/polybench-syn-div/syn-remote.sh b/benchmarks/polybench-syn-div/syn-remote.sh deleted file mode 100755 index 879db2e..0000000 --- a/benchmarks/polybench-syn-div/syn-remote.sh +++ /dev/null @@ -1,51 +0,0 @@ -#! /bin/bash - -#setup -while read benchmark ; -do -echo "Setting up "$benchmark -rm -r $benchmark -mkdir $benchmark -cp $benchmark.v $benchmark/top.v - -done < syn-list - -#synthesis - -count=0 -while read benchmark ; - -do -echo "Synthesising "$benchmark -cd $benchmark -quartus_sh -t ../quartus_synth.tcl & -let "count=count+1" -cd .. - -if [ $count -eq 4 ] -then -echo "I am here" -wait -count=0 -fi - -done < syn-list - -if [ $count -lt 4 ] -then -wait -fi - -#extract -while read benchmark ; do - cd $benchmark - echo $(pwd) - freq=$(grep MHz syn.sta.rpt | tail -2 | head -1 | awk '{print $2}') - lut=$(sed -n -e 8p syn.fit.summary | awk '{print $6}' | sed 's/,//g') - regs=$(sed -n -e 9p syn.fit.summary | awk '{print $4}') - bram=$(sed -n -e 13p syn.fit.summary | awk '{print $5}') - dsp=$(sed -n -e 14p syn.fit.summary | awk '{print $5}') - cd .. - echo $benchmark","$freq","$lut","$regs","$bram","$dsp >> results -done < syn-list - diff --git a/benchmarks/polybench-syn/poly.csv b/benchmarks/polybench-syn/poly.csv deleted file mode 100644 index fe71983..0000000 --- a/benchmarks/polybench-syn/poly.csv +++ /dev/null @@ -1,26 +0,0 @@ -benchmark,legupcycles,legupfreqMHz,leguplogicutilisation,legupregs,leguprams,legupdsps,legupcomptime,vericertcycles,vericertfreqMHz,vericertlogicutilisation,vericertregs,vericertrams,vericertdsps,vericertcomptime -durbin,15106,188.61,2509,4008,0,8,4.77,19852,199.2,3027,6168,0,8,0.077 -lu,482766,244.62,3116,4593,0,10,4.72,2634766,92.97,54806,106037,0,6,0.097 -ludcmp,470843,249.69,3605,5397,0,15,4.87,2401354,83.52,57145,111408,0,10,0.132 -trisolv,35382,213.9,2412,3749,0,3,4.73,33550,112.59,28101,55109,0,2,0.086 -2mm,60088,226.5,1114,1936,0,7,4.80,427098,116.9,32600,63212,0,18,0.136 -3mm,204195,188.96,4210,4801,0,43,4.88,539430,97.13,45073,89719,0,18,0.147 -atas,126288,193.24,3026,3719,0,10,4.80,92000,130.41,28603,56646,0,6,0.069 -bicg,11907,303.4,308,537,0,6,4.78,121134,122.74,30091,58799,0,8,0.097 -mvt,16806,384.47,372,597,0,4,4.79,139194,119.93,30753,60450,0,6,0.130 -doitgen,57199,252.14,909,1402,0,2,5.05,350302,126.18,19898,38461,0,4,0.105 -symm,64903,284.41,2155,3170,0,10,4.63,248930,113.92,27693,54514,0,14,0.115 -syrk,57395,278.01,598,976,0,2,4.73,309018,87.15,76889,57816,0,8,0.094 -syr2k,125705,240.85,3149,3679,0,6,4.85,478040,78.6,120116,82032,0,12,0.116 -trmm,41432,281.61,610,990,0,4,4.71,147528,105.61,64031,40502,0,4,0.089 -gemm,83676,192.68,1029,1544,0,35,4.79,360772,121.61,31853,62126,0,16,0.104 -gemver,28087,303.49,1854,2380,0,8,4.68,175326,107.27,32615,64118,0,14,0.099 -gesummv,6634,310.46,298,504,0,4,4.77,111094,79.97,113876,72908,0,10,0.101 -covariance,109992,245.16,2098,3096,0,5,4.77,297450,110.57,28729,56660,0,4,0.083 -fdtd-2d,214153,262.61,2736,3801,0,2,4.73,831912,108.23,31333,61421,0,6,0.116 -heat-3d,41059,115.54,3132,2910,0,60,4.92,555930,110.42,33915,67273,0,9,0.181 -jacobi-1d,6914,386.25,1355,1885,0,0,4.72,16606,277.93,1636,3305,0,0,0.071 -jacobi-2d,84609,240.79,2347,3185,0,2,4.81,357100,113.53,30393,59782,0,4,0.079 -seidel-2d,345294,232.4,2128,3337,0,2,4.68,875758,127.99,26948,53133,0,2,0.091 -floyd-warshall,1238764,235.52,1869,2367,0,2,4.71,4762766,109.4,59859,118101,0,2,0.094 -nussinov,216467,273.07,1078,1431,0,2,4.79,837958,90.73,60663,119303,0,0,0.080 diff --git a/benchmarks/polybench-syn/quartus_synth.tcl b/benchmarks/polybench-syn/quartus_synth.tcl deleted file mode 100644 index 6edbf0c..0000000 --- a/benchmarks/polybench-syn/quartus_synth.tcl +++ /dev/null @@ -1,35 +0,0 @@ -# PRiME pre-KAPow kernel flow -# Performs pre-KAPow run steps for instrumenting arbitrary Verilog for power monitoring -# James Davis, 2015 - -load_package flow - -project_new -overwrite syn -set_global_assignment -name FAMILY "Arria 10" -set_global_assignment -name DEVICE 10AX115H4F34E3LG -set_global_assignment -name SYSTEMVERILOG_FILE top.v -set_global_assignment -name TOP_LEVEL_ENTITY main -#set_global_assignment -name SDC_FILE syn.sdc -#set_global_assignment -name auto_resource_sharing on -#set_global_assignment -name enable_state_machine_inference on -#set_global_assignment -name optimization_technique area -#set_global_assignment -name synthesis_effort fast -#set_global_assignment -name AUTO_RAM_RECOGNITION on -#set_global_assignment -name remove_duplicate_registers on -#set_instance_assignment -name RAMSTYLE_ATTRIBUTE LOGIC -to ram - -execute_module -tool map - -execute_module -tool fit - -execute_module -tool sta - -#execute_module -tool eda -args "--simulation --tool=vcs" - -# set_global_assignment -name POWER_OUTPUT_SAF_NAME ${kernel}.asf -# set_global_assignment -name POWER_DEFAULT_INPUT_IO_TOGGLE_RATE "12.5 %" -# set_global_assignment -name POWER_REPORT_SIGNAL_ACTIVITY ON -# set_global_assignment -name POWER_REPORT_POWER_DISSIPATION ON -# execute_module -tool pow - -project_close diff --git a/benchmarks/polybench-syn/run-vericert.sh b/benchmarks/polybench-syn/run-vericert.sh deleted file mode 100755 index 9deaa10..0000000 --- a/benchmarks/polybench-syn/run-vericert.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -rm exec.csv - -top=$(pwd) -#set up -while read benchmark ; do - printf "%10s\t" $(echo "$benchmark" | sed -e 's|/| |g') - ./$benchmark.gcc > $benchmark.clog - cresult=$(cat $benchmark.clog | cut -d' ' -f2) - #echo "C output: "$cresult - #./$benchmark.iver > $benchmark.tmp - if [[ ! -f ./$benchmark.verilator/Vmain ]]; then - echo -e "\e[0;91mFAIL\e[0m: Verilog failed compilation" - continue - fi - ./$benchmark.verilator/Vmain > $benchmark.tmp - veriresult=$(tail -1 $benchmark.tmp | cut -d' ' -f2) - cycles=$(tail -2 $benchmark.tmp | head -1 | tr -s ' ' | cut -d' ' -f2) - #echo "Verilog output: "$veriresult - - #Undefined checks - if [[ -z "$veriresult" ]] - then - echo "\e[0;91mFAIL\e[0m: Verilog returned nothing" - #exit 0 - fi - - # Don't care checks - if [[ $veriresult == "x" ]] - then - echo "\e[0;91mFAIL\e[0m: Verilog returned don't cares" - #exit 0 - fi - - # unequal result check - if [[ $cresult -ne $veriresult ]] - then - echo -e "\e[0;91mFAIL\e[0m: Verilog and C output do not match!" - #exit 0 - else - echo -e "\e[0;92mPASS\e[0m" - fi - name=$(echo $benchmark | awk -v FS="/" '{print $NF}') - echo $name","$cycles >> exec.csv -done < benchmark-list-master diff --git a/benchmarks/polybench-syn/script.R b/benchmarks/polybench-syn/script.R deleted file mode 100644 index 0be16da..0000000 --- a/benchmarks/polybench-syn/script.R +++ /dev/null @@ -1,29 +0,0 @@ -library("psych") - -data = read.csv("poly.csv", header=TRUE) -leguptime = (data$legupcycles/data$legupfreqMHz) -veritime = data$vericertcycles/data$vericertfreqMHz -print(lm(veritime ~ leguptime)) -leguputil = data$leguplogicutilisation/427200*100 -veriutil = data$vericertlogicutilisation/427200*100 -print(lm (veriutil ~ leguputil)) -legupct = data$legupcomptime -verict = data$vericertcomptime -print(lm ( verict ~ legupct )) - -cycleslowdown=data$vericertcycles/data$legupcycles - -print("Cycle count slow down") -print(geometric.mean(cycleslowdown)) -print("Wall clock slow down") -print(geometric.mean(veritime/leguptime)) -print("Area overhead") -print(geometric.mean(veriutil/leguputil)) -print("Compilation time speedup") -print(geometric.mean(legupct/verict)) -print("LegUp RAM use") -print(geometric.mean(data$legupregs)) -print("Vericert RAM use") -print(geometric.mean(data$vericertregs)) -print("Area overhead") -print(geometric.mean(data$vericertregs/data$legupregs)) diff --git a/benchmarks/polybench-syn/setup-syn-vericert.sh b/benchmarks/polybench-syn/setup-syn-vericert.sh deleted file mode 100755 index 22356f7..0000000 --- a/benchmarks/polybench-syn/setup-syn-vericert.sh +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/bash - -top=$(pwd) - #set up - basedir=poly-syn - sshhost=$1 - ssh $sshhost "cd ~; rm -r $basedir" - ssh $sshhost "cd ~; mkdir $basedir" - scp quartus_synth.tcl $sshhost:$basedir - scp syn-remote.sh $sshhost:$basedir - rm syn-list - - while read benchmark ; - do - echo "Copying "$benchmark" over" - name=$(echo $benchmark | awk -v FS="/" '{print $NF}') - echo "Name: "$name - benchdir="~/$basedir/$name" - scp $benchmark.v $sshhost:~/$basedir - echo $name >> syn-list - done < benchmark-list-master - - # copy list over - scp syn-list $sshhost:$basedir diff --git a/benchmarks/polybench-syn/syn-remote.sh b/benchmarks/polybench-syn/syn-remote.sh deleted file mode 100755 index 879db2e..0000000 --- a/benchmarks/polybench-syn/syn-remote.sh +++ /dev/null @@ -1,51 +0,0 @@ -#! /bin/bash - -#setup -while read benchmark ; -do -echo "Setting up "$benchmark -rm -r $benchmark -mkdir $benchmark -cp $benchmark.v $benchmark/top.v - -done < syn-list - -#synthesis - -count=0 -while read benchmark ; - -do -echo "Synthesising "$benchmark -cd $benchmark -quartus_sh -t ../quartus_synth.tcl & -let "count=count+1" -cd .. - -if [ $count -eq 4 ] -then -echo "I am here" -wait -count=0 -fi - -done < syn-list - -if [ $count -lt 4 ] -then -wait -fi - -#extract -while read benchmark ; do - cd $benchmark - echo $(pwd) - freq=$(grep MHz syn.sta.rpt | tail -2 | head -1 | awk '{print $2}') - lut=$(sed -n -e 8p syn.fit.summary | awk '{print $6}' | sed 's/,//g') - regs=$(sed -n -e 9p syn.fit.summary | awk '{print $4}') - bram=$(sed -n -e 13p syn.fit.summary | awk '{print $5}') - dsp=$(sed -n -e 14p syn.fit.summary | awk '{print $5}') - cd .. - echo $benchmark","$freq","$lut","$regs","$bram","$dsp >> results -done < syn-list - diff --git a/scripts/quartus_synth.tcl b/scripts/quartus_synth.tcl new file mode 100644 index 0000000..6edbf0c --- /dev/null +++ b/scripts/quartus_synth.tcl @@ -0,0 +1,35 @@ +# PRiME pre-KAPow kernel flow +# Performs pre-KAPow run steps for instrumenting arbitrary Verilog for power monitoring +# James Davis, 2015 + +load_package flow + +project_new -overwrite syn +set_global_assignment -name FAMILY "Arria 10" +set_global_assignment -name DEVICE 10AX115H4F34E3LG +set_global_assignment -name SYSTEMVERILOG_FILE top.v +set_global_assignment -name TOP_LEVEL_ENTITY main +#set_global_assignment -name SDC_FILE syn.sdc +#set_global_assignment -name auto_resource_sharing on +#set_global_assignment -name enable_state_machine_inference on +#set_global_assignment -name optimization_technique area +#set_global_assignment -name synthesis_effort fast +#set_global_assignment -name AUTO_RAM_RECOGNITION on +#set_global_assignment -name remove_duplicate_registers on +#set_instance_assignment -name RAMSTYLE_ATTRIBUTE LOGIC -to ram + +execute_module -tool map + +execute_module -tool fit + +execute_module -tool sta + +#execute_module -tool eda -args "--simulation --tool=vcs" + +# set_global_assignment -name POWER_OUTPUT_SAF_NAME ${kernel}.asf +# set_global_assignment -name POWER_DEFAULT_INPUT_IO_TOGGLE_RATE "12.5 %" +# set_global_assignment -name POWER_REPORT_SIGNAL_ACTIVITY ON +# set_global_assignment -name POWER_REPORT_POWER_DISSIPATION ON +# execute_module -tool pow + +project_close diff --git a/scripts/run-vericert.sh b/scripts/run-vericert.sh new file mode 100755 index 0000000..9deaa10 --- /dev/null +++ b/scripts/run-vericert.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +rm exec.csv + +top=$(pwd) +#set up +while read benchmark ; do + printf "%10s\t" $(echo "$benchmark" | sed -e 's|/| |g') + ./$benchmark.gcc > $benchmark.clog + cresult=$(cat $benchmark.clog | cut -d' ' -f2) + #echo "C output: "$cresult + #./$benchmark.iver > $benchmark.tmp + if [[ ! -f ./$benchmark.verilator/Vmain ]]; then + echo -e "\e[0;91mFAIL\e[0m: Verilog failed compilation" + continue + fi + ./$benchmark.verilator/Vmain > $benchmark.tmp + veriresult=$(tail -1 $benchmark.tmp | cut -d' ' -f2) + cycles=$(tail -2 $benchmark.tmp | head -1 | tr -s ' ' | cut -d' ' -f2) + #echo "Verilog output: "$veriresult + + #Undefined checks + if [[ -z "$veriresult" ]] + then + echo "\e[0;91mFAIL\e[0m: Verilog returned nothing" + #exit 0 + fi + + # Don't care checks + if [[ $veriresult == "x" ]] + then + echo "\e[0;91mFAIL\e[0m: Verilog returned don't cares" + #exit 0 + fi + + # unequal result check + if [[ $cresult -ne $veriresult ]] + then + echo -e "\e[0;91mFAIL\e[0m: Verilog and C output do not match!" + #exit 0 + else + echo -e "\e[0;92mPASS\e[0m" + fi + name=$(echo $benchmark | awk -v FS="/" '{print $NF}') + echo $name","$cycles >> exec.csv +done < benchmark-list-master diff --git a/scripts/script.R b/scripts/script.R new file mode 100644 index 0000000..0be16da --- /dev/null +++ b/scripts/script.R @@ -0,0 +1,29 @@ +library("psych") + +data = read.csv("poly.csv", header=TRUE) +leguptime = (data$legupcycles/data$legupfreqMHz) +veritime = data$vericertcycles/data$vericertfreqMHz +print(lm(veritime ~ leguptime)) +leguputil = data$leguplogicutilisation/427200*100 +veriutil = data$vericertlogicutilisation/427200*100 +print(lm (veriutil ~ leguputil)) +legupct = data$legupcomptime +verict = data$vericertcomptime +print(lm ( verict ~ legupct )) + +cycleslowdown=data$vericertcycles/data$legupcycles + +print("Cycle count slow down") +print(geometric.mean(cycleslowdown)) +print("Wall clock slow down") +print(geometric.mean(veritime/leguptime)) +print("Area overhead") +print(geometric.mean(veriutil/leguputil)) +print("Compilation time speedup") +print(geometric.mean(legupct/verict)) +print("LegUp RAM use") +print(geometric.mean(data$legupregs)) +print("Vericert RAM use") +print(geometric.mean(data$vericertregs)) +print("Area overhead") +print(geometric.mean(data$vericertregs/data$legupregs)) diff --git a/scripts/syn-remote.sh b/scripts/syn-remote.sh new file mode 100755 index 0000000..879db2e --- /dev/null +++ b/scripts/syn-remote.sh @@ -0,0 +1,51 @@ +#! /bin/bash + +#setup +while read benchmark ; +do +echo "Setting up "$benchmark +rm -r $benchmark +mkdir $benchmark +cp $benchmark.v $benchmark/top.v + +done < syn-list + +#synthesis + +count=0 +while read benchmark ; + +do +echo "Synthesising "$benchmark +cd $benchmark +quartus_sh -t ../quartus_synth.tcl & +let "count=count+1" +cd .. + +if [ $count -eq 4 ] +then +echo "I am here" +wait +count=0 +fi + +done < syn-list + +if [ $count -lt 4 ] +then +wait +fi + +#extract +while read benchmark ; do + cd $benchmark + echo $(pwd) + freq=$(grep MHz syn.sta.rpt | tail -2 | head -1 | awk '{print $2}') + lut=$(sed -n -e 8p syn.fit.summary | awk '{print $6}' | sed 's/,//g') + regs=$(sed -n -e 9p syn.fit.summary | awk '{print $4}') + bram=$(sed -n -e 13p syn.fit.summary | awk '{print $5}') + dsp=$(sed -n -e 14p syn.fit.summary | awk '{print $5}') + cd .. + echo $benchmark","$freq","$lut","$regs","$bram","$dsp >> results +done < syn-list + diff --git a/scripts/synthesis-results.scm b/scripts/synthesis-results.scm index 11c66c1..94c169f 100755 --- a/scripts/synthesis-results.scm +++ b/scripts/synthesis-results.scm @@ -91,7 +91,7 @@ (lambda () (list name (xml-matcher (ssax:xml->sxml (current-input-port) '())))))) -(define (to-csv-record b head results) +(define ((to-csv-record b head) results) (let ((res (map (lambda (key) (cadr (assoc key (cadr results)))) head))) (csv:fmt-row (if b res (cons (car results) res))))) @@ -126,8 +126,7 @@ (let ((head (split-at-comma (or (check-opt 'keys) "slice,ramfifo,delay"))) (suppress (split-at-comma (or (check-opt 'suppress) "none"))) (files (get-files-from-op operands))) - (let ((body (map (lambda (f) (to-csv-record (member "name" suppress) head f)) - (convert-files files))) + (let ((body (map (to-csv-record (member "name" suppress) head) (convert-files files))) (header (csv:fmt-row (if (member "name" suppress) head (cons "name" head))))) (with-output (lambda () diff --git a/src/hls/main b/src/hls/main new file mode 100755 index 0000000..98b4e1b Binary files /dev/null and b/src/hls/main differ -- cgit