Change benchmark to calc MD5 on 1024 softcores

This commit is contained in:
Nikolay Puzanov
2023-06-15 17:40:46 +03:00
parent 89c82cb611
commit 047bd9c42b
21 changed files with 1376 additions and 931 deletions

40
run.sh
View File

@@ -1,26 +1,31 @@
#!/usr/bin/env bash
set -e
BUILD=__build.sh
RUN=__run.sh
if [ -n "$1" ]
if [ "$1" == "all" ]
then
tests=$(ls -1d test-*)
elif [ -n "$1" ]
then
tests=$1
else
tests=$(ls -1d test-*)
echo "Usage: $0 <TEST_DIRECTORY | all>"
exit -1
fi
## Log header
echo >> results.txt
echo "---------- Simulator's benchmark -----------" >> results.txt
echo $(date) >> results.txt
echo >> results.txt
## Run tests
for test_dir in $tests
do
if [ ! -d "$test_dir" ]
then
echo "Directory $test_dit is not exists. Break"
echo "Directory $test_dir is not exists"
exit -1
fi
@@ -29,15 +34,30 @@ do
echo "#### Run benchmark in $test_dir"
cd $test_dir
./$BUILD
start_ms=$(date +%s%N | cut -b1-13)
./$RUN
stop_ms=$(date +%s%N | cut -b1-13)
if [ $? -eq 0 ]
then
start_ms=$(date +%s%N | cut -b1-13)
./$RUN
if [ $? -eq 0 ]
then
stop_ms=$(date +%s%N | cut -b1-13)
ms=$(expr $stop_ms - $start_ms)
echo "#### $test_dir: $ms milliseconds"
else
ms="RUN FAIL"
echo "#### $test_dir: run fail"
fi
else
ms="BUILD FAIL"
echo "#### $test_dir: build fail"
fi
echo ""
cd ..
ms=$(expr $stop_ms - $start_ms)
echo "#### $test_dir: $ms milliseconds"
echo
echo "$test_dir: $ms" >> results.txt
else
echo "Skip $test_dir directory"