1- From 71f51cd5ca4f492a464fb12d5bce91e5fbba300a Mon Sep 17 00:00:00 2001
1+ From 6d0be04a4b4208447e75c369e9811d089f466739 Mon Sep 17 00:00:00 2001
22From: ouyangxiangzhen <
[email protected] >
3- Date: Tue, 11 Jun 2024 16:01:23 +0800
3+ Date: Thu, 3 Apr 2025 11:59:02 +0800
44Subject: [PATCH] tacle-bench: add makefile and all-in-one main file
55
66The original taclebench is used for WCET analysis. This commit allows most taclebench test cases (except parallel test cases) to be compiled and executed.
77
8+ Change-Id: I707b8ac58d3ddc4b7974c5bedecac1a7b5c887f9
89Signed-off-by: ouyangxiangzhen <
[email protected] >
910---
1011 Makefile | 12 +
6566 bench/test/cover/cover.c | 3 +
6667 bench/test/duff/duff.c | 3 +
6768 bench/test/test3/test3.c | 3 +
68- taclebench.c | 349 ++++++++++++++++++
69- 59 files changed, 532 insertions(+)
69+ taclebench.c | 366 ++++++++++++++++++
70+ 59 files changed, 549 insertions(+)
7071 create mode 100644 Makefile
7172 create mode 100644 taclebench.c
7273
7374diff --git a/Makefile b/Makefile
7475new file mode 100644
75- index 0000000..2385c61
76+ index 0000000..75ca0a1
7677--- /dev/null
7778+++ b/Makefile
7879@@ -0,0 +1,12 @@
@@ -83,7 +84,7 @@ index 0000000..2385c61
8384+ TEST_SRCS := $(shell find bench/test -name "*.c")
8485+
8586+ all:
86- + cc -DALL_IN_ONE ${APP_SRCS} ${KERNEL_SRCS} ${SEQUENTIAL_SRCS} ${TEST_SRCS} bench/kernel/cosf/wcclibm.c taclebench.c -static -o taclebench
87+ + cc -DALL_IN_ONE ${APP_SRCS} ${KERNEL_SRCS} ${SEQUENTIAL_SRCS} ${TEST_SRCS} bench/kernel/cosf/wcclibm.c taclebench.c -static -o taclebench -O3
8788+
8889+ clean:
8990+ rm -f taclebench
@@ -888,11 +889,12 @@ index 0235738..6eaf8c2 100755
888889
889890diff --git a/taclebench.c b/taclebench.c
890891new file mode 100644
891- index 0000000..1231b87
892+ index 0000000..aaff1bb
892893--- /dev/null
893894+++ b/taclebench.c
894- @@ -0,0 +1,349 @@
895+ @@ -0,0 +1,366 @@
895896+ #include <stdio.h>
897+ + #include <time.h>
896898+
897899+ int main_epic(void);
898900+ int main_mpeg2(void);
@@ -954,6 +956,10 @@ index 0000000..1231b87
954956+
955957+ int main(void)
956958+ {
959+ + struct timespec start_ts;
960+ + struct timespec end_ts;
961+ + clock_gettime(CLOCK_MONOTONIC, &start_ts);
962+ +
957963+ if (main_epic() != 0)
958964+ {
959965+ printf("main_epic error\n");
@@ -1239,6 +1245,18 @@ index 0000000..1231b87
12391245+ printf("main_bitonic error\n");
12401246+ }
12411247+
1248+ + clock_gettime(CLOCK_MONOTONIC, &end_ts);
1249+ + long sec_diff = end_ts.tv_sec - start_ts.tv_sec;
1250+ + long nsec_diff = end_ts.tv_nsec - start_ts.tv_nsec;
1251+ +
1252+ + if (nsec_diff < 0)
1253+ + {
1254+ + sec_diff -= 1;
1255+ + nsec_diff += 1000000000;
1256+ + }
1257+ +
1258+ + printf("%ld.%09ld seconds\n", sec_diff, nsec_diff);
1259+ +
12421260+ return 0;
12431261+ }
12441262- -
0 commit comments