diff options
author | Nadesh Ramanathan <nadeshramanathan88@gmail.com> | 2020-11-09 22:31:03 +0000 |
---|---|---|
committer | Nadesh Ramanathan <nadeshramanathan88@gmail.com> | 2020-11-09 22:31:03 +0000 |
commit | c676092e38d00cf12ea5a063ca3ab8c5bb50f659 (patch) | |
tree | 3493a307c6655d5f31d2dd623da6f54045e6cab2 /benchmarks/polybench-syn/run-vericert.sh | |
parent | 7fcc860e1283667255c592638394cc10bb882302 (diff) | |
download | vericert-c676092e38d00cf12ea5a063ca3ab8c5bb50f659.tar.gz vericert-c676092e38d00cf12ea5a063ca3ab8c5bb50f659.zip |
a script to execute polybench on vericert
Diffstat (limited to 'benchmarks/polybench-syn/run-vericert.sh')
-rwxr-xr-x | benchmarks/polybench-syn/run-vericert.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/benchmarks/polybench-syn/run-vericert.sh b/benchmarks/polybench-syn/run-vericert.sh new file mode 100755 index 0000000..38b425f --- /dev/null +++ b/benchmarks/polybench-syn/run-vericert.sh @@ -0,0 +1,25 @@ +#! /bin/bash + +top=$(pwd) + #set up +while read benchmark ; do + echo "Running "$benchmark + gcc $benchmark.c -o $benchmark.o + ./$benchmark.o + cresult=$(echo $?) + echo "C output: "$cresult + ../../bin/vericert --debug-hls $benchmark.c -o $benchmark.v + iverilog -o $benchmark.iver -- $benchmark.v + ./$benchmark.iver > $benchmark.tmp + veriresult=$(tail -1 $benchmark.tmp | cut -d' ' -f2) + cycles=$(tail -4 $benchmark.tmp | head -1 | tr -s ' ' | cut -d' ' -f3) + echo "Veri output: "$veriresult + if [ $cresult -ne $veriresult ] + then + echo "FAIL" + exit 0 + else + echo "PASS" + fi + echo $cycles > $benchmark.cycle +done < benchmark-list-master |