-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REFACTOR: reorganized embench to be scalable
- Loading branch information
1 parent
3d12a0c
commit 5585e23
Showing
10 changed files
with
586 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
add_subdirectory(blinky) | ||
add_subdirectory(embench/wikisort) | ||
add_subdirectory(embench) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Define the list of benchmarks | ||
set(BENCHMARKS | ||
wikisort | ||
nettle-sha256 | ||
# Add other benchmarks here | ||
) | ||
|
||
# Create the support library | ||
add_library(beebsc STATIC common/src/beebsc.c) | ||
target_include_directories(beebsc PUBLIC common/inc) | ||
|
||
# Create executables for each benchmark | ||
foreach(benchmark ${BENCHMARKS}) | ||
# Create the benchmark-specific library | ||
add_library(${benchmark}_lib STATIC ${benchmark}/lib${benchmark}.c) | ||
target_include_directories(${benchmark}_lib PUBLIC common/inc) | ||
|
||
# Create the executable | ||
add_executable(${benchmark} common/src/main.c) | ||
|
||
# Link dependencies | ||
target_link_libraries(${benchmark} | ||
PUBLIC ${benchmark}_lib | ||
PUBLIC beebsc | ||
PUBLIC l_trace_encoder | ||
PRIVATE -L${CMAKE_BINARY_DIR}/glossy -Wl,--whole-archive glossy -Wl,--no-whole-archive -lm | ||
) | ||
endforeach() |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* Support header for BEEBS. | ||
Copyright (C) 2014 Embecosm Limited and the University of Bristol | ||
Copyright (C) 2019 Embecosm Limited | ||
Contributor James Pallister <james.pallister@bristol.ac.uk> | ||
Contributor Jeremy Bennett <jeremy.bennett@embecosm.com> | ||
This file is part of Embench and was formerly part of the Bristol/Embecosm | ||
Embedded Benchmark Suite. | ||
SPDX-License-Identifier: GPL-3.0-or-later */ | ||
|
||
#ifndef SUPPORT_H | ||
#define SUPPORT_H | ||
|
||
/* custom configuration*/ | ||
#define CPU_MHZ 1 | ||
#define WARMUP_HEAT 1 | ||
/* Benchmarks must implement verify_benchmark, which must return -1 if no | ||
verification is done. */ | ||
|
||
int verify_benchmark (int result); | ||
|
||
/* Standard functions implemented for each board */ | ||
|
||
void initialise_board (void); | ||
void start_trigger (void); | ||
void stop_trigger (void); | ||
|
||
/* Every benchmark implements this for one-off data initialization. This is | ||
only used for initialization that is independent of how often benchmark () | ||
is called. */ | ||
|
||
void initialise_benchmark (void); | ||
|
||
/* Every benchmark implements this for cache warm up, typically calling | ||
benchmark several times. The argument controls how much warming up is | ||
done, with 0 meaning no warming. */ | ||
|
||
void warm_caches (int temperature); | ||
|
||
/* Every benchmark implements this as its entry point. Don't allow it to be | ||
inlined! */ | ||
|
||
int benchmark (void) __attribute__ ((noinline)); | ||
|
||
/* Every benchmark must implement this to validate the result of the | ||
benchmark. */ | ||
|
||
int verify_benchmark (int res); | ||
|
||
/* Local simplified versions of library functions */ | ||
|
||
#include "beebsc.h" | ||
|
||
#endif /* SUPPORT_H */ | ||
|
||
/* | ||
Local Variables: | ||
mode: C | ||
c-file-style: "gnu" | ||
End: | ||
*/ |
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
examples/embench/wikisort/src/main.c → examples/embench/common/src/main.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.