Skip to content

Commit d3f1c8d

Browse files
committed
Testing...
1 parent 7fdc832 commit d3f1c8d

File tree

1,688 files changed

+382145
-195235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,688 files changed

+382145
-195235
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Check MD5s and make
2+
on:
3+
push:
4+
branches: [ "main" ]
5+
pull_request:
6+
branches: [ "main" ]
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Check md5sums
16+
run: md5sum -c coremark.md5
17+
- name: make
18+
run: make

bsp/coremark/LICENSE.md

Lines changed: 100 additions & 0 deletions
Large diffs are not rendered by default.

bsp/coremark/Makefile

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# Copyright 2018 Embedded Microprocessor Benchmark Consortium (EEMBC)
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# Original Author: Shay Gal-on
16+
17+
# Make sure the default target is to simply build and run the benchmark.
18+
RSTAMP = v1.0
19+
20+
.PHONY: run score
21+
run: $(OUTFILE) rerun score
22+
23+
score:
24+
@echo "Check run1.log and run2.log for results."
25+
@echo "See README.md for run and reporting rules."
26+
27+
ifndef PORT_DIR
28+
# Ports for a couple of common self hosted platforms
29+
UNAME=$(shell if command -v uname 2> /dev/null; then uname ; fi)
30+
ifneq (,$(findstring CYGWIN,$(UNAME)))
31+
PORT_DIR=cygwin
32+
endif
33+
ifneq (,$(findstring Darwin,$(UNAME)))
34+
PORT_DIR=macos
35+
endif
36+
ifneq (,$(findstring FreeBSD,$(UNAME)))
37+
PORT_DIR=freebsd
38+
endif
39+
ifneq (,$(findstring Linux,$(UNAME)))
40+
PORT_DIR=linux
41+
endif
42+
endif
43+
ifndef PORT_DIR
44+
$(error PLEASE define PORT_DIR! (e.g. make PORT_DIR=simple))
45+
endif
46+
vpath %.c $(PORT_DIR)
47+
vpath %.h $(PORT_DIR)
48+
vpath %.mak $(PORT_DIR)
49+
include $(PORT_DIR)/core_portme.mak
50+
51+
ifndef ITERATIONS
52+
ITERATIONS=0
53+
endif
54+
ifdef REBUILD
55+
FORCE_REBUILD=force_rebuild
56+
endif
57+
58+
CFLAGS += -DITERATIONS=$(ITERATIONS)
59+
60+
CORE_FILES = core_list_join core_main core_matrix core_state core_util
61+
ORIG_SRCS = $(addsuffix .c,$(CORE_FILES))
62+
SRCS = $(ORIG_SRCS) $(PORT_SRCS)
63+
OBJS = $(addprefix $(OPATH),$(addsuffix $(OEXT),$(CORE_FILES)) $(PORT_OBJS))
64+
OUTNAME = coremark$(EXE)
65+
OUTFILE = $(OPATH)$(OUTNAME)
66+
LOUTCMD = $(OFLAG) $(OUTFILE) $(LFLAGS_END)
67+
OUTCMD = $(OUTFLAG) $(OUTFILE) $(LFLAGS_END)
68+
69+
HEADERS = coremark.h
70+
CHECK_FILES = $(ORIG_SRCS) $(HEADERS)
71+
72+
$(OPATH):
73+
$(MKDIR) $(OPATH)
74+
75+
.PHONY: compile link
76+
ifdef SEPARATE_COMPILE
77+
$(OPATH)$(PORT_DIR):
78+
$(MKDIR) $(OPATH)$(PORT_DIR)
79+
80+
compile: $(OPATH) $(OPATH)$(PORT_DIR) $(OBJS) $(HEADERS)
81+
link: compile
82+
$(LD) $(LFLAGS) $(XLFLAGS) $(OBJS) $(LOUTCMD)
83+
84+
else
85+
86+
compile: $(OPATH) $(SRCS) $(HEADERS)
87+
$(CC) $(CFLAGS) $(XCFLAGS) $(SRCS) $(OUTCMD)
88+
link: compile
89+
@echo "Link performed along with compile"
90+
91+
endif
92+
93+
$(OUTFILE): $(SRCS) $(HEADERS) Makefile core_portme.mak $(EXTRA_DEPENDS) $(FORCE_REBUILD)
94+
$(MAKE) port_prebuild
95+
$(MAKE) link
96+
$(MAKE) port_postbuild
97+
98+
.PHONY: rerun
99+
rerun:
100+
$(MAKE) XCFLAGS="$(XCFLAGS) -DPERFORMANCE_RUN=1" load run1.log
101+
$(MAKE) XCFLAGS="$(XCFLAGS) -DVALIDATION_RUN=1" load run2.log
102+
103+
PARAM1=$(PORT_PARAMS) 0x0 0x0 0x66 $(ITERATIONS)
104+
PARAM2=$(PORT_PARAMS) 0x3415 0x3415 0x66 $(ITERATIONS)
105+
PARAM3=$(PORT_PARAMS) 8 8 8 $(ITERATIONS)
106+
107+
run1.log-PARAM=$(PARAM1) 7 1 2000
108+
run2.log-PARAM=$(PARAM2) 7 1 2000
109+
run3.log-PARAM=$(PARAM3) 7 1 1200
110+
111+
run1.log run2.log run3.log: load
112+
$(MAKE) port_prerun
113+
$(RUN) $(OUTFILE) $($(@)-PARAM) > $(OPATH)$@
114+
$(MAKE) port_postrun
115+
116+
.PHONY: gen_pgo_data
117+
gen_pgo_data: run3.log
118+
119+
.PHONY: load
120+
load: $(OUTFILE)
121+
$(MAKE) port_preload
122+
$(LOAD) $(OUTFILE)
123+
$(MAKE) port_postload
124+
125+
.PHONY: clean
126+
clean:
127+
rm -f $(OUTFILE) $(OBJS) $(OPATH)*.log *.info $(OPATH)index.html $(PORT_CLEAN)
128+
129+
.PHONY: force_rebuild
130+
force_rebuild:
131+
echo "Forcing Rebuild"
132+
133+
.PHONY: check
134+
check:
135+
md5sum -c coremark.md5
136+
137+
ifdef ETC
138+
# Targets related to testing and releasing CoreMark. Not part of the general release!
139+
include Makefile.internal
140+
endif

0 commit comments

Comments
 (0)