Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scaling and generally clean up BEEBS #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
729 changes: 729 additions & 0 deletions ChangeLog

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/riscv32/boards/ri5cyverilator/boardsupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */

#define BOARD_REPEAT_FACTOR 32
#define BOARD_REPEAT_FACTOR 1
13 changes: 5 additions & 8 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5126,8 +5126,10 @@ else
fi


# Architecture, board and chip specific and user CFLAGS and LDFLAGS
CFLAGS="$CFLAGS $ARCH_CFLAGS $CHIP_CFLAGS $BOARD_CFLAGS $USER_CFLAGS"
# Architecture, board and chip specific and user CFLAGS and LDFLAGS. Note that
# we always compile with debug info, although this can be overridden by
# USER_CFLAGS
CFLAGS="$CFLAGS $ARCH_CFLAGS $CHIP_CFLAGS $BOARD_CFLAGS -g3 $USER_CFLAGS"
LDFLAGS="$LDFLAGS $ARCH_LDFLAGS $CHIP_LDFLAGS $BOARD_LDFLAGS $USER_LDFLAGS"

case `pwd` in
Expand Down Expand Up @@ -15267,7 +15269,7 @@ ac_config_headers="$ac_config_headers config.h"

# Generate makefiles

ac_config_files="$ac_config_files Makefile doc/Makefile src/Makefile src/aha-compress/Makefile src/aha-mont64/Makefile src/bs/Makefile src/bubblesort/Makefile src/cnt/Makefile src/compress/Makefile src/cover/Makefile src/crc/Makefile src/crc32/Makefile src/ctl/Makefile src/ctl-stack/Makefile src/ctl-string/Makefile src/ctl-vector/Makefile src/cubic/Makefile src/dijkstra/Makefile src/dtoa/Makefile src/duff/Makefile src/edn/Makefile src/expint/Makefile src/fac/Makefile src/fasta/Makefile src/fdct/Makefile src/fibcall/Makefile src/fir/Makefile src/frac/Makefile src/huffbench/Makefile src/insertsort/Makefile src/janne_complex/Makefile src/jfdctint/Makefile src/lcdnum/Makefile src/levenshtein/Makefile src/ludcmp/Makefile src/matmult/Makefile src/matmult-float/Makefile src/matmult-int/Makefile src/mergesort/Makefile src/miniz/Makefile src/minver/Makefile src/nbody/Makefile src/ndes/Makefile src/nettle-aes/Makefile src/nettle-arcfour/Makefile src/nettle-cast128/Makefile src/nettle-des/Makefile src/nettle-md5/Makefile src/nettle-sha256/Makefile src/newlib-exp/Makefile src/newlib-log/Makefile src/newlib-mod/Makefile src/newlib-sqrt/Makefile src/ns/Makefile src/nsichneu/Makefile src/picojpeg/Makefile src/prime/Makefile src/qrduino/Makefile src/qsort/Makefile src/qurt/Makefile src/recursion/Makefile src/rijndael/Makefile src/select/Makefile src/sglib-arraybinsearch/Makefile src/sglib-arrayheapsort/Makefile src/sglib-arrayquicksort/Makefile src/sglib-arraysort/Makefile src/sglib-dllist/Makefile src/sglib-hashtable/Makefile src/sglib-listinsertsort/Makefile src/sglib-listsort/Makefile src/sglib-queue/Makefile src/sglib-rbtree/Makefile src/slre/Makefile src/sqrt/Makefile src/st/Makefile src/statemate/Makefile src/stb_perlin/Makefile src/stringsearch1/Makefile src/strstr/Makefile src/tarai/Makefile src/template/Makefile src/trio/Makefile src/trio-snprintf/Makefile src/trio-sscanf/Makefile src/ud/Makefile src/whetstone/Makefile src/wikisort/Makefile support/Makefile testsuite/Makefile testsuite/beebs.test/Makefile testsuite/config/Makefile testsuite/lib/Makefile"
ac_config_files="$ac_config_files Makefile doc/Makefile src/Makefile src/aha-compress/Makefile src/aha-mont64/Makefile src/bs/Makefile src/bubblesort/Makefile src/cnt/Makefile src/compress/Makefile src/cover/Makefile src/crc/Makefile src/crc32/Makefile src/ctl-stack/Makefile src/ctl-string/Makefile src/ctl-vector/Makefile src/cubic/Makefile src/dijkstra/Makefile src/dtoa/Makefile src/duff/Makefile src/edn/Makefile src/expint/Makefile src/fac/Makefile src/fasta/Makefile src/fdct/Makefile src/fibcall/Makefile src/fir/Makefile src/frac/Makefile src/huffbench/Makefile src/insertsort/Makefile src/janne_complex/Makefile src/jfdctint/Makefile src/lcdnum/Makefile src/levenshtein/Makefile src/ludcmp/Makefile src/matmult-float/Makefile src/matmult-int/Makefile src/mergesort/Makefile src/miniz/Makefile src/minver/Makefile src/nbody/Makefile src/ndes/Makefile src/nettle-aes/Makefile src/nettle-arcfour/Makefile src/nettle-cast128/Makefile src/nettle-des/Makefile src/nettle-md5/Makefile src/nettle-sha256/Makefile src/newlib-exp/Makefile src/newlib-log/Makefile src/newlib-mod/Makefile src/newlib-sqrt/Makefile src/ns/Makefile src/nsichneu/Makefile src/picojpeg/Makefile src/prime/Makefile src/qrduino/Makefile src/qsort/Makefile src/qurt/Makefile src/recursion/Makefile src/rijndael/Makefile src/select/Makefile src/sglib-arraybinsearch/Makefile src/sglib-arrayheapsort/Makefile src/sglib-arrayquicksort/Makefile src/sglib-dllist/Makefile src/sglib-hashtable/Makefile src/sglib-listinsertsort/Makefile src/sglib-listsort/Makefile src/sglib-queue/Makefile src/sglib-rbtree/Makefile src/slre/Makefile src/sqrt/Makefile src/st/Makefile src/statemate/Makefile src/stb_perlin/Makefile src/stringsearch1/Makefile src/strstr/Makefile src/tarai/Makefile src/trio-snprintf/Makefile src/trio-sscanf/Makefile src/ud/Makefile src/whetstone/Makefile src/wikisort/Makefile support/Makefile testsuite/Makefile testsuite/beebs.test/Makefile testsuite/config/Makefile testsuite/lib/Makefile"


