diff options
author | Howard Mao <zhehao.mao@gmail.com> | 2016-05-02 20:09:49 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-05-03 11:16:56 -0700 |
commit | c164404d0511ba386ba0a1aebb09955ca0448719 (patch) | |
tree | 2cbd268e8d738f45aaf35387bf06a8ed7d2179aa /benchmarks | |
parent | 82a9395e97dadc87e3dce289895ff88ef7e2fd51 (diff) | |
download | riscv-tests-c164404d0511ba386ba0a1aebb09955ca0448719.zip riscv-tests-c164404d0511ba386ba0a1aebb09955ca0448719.tar.gz riscv-tests-c164404d0511ba386ba0a1aebb09955ca0448719.tar.bz2 |
add empty benchmark
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/Makefile | 1 | ||||
-rw-r--r-- | benchmarks/empty/bmark.mk | 30 | ||||
-rw-r--r-- | benchmarks/empty/empty_main.c | 24 |
3 files changed, 55 insertions, 0 deletions
diff --git a/benchmarks/Makefile b/benchmarks/Makefile index 8cc1e35..0e132fb 100644 --- a/benchmarks/Makefile +++ b/benchmarks/Makefile @@ -27,6 +27,7 @@ bmarks = \ spmv \ mt-vvadd \ mt-matmul \ + empty \ bmarks_host = \ median \ diff --git a/benchmarks/empty/bmark.mk b/benchmarks/empty/bmark.mk new file mode 100644 index 0000000..7d70e12 --- /dev/null +++ b/benchmarks/empty/bmark.mk @@ -0,0 +1,30 @@ +#======================================================================= +# UCB CS250 Makefile fragment for benchmarks +#----------------------------------------------------------------------- +# +# Each benchmark directory should have its own fragment which +# essentially lists what the source files are and how to link them +# into an riscv and/or host executable. All variables should include +# the benchmark name as a prefix so that they are unique. +# + +empty_c_src = \ + empty_main.c \ + syscalls.c \ + +empty_riscv_src = \ + crt.S \ + +empty_c_objs = $(patsubst %.c, %.o, $(empty_c_src)) +empty_riscv_objs = $(patsubst %.S, %.o, $(empty_riscv_src)) + +empty_host_bin = empty.host +$(empty_host_bin): $(empty_c_src) + $(HOST_COMP) $^ -o $(empty_host_bin) + +empty_riscv_bin = empty.riscv +$(empty_riscv_bin): $(empty_c_objs) $(empty_riscv_objs) + $(RISCV_LINK) $(empty_c_objs) $(empty_riscv_objs) -o $(empty_riscv_bin) $(RISCV_LINK_OPTS) + +junk += $(empty_c_objs) $(empty_riscv_objs) \ + $(empty_host_bin) $(empty_riscv_bin) diff --git a/benchmarks/empty/empty_main.c b/benchmarks/empty/empty_main.c new file mode 100644 index 0000000..6a63b99 --- /dev/null +++ b/benchmarks/empty/empty_main.c @@ -0,0 +1,24 @@ +// See LICENSE for license details. + +//************************************************************************** +// Median filter bencmark +//-------------------------------------------------------------------------- +// +// This benchmark performs a 1D three element median filter. The +// input data (and reference data) should be generated using the +// median_gendata.pl perl script and dumped to a file named +// dataset1.h You should not change anything except the +// HOST_DEBUG and PREALLOCATE macros for your timing run. + +#include "util.h" + +//-------------------------------------------------------------------------- +// Input/Reference Data + +//-------------------------------------------------------------------------- +// Main + +int main( int argc, char* argv[] ) +{ + return 0; +} |