From b288b587378984c3c419d26a13dcf93686d1b779 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Wed, 17 Jul 2019 12:03:39 +0200 Subject: All working benches ported --- test/monniaux/complex/complex_mat.c | 6 +++--- test/monniaux/glibc_qsort/glibc_qsort_run.c | 2 +- test/monniaux/heapsort/heapsort_run.c | 2 +- test/monniaux/heptagon_radio_transmitter/Makefile | 3 +++ test/monniaux/heptagon_radio_transmitter/make.proto | 3 --- test/monniaux/lustrev4_lustrec_heater_control/Makefile | 3 +++ test/monniaux/lustrev4_lustrec_heater_control/make.proto | 3 --- test/monniaux/lustrev4_lv4_heater_control/Makefile | 3 +++ test/monniaux/lustrev4_lv6-en-2cgc_heater_control/Makefile | 3 +++ .../lustrev4_lv6-en-2cgc_heater_control/make.proto | 3 --- test/monniaux/lustrev6-convertible-en-2cgc/Makefile | 3 +++ test/monniaux/lustrev6-convertible-en-2cgc/make.proto | 3 --- test/monniaux/quicksort/Makefile | 3 +++ test/monniaux/quicksort/make.proto | 3 --- test/monniaux/quicksort/quicksort_run.c | 2 +- test/monniaux/rules.mk | 6 +++--- test/monniaux/sha-2/Makefile | 3 +++ test/monniaux/sha-2/make.proto | 3 --- test/monniaux/sha-2/sha-256_run.c | 2 +- test/monniaux/tacle-bench-lift/Makefile | 4 ++++ test/monniaux/tacle-bench-lift/make.proto | 4 ---- test/monniaux/tacle-bench-powerwindow/Makefile | 4 ++++ test/monniaux/tacle-bench-powerwindow/make.proto | 4 ---- test/monniaux/too_slow/Makefile | 3 +++ test/monniaux/too_slow/make.proto | 3 --- test/monniaux/xor_and_mat/Makefile | 4 ++++ test/monniaux/xor_and_mat/int_mat_run.c | 14 +++++++------- test/monniaux/xor_and_mat/make.proto | 3 --- 28 files changed, 53 insertions(+), 49 deletions(-) create mode 100644 test/monniaux/heptagon_radio_transmitter/Makefile delete mode 100644 test/monniaux/heptagon_radio_transmitter/make.proto create mode 100644 test/monniaux/lustrev4_lustrec_heater_control/Makefile delete mode 100644 test/monniaux/lustrev4_lustrec_heater_control/make.proto create mode 100644 test/monniaux/lustrev4_lv4_heater_control/Makefile create mode 100644 test/monniaux/lustrev4_lv6-en-2cgc_heater_control/Makefile delete mode 100644 test/monniaux/lustrev4_lv6-en-2cgc_heater_control/make.proto create mode 100644 test/monniaux/lustrev6-convertible-en-2cgc/Makefile delete mode 100644 test/monniaux/lustrev6-convertible-en-2cgc/make.proto create mode 100644 test/monniaux/quicksort/Makefile delete mode 100644 test/monniaux/quicksort/make.proto create mode 100644 test/monniaux/sha-2/Makefile delete mode 100644 test/monniaux/sha-2/make.proto create mode 100644 test/monniaux/tacle-bench-lift/Makefile delete mode 100644 test/monniaux/tacle-bench-lift/make.proto create mode 100644 test/monniaux/tacle-bench-powerwindow/Makefile delete mode 100644 test/monniaux/tacle-bench-powerwindow/make.proto create mode 100644 test/monniaux/too_slow/Makefile delete mode 100644 test/monniaux/too_slow/make.proto create mode 100644 test/monniaux/xor_and_mat/Makefile delete mode 100644 test/monniaux/xor_and_mat/make.proto (limited to 'test/monniaux') diff --git a/test/monniaux/complex/complex_mat.c b/test/monniaux/complex/complex_mat.c index b7103f60..9ce4fd23 100644 --- a/test/monniaux/complex/complex_mat.c +++ b/test/monniaux/complex/complex_mat.c @@ -227,9 +227,9 @@ int main() { printf("c1==c8: %s\n" "c1==c9: %s\n" - "c1_time : %" PRIu64 "\n" - "c8_time : %" PRIu64 "\n" - "c9_time : %" PRIu64 "\n", + "c1 : %" PRIu64 "\n" + "c8 : %" PRIu64 "\n" + "c9 : %" PRIu64 "\n", COMPLEX_mat_equal(m, n, c1, p, c8, p)?"true":"false", COMPLEX_mat_equal(m, n, c1, p, c9, p)?"true":"false", diff --git a/test/monniaux/glibc_qsort/glibc_qsort_run.c b/test/monniaux/glibc_qsort/glibc_qsort_run.c index 7fcb8130..fee5a2ff 100644 --- a/test/monniaux/glibc_qsort/glibc_qsort_run.c +++ b/test/monniaux/glibc_qsort/glibc_qsort_run.c @@ -41,7 +41,7 @@ int main (void) { quicksort(vec, len, sizeof(data), data_compare, NULL); quicksort_time = get_cycle() - quicksort_time; printf("sorted=%s\n" - "quicksort_time:%" PRIu64 "\n", + "time cycles:%" PRIu64 "\n", data_vec_is_sorted(vec, len)?"true":"false", quicksort_time); free(vec); diff --git a/test/monniaux/heapsort/heapsort_run.c b/test/monniaux/heapsort/heapsort_run.c index 053822a3..8f2d3fe0 100644 --- a/test/monniaux/heapsort/heapsort_run.c +++ b/test/monniaux/heapsort/heapsort_run.c @@ -13,7 +13,7 @@ int main (void) { heapsort(vec, len); heapsort_time = get_cycle() - heapsort_time; printf("sorted=%s\n" - "heapsort_time:%" PRIu64 "\n", + "time cycles:%" PRIu64 "\n", data_vec_is_sorted(vec, len)?"true":"false", heapsort_time); free(vec); diff --git a/test/monniaux/heptagon_radio_transmitter/Makefile b/test/monniaux/heptagon_radio_transmitter/Makefile new file mode 100644 index 00000000..75420a10 --- /dev/null +++ b/test/monniaux/heptagon_radio_transmitter/Makefile @@ -0,0 +1,3 @@ +TARGET=radiotrans + +include ../rules.mk diff --git a/test/monniaux/heptagon_radio_transmitter/make.proto b/test/monniaux/heptagon_radio_transmitter/make.proto deleted file mode 100644 index 40de14dc..00000000 --- a/test/monniaux/heptagon_radio_transmitter/make.proto +++ /dev/null @@ -1,3 +0,0 @@ -sources: "$(wildcard *.c)" -target: radiotrans -measures: [cycles] diff --git a/test/monniaux/lustrev4_lustrec_heater_control/Makefile b/test/monniaux/lustrev4_lustrec_heater_control/Makefile new file mode 100644 index 00000000..df7c9e0a --- /dev/null +++ b/test/monniaux/lustrev4_lustrec_heater_control/Makefile @@ -0,0 +1,3 @@ +TARGET=lustrec_heater_control + +include ../rules.mk diff --git a/test/monniaux/lustrev4_lustrec_heater_control/make.proto b/test/monniaux/lustrev4_lustrec_heater_control/make.proto deleted file mode 100644 index ccb0e684..00000000 --- a/test/monniaux/lustrev4_lustrec_heater_control/make.proto +++ /dev/null @@ -1,3 +0,0 @@ -sources: "$(wildcard *.c)" -target: lustrec_heater_control -measures: [cycles] diff --git a/test/monniaux/lustrev4_lv4_heater_control/Makefile b/test/monniaux/lustrev4_lv4_heater_control/Makefile new file mode 100644 index 00000000..cfd37921 --- /dev/null +++ b/test/monniaux/lustrev4_lv4_heater_control/Makefile @@ -0,0 +1,3 @@ +TARGET=lv4_heater_control + +include ../rules.mk diff --git a/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/Makefile b/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/Makefile new file mode 100644 index 00000000..90d0a4c9 --- /dev/null +++ b/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/Makefile @@ -0,0 +1,3 @@ +TARGET=lv6-en-2cgc_heater_control + +include ../rules.mk diff --git a/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/make.proto b/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/make.proto deleted file mode 100644 index ac398d0e..00000000 --- a/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/make.proto +++ /dev/null @@ -1,3 +0,0 @@ -sources: "$(wildcard *.c)" -target: lv6-en-2cgc_heater_control -measures: [cycles] diff --git a/test/monniaux/lustrev6-convertible-en-2cgc/Makefile b/test/monniaux/lustrev6-convertible-en-2cgc/Makefile new file mode 100644 index 00000000..009f7f35 --- /dev/null +++ b/test/monniaux/lustrev6-convertible-en-2cgc/Makefile @@ -0,0 +1,3 @@ +TARGET=lv6-en-2cgc_convertible + +include ../rules.mk diff --git a/test/monniaux/lustrev6-convertible-en-2cgc/make.proto b/test/monniaux/lustrev6-convertible-en-2cgc/make.proto deleted file mode 100644 index f73538f6..00000000 --- a/test/monniaux/lustrev6-convertible-en-2cgc/make.proto +++ /dev/null @@ -1,3 +0,0 @@ -sources: "$(wildcard *.c)" -target: lv6-en-2cgc_convertible -measures: [cycles] diff --git a/test/monniaux/quicksort/Makefile b/test/monniaux/quicksort/Makefile new file mode 100644 index 00000000..719cd755 --- /dev/null +++ b/test/monniaux/quicksort/Makefile @@ -0,0 +1,3 @@ +TARGET=quicksort + +include ../rules.mk diff --git a/test/monniaux/quicksort/make.proto b/test/monniaux/quicksort/make.proto deleted file mode 100644 index fe2f906b..00000000 --- a/test/monniaux/quicksort/make.proto +++ /dev/null @@ -1,3 +0,0 @@ -objdeps: [{name: quicksort_run, compiler: gcc}] -target: quicksort -measures: [quicksort_time] diff --git a/test/monniaux/quicksort/quicksort_run.c b/test/monniaux/quicksort/quicksort_run.c index 88747d17..c35d0752 100644 --- a/test/monniaux/quicksort/quicksort_run.c +++ b/test/monniaux/quicksort/quicksort_run.c @@ -13,7 +13,7 @@ int main (void) { quicksort(vec, len); quicksort_time = get_cycle() - quicksort_time; printf("sorted=%s\n" - "quicksort_time:%" PRIu64 "\n", + "time cycles:%" PRIu64 "\n", data_vec_is_sorted(vec, len)?"true":"false", quicksort_time); free(vec); diff --git a/test/monniaux/rules.mk b/test/monniaux/rules.mk index 9fd20a3d..f65dc414 100644 --- a/test/monniaux/rules.mk +++ b/test/monniaux/rules.mk @@ -14,10 +14,10 @@ CLOCK=../clock MAX_MEASURES=10 # Flags common to both compilers, then to gcc, then to ccomp -ALL_CFLAGS=-Wall -D__K1C_COS__ -DMAX_MEASURES=$(MAX_MEASURES) +ALL_CFLAGS+=-Wall -D__K1C_COS__ -DMAX_MEASURES=$(MAX_MEASURES) #ALL_CFLAGS+=-g -ALL_GCCFLAGS=$(ALL_CFLAGS) -std=c99 -Wextra -Werror=implicit -ALL_CCOMPFLAGS=$(ALL_CFLAGS) +ALL_GCCFLAGS+=$(ALL_CFLAGS) -std=c99 -Wextra -Werror=implicit +ALL_CCOMPFLAGS+=$(ALL_CFLAGS) # The compilers K1C_CC=k1-cos-gcc diff --git a/test/monniaux/sha-2/Makefile b/test/monniaux/sha-2/Makefile new file mode 100644 index 00000000..a043d89f --- /dev/null +++ b/test/monniaux/sha-2/Makefile @@ -0,0 +1,3 @@ +TARGET=sha-256 + +include ../rules.mk diff --git a/test/monniaux/sha-2/make.proto b/test/monniaux/sha-2/make.proto deleted file mode 100644 index f776565e..00000000 --- a/test/monniaux/sha-2/make.proto +++ /dev/null @@ -1,3 +0,0 @@ -objdeps: [{name: sha-256_run, compiler: gcc}] -target: sha-256 -measures: ["total cycles"] diff --git a/test/monniaux/sha-2/sha-256_run.c b/test/monniaux/sha-2/sha-256_run.c index 05a69d6b..1b6f7372 100644 --- a/test/monniaux/sha-2/sha-256_run.c +++ b/test/monniaux/sha-2/sha-256_run.c @@ -280,6 +280,6 @@ int main(void) } } destruct_binary_messages(); - printf("total cycles : %" PRIu64 "\n", cycle_total); + printf("time cycles: %" PRIu64 "\n", cycle_total); return 0; } diff --git a/test/monniaux/tacle-bench-lift/Makefile b/test/monniaux/tacle-bench-lift/Makefile new file mode 100644 index 00000000..2e1db080 --- /dev/null +++ b/test/monniaux/tacle-bench-lift/Makefile @@ -0,0 +1,4 @@ +ALL_CFLAGS:=-include kill_pragma.h +TARGET=lift + +include ../rules.mk diff --git a/test/monniaux/tacle-bench-lift/make.proto b/test/monniaux/tacle-bench-lift/make.proto deleted file mode 100644 index e9667b47..00000000 --- a/test/monniaux/tacle-bench-lift/make.proto +++ /dev/null @@ -1,4 +0,0 @@ -intro: "ALL_CFLAGS = -include kill_pragma.h" -sources: "lift.c liftlibcontrol.c liftlibio.c" -target: lift -measures: [cycles] diff --git a/test/monniaux/tacle-bench-powerwindow/Makefile b/test/monniaux/tacle-bench-powerwindow/Makefile new file mode 100644 index 00000000..3417cd4c --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/Makefile @@ -0,0 +1,4 @@ +ALL_CFLAGS:=-include kill_pragma.h +TARGET=powerwindow + +include ../rules.mk diff --git a/test/monniaux/tacle-bench-powerwindow/make.proto b/test/monniaux/tacle-bench-powerwindow/make.proto deleted file mode 100644 index c4be5f05..00000000 --- a/test/monniaux/tacle-bench-powerwindow/make.proto +++ /dev/null @@ -1,4 +0,0 @@ -intro: "ALL_CFLAGS = -include kill_pragma.h" -sources: "$(wildcard *.c)" -target: powerwindow -measures: [cycles] diff --git a/test/monniaux/too_slow/Makefile b/test/monniaux/too_slow/Makefile new file mode 100644 index 00000000..a1466d1d --- /dev/null +++ b/test/monniaux/too_slow/Makefile @@ -0,0 +1,3 @@ +TARGET=memset_from_bitslices-aes + +include ../rules.mk diff --git a/test/monniaux/too_slow/make.proto b/test/monniaux/too_slow/make.proto deleted file mode 100644 index 852971fc..00000000 --- a/test/monniaux/too_slow/make.proto +++ /dev/null @@ -1,3 +0,0 @@ -target: memset_from_bitsliced-aes -measures: [cycles] -name: memset-aes diff --git a/test/monniaux/xor_and_mat/Makefile b/test/monniaux/xor_and_mat/Makefile new file mode 100644 index 00000000..e6c4db77 --- /dev/null +++ b/test/monniaux/xor_and_mat/Makefile @@ -0,0 +1,4 @@ +TARGET=xor_and_mat +MEASURES="c1 c2 c3 c4 c5 c6 c7" + +include ../rules.mk diff --git a/test/monniaux/xor_and_mat/int_mat_run.c b/test/monniaux/xor_and_mat/int_mat_run.c index cd902bca..a6a821d9 100644 --- a/test/monniaux/xor_and_mat/int_mat_run.c +++ b/test/monniaux/xor_and_mat/int_mat_run.c @@ -54,13 +54,13 @@ int main() { "c1==c5: %s\n" "c1==c6: %s\n" "c1==c7: %s\n" - "c1_time : %" PRIu64 "\n" - "c2_time : %" PRIu64 "\n" - "c3_time : %" PRIu64 "\n" - "c4_time : %" PRIu64 "\n" - "c5_time : %" PRIu64 "\n" - "c6_time : %" PRIu64 "\n" - "c7_time : %" PRIu64 "\n", + "c1 cycles: %" PRIu64 "\n" + "c2 cycles: %" PRIu64 "\n" + "c3 cycles: %" PRIu64 "\n" + "c4 cycles: %" PRIu64 "\n" + "c5 cycles: %" PRIu64 "\n" + "c6 cycles: %" PRIu64 "\n" + "c7 cycles: %" PRIu64 "\n", xor_and_mat_equal(m, n, c1, p, c2, p)?"true":"false", xor_and_mat_equal(m, n, c1, p, c3, p)?"true":"false", diff --git a/test/monniaux/xor_and_mat/make.proto b/test/monniaux/xor_and_mat/make.proto deleted file mode 100644 index 0c2f3dc1..00000000 --- a/test/monniaux/xor_and_mat/make.proto +++ /dev/null @@ -1,3 +0,0 @@ -sources: int_mat_run.c int_mat.c -target: xor_and_mat -measures: [[c2_time, c2], [c7_time, c7]] -- cgit