# And spit it all out
Expand Down Expand Up @@ -16643,7 +16645,6 @@ do
"src/cover/Makefile") CONFIG_FILES="$CONFIG_FILES src/cover/Makefile" ;;
"src/crc/Makefile") CONFIG_FILES="$CONFIG_FILES src/crc/Makefile" ;;
"src/crc32/Makefile") CONFIG_FILES="$CONFIG_FILES src/crc32/Makefile" ;;
"src/ctl/Makefile") CONFIG_FILES="$CONFIG_FILES src/ctl/Makefile" ;;
"src/ctl-stack/Makefile") CONFIG_FILES="$CONFIG_FILES src/ctl-stack/Makefile" ;;
"src/ctl-string/Makefile") CONFIG_FILES="$CONFIG_FILES src/ctl-string/Makefile" ;;
"src/ctl-vector/Makefile") CONFIG_FILES="$CONFIG_FILES src/ctl-vector/Makefile" ;;
Expand All @@ -16666,7 +16667,6 @@ do
"src/lcdnum/Makefile") CONFIG_FILES="$CONFIG_FILES src/lcdnum/Makefile" ;;
"src/levenshtein/Makefile") CONFIG_FILES="$CONFIG_FILES src/levenshtein/Makefile" ;;
"src/ludcmp/Makefile") CONFIG_FILES="$CONFIG_FILES src/ludcmp/Makefile" ;;
"src/matmult/Makefile") CONFIG_FILES="$CONFIG_FILES src/matmult/Makefile" ;;
"src/matmult-float/Makefile") CONFIG_FILES="$CONFIG_FILES src/matmult-float/Makefile" ;;
"src/matmult-int/Makefile") CONFIG_FILES="$CONFIG_FILES src/matmult-int/Makefile" ;;
"src/mergesort/Makefile") CONFIG_FILES="$CONFIG_FILES src/mergesort/Makefile" ;;
Expand Down Expand Up @@ -16697,7 +16697,6 @@ do
"src/sglib-arraybinsearch/Makefile") CONFIG_FILES="$CONFIG_FILES src/sglib-arraybinsearch/Makefile" ;;
"src/sglib-arrayheapsort/Makefile") CONFIG_FILES="$CONFIG_FILES src/sglib-arrayheapsort/Makefile" ;;
"src/sglib-arrayquicksort/Makefile") CONFIG_FILES="$CONFIG_FILES src/sglib-arrayquicksort/Makefile" ;;
"src/sglib-arraysort/Makefile") CONFIG_FILES="$CONFIG_FILES src/sglib-arraysort/Makefile" ;;
"src/sglib-dllist/Makefile") CONFIG_FILES="$CONFIG_FILES src/sglib-dllist/Makefile" ;;
"src/sglib-hashtable/Makefile") CONFIG_FILES="$CONFIG_FILES src/sglib-hashtable/Makefile" ;;
"src/sglib-listinsertsort/Makefile") CONFIG_FILES="$CONFIG_FILES src/sglib-listinsertsort/Makefile" ;;
Expand All @@ -16712,8 +16711,6 @@ do
"src/stringsearch1/Makefile") CONFIG_FILES="$CONFIG_FILES src/stringsearch1/Makefile" ;;
"src/strstr/Makefile") CONFIG_FILES="$CONFIG_FILES src/strstr/Makefile" ;;
"src/tarai/Makefile") CONFIG_FILES="$CONFIG_FILES src/tarai/Makefile" ;;
"src/template/Makefile") CONFIG_FILES="$CONFIG_FILES src/template/Makefile" ;;
"src/trio/Makefile") CONFIG_FILES="$CONFIG_FILES src/trio/Makefile" ;;
"src/trio-snprintf/Makefile") CONFIG_FILES="$CONFIG_FILES src/trio-snprintf/Makefile" ;;
"src/trio-sscanf/Makefile") CONFIG_FILES="$CONFIG_FILES src/trio-sscanf/Makefile" ;;
"src/ud/Makefile") CONFIG_FILES="$CONFIG_FILES src/ud/Makefile" ;;
Expand Down
11 changes: 4 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1309,8 +1309,10 @@ test -f $srcdir/config/$arch/boards/$board/calibration && \

AM_CONDITIONAL([CALIBRATION], [test x$HAVE_CALIBRATION == xyes])

# Architecture, board and chip specific and user CFLAGS and LDFLAGS
CFLAGS="$CFLAGS $ARCH_CFLAGS $CHIP_CFLAGS $BOARD_CFLAGS $USER_CFLAGS"
# Architecture, board and chip specific and user CFLAGS and LDFLAGS. Note that
# we always compile with debug info, although this can be overridden by
# USER_CFLAGS
CFLAGS="$CFLAGS $ARCH_CFLAGS $CHIP_CFLAGS $BOARD_CFLAGS -g3 $USER_CFLAGS"
LDFLAGS="$LDFLAGS $ARCH_LDFLAGS $CHIP_LDFLAGS $BOARD_LDFLAGS $USER_LDFLAGS"

LT_INIT
Expand Down Expand Up @@ -1378,7 +1380,6 @@ AC_CONFIG_FILES([Makefile \
src/cover/Makefile \
src/crc/Makefile \
src/crc32/Makefile \
src/ctl/Makefile \
src/ctl-stack/Makefile \
src/ctl-string/Makefile \
src/ctl-vector/Makefile \
Expand All @@ -1401,7 +1402,6 @@ AC_CONFIG_FILES([Makefile \
src/lcdnum/Makefile \
src/levenshtein/Makefile \
src/ludcmp/Makefile \
src/matmult/Makefile \
src/matmult-float/Makefile \
src/matmult-int/Makefile \
src/mergesort/Makefile \
Expand Down Expand Up @@ -1432,7 +1432,6 @@ AC_CONFIG_FILES([Makefile \
src/sglib-arraybinsearch/Makefile \
src/sglib-arrayheapsort/Makefile \
src/sglib-arrayquicksort/Makefile \
src/sglib-arraysort/Makefile \
src/sglib-dllist/Makefile \
src/sglib-hashtable/Makefile \
src/sglib-listinsertsort/Makefile \
Expand All @@ -1447,8 +1446,6 @@ AC_CONFIG_FILES([Makefile \
src/stringsearch1/Makefile \
src/strstr/Makefile \
src/tarai/Makefile \
src/template/Makefile \
src/trio/Makefile \
src/trio-snprintf/Makefile \
src/trio-sscanf/Makefile \
src/ud/Makefile \
Expand Down
5 changes: 0 additions & 5 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ SUBDIRS = aha-compress \
cover \
crc \
crc32 \
ctl \
ctl-stack \
ctl-string \
ctl-vector \
Expand All @@ -57,7 +56,6 @@ SUBDIRS = aha-compress \
lcdnum \
levenshtein \
ludcmp \
matmult \
matmult-float \
matmult-int \
mergesort \
Expand Down Expand Up @@ -88,7 +86,6 @@ SUBDIRS = aha-compress \
sglib-arraybinsearch \
sglib-arrayheapsort \
sglib-arrayquicksort \
sglib-arraysort \
sglib-dllist \
sglib-hashtable \
sglib-listinsertsort \
Expand All @@ -103,8 +100,6 @@ SUBDIRS = aha-compress \
stringsearch1 \
strstr \
tarai \
template \
trio \
trio-snprintf \
trio-sscanf \
ud \
Expand Down
5 changes: 0 additions & 5 deletions src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ SUBDIRS = aha-compress \
cover \
crc \
crc32 \
ctl \
ctl-stack \
ctl-string \
ctl-vector \
Expand All @@ -376,7 +375,6 @@ SUBDIRS = aha-compress \
lcdnum \
levenshtein \
ludcmp \
matmult \
matmult-float \
matmult-int \
mergesort \
Expand Down Expand Up @@ -407,7 +405,6 @@ SUBDIRS = aha-compress \
sglib-arraybinsearch \
sglib-arrayheapsort \
sglib-arrayquicksort \
sglib-arraysort \
sglib-dllist \
sglib-hashtable \
sglib-listinsertsort \
Expand All @@ -422,8 +419,6 @@ SUBDIRS = aha-compress \
stringsearch1 \
strstr \
tarai \
template \
trio \
trio-snprintf \
trio-sscanf \
ud \
Expand Down
3 changes: 2 additions & 1 deletion src/aha-compress/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ libaha_compress_la_SOURCES = compress_test.c
aha_compress_LDADD = $(DUMMY_CRT0) \
$(top_builddir)/support/libsupport.la \
libaha-compress.la \
$(DUMMY_LIBC) $(DUMMY_LIBGCC) $(DUMMY_COMPILERRT)
$(top_builddir)/support/libbeebsc.la \
$(DUMMY_LIBC) $(DUMMY_LIBGCC) $(DUMMY_COMPILERRT)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whitespace seems to be inconsistent on most of these Makefile.am for all of the benchmarks.


endif
4 changes: 3 additions & 1 deletion src/aha-compress/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ am__DEPENDENCIES_1 =
@ENABLED_BENCHMARK_AHA_COMPRESS_TRUE@ $(am__DEPENDENCIES_1) \
@ENABLED_BENCHMARK_AHA_COMPRESS_TRUE@ $(top_builddir)/support/libsupport.la \
@ENABLED_BENCHMARK_AHA_COMPRESS_TRUE@ libaha-compress.la \
@ENABLED_BENCHMARK_AHA_COMPRESS_TRUE@ $(top_builddir)/support/libbeebsc.la \
@ENABLED_BENCHMARK_AHA_COMPRESS_TRUE@ $(am__DEPENDENCIES_1) \
@ENABLED_BENCHMARK_AHA_COMPRESS_TRUE@ $(am__DEPENDENCIES_1) \
@ENABLED_BENCHMARK_AHA_COMPRESS_TRUE@ $(am__DEPENDENCIES_1)
Expand Down Expand Up @@ -394,7 +395,8 @@ top_srcdir = @top_srcdir@
@ENABLED_BENCHMARK_AHA_COMPRESS_TRUE@aha_compress_LDADD = $(DUMMY_CRT0) \
@ENABLED_BENCHMARK_AHA_COMPRESS_TRUE@ $(top_builddir)/support/libsupport.la \
@ENABLED_BENCHMARK_AHA_COMPRESS_TRUE@ libaha-compress.la \
@ENABLED_BENCHMARK_AHA_COMPRESS_TRUE@ $(DUMMY_LIBC) $(DUMMY_LIBGCC) $(DUMMY_COMPILERRT)
@ENABLED_BENCHMARK_AHA_COMPRESS_TRUE@ $(top_builddir)/support/libbeebsc.la \
@ENABLED_BENCHMARK_AHA_COMPRESS_TRUE@ $(DUMMY_LIBC) $(DUMMY_LIBGCC) $(DUMMY_COMPILERRT)

all: all-am

Expand Down
66 changes: 37 additions & 29 deletions src/aha-compress/compress_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/* This scale factor will be changed to equalise the runtime of the
benchmarks. */
#define SCALE_FACTOR (REPEAT_FACTOR >> 0)
#define LOCAL_SCALE_FACTOR 251

/* Code from GLS. Nine insns in the loop, giving 9*32 + 3 = 291 insns
worst case (mask = all 1's, not counting subroutine linkage). */
Expand Down Expand Up @@ -160,34 +160,42 @@ initialise_benchmark (void)
int
benchmark (void)
{
int errors = 0, n, i;
unsigned int r;

n = sizeof(test)/sizeof(test[0]);

for (i = 0; i < n; i += 3) {
r = compress1(test[i], test[i+1]);
if (r != test[i+2])
errors = 1;
}

for (i = 0; i < n; i += 3) {
r = compress2(test[i], test[i+1]);
if (r != test[i+2])
errors = 1;
}

for (i = 0; i < n; i += 3) {
r = compress3(test[i], test[i+1]);
if (r != test[i+2])
errors = 1;
}

for (i = 0; i < n; i += 3) {
r = compress4(test[i], test[i+1]);
if (r != test[i+2])
errors = 1;
}
int i;
int errors;

for (i = 0; i < (LOCAL_SCALE_FACTOR * REPEAT_FACTOR); i++)
{
int n, i;
unsigned int r;

errors = 0;

n = sizeof(test)/sizeof(test[0]);

for (i = 0; i < n; i += 3) {
r = compress1(test[i], test[i+1]);
if (r != test[i+2])
errors = 1;
}

for (i = 0; i < n; i += 3) {
r = compress2(test[i], test[i+1]);
if (r != test[i+2])
errors = 1;
}

for (i = 0; i < n; i += 3) {
r = compress3(test[i], test[i+1]);
if (r != test[i+2])
errors = 1;
}

for (i = 0; i < n; i += 3) {
r = compress4(test[i], test[i+1]);
if (r != test[i+2])
errors = 1;
}
}

return errors;
}
Expand Down
3 changes: 2 additions & 1 deletion src/aha-mont64/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ libaha_mont64_la_SOURCES = mont64.c
aha_mont64_LDADD = $(DUMMY_CRT0) \
$(top_builddir)/support/libsupport.la \
libaha-mont64.la \
$(DUMMY_LIBC) $(DUMMY_LIBGCC) $(DUMMY_COMPILERRT)
$(top_builddir)/support/libbeebsc.la \
$(DUMMY_LIBC) $(DUMMY_LIBGCC) $(DUMMY_COMPILERRT)

endif
4 changes: 3 additions & 1 deletion src/aha-mont64/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ am__DEPENDENCIES_1 =
@ENABLED_BENCHMARK_AHA_MONT64_TRUE@ $(am__DEPENDENCIES_1) \
@ENABLED_BENCHMARK_AHA_MONT64_TRUE@ $(top_builddir)/support/libsupport.la \
@ENABLED_BENCHMARK_AHA_MONT64_TRUE@ libaha-mont64.la \
@ENABLED_BENCHMARK_AHA_MONT64_TRUE@ $(top_builddir)/support/libbeebsc.la \
@ENABLED_BENCHMARK_AHA_MONT64_TRUE@ $(am__DEPENDENCIES_1) \
@ENABLED_BENCHMARK_AHA_MONT64_TRUE@ $(am__DEPENDENCIES_1) \
@ENABLED_BENCHMARK_AHA_MONT64_TRUE@ $(am__DEPENDENCIES_1)
Expand Down Expand Up @@ -395,7 +396,8 @@ top_srcdir = @top_srcdir@
@ENABLED_BENCHMARK_AHA_MONT64_TRUE@aha_mont64_LDADD = $(DUMMY_CRT0) \
@ENABLED_BENCHMARK_AHA_MONT64_TRUE@ $(top_builddir)/support/libsupport.la \
@ENABLED_BENCHMARK_AHA_MONT64_TRUE@ libaha-mont64.la \
@ENABLED_BENCHMARK_AHA_MONT64_TRUE@ $(DUMMY_LIBC) $(DUMMY_LIBGCC) $(DUMMY_COMPILERRT)
@ENABLED_BENCHMARK_AHA_MONT64_TRUE@ $(top_builddir)/support/libbeebsc.la \
@ENABLED_BENCHMARK_AHA_MONT64_TRUE@ $(DUMMY_LIBC) $(DUMMY_LIBGCC) $(DUMMY_COMPILERRT)

all: all-am

Expand Down
Loading