diff --git a/APP_Framework/Applications/benchmark/Make.dep b/APP_Framework/Applications/benchmark/Make.dep index c1ed08a94..ec9552f7d 100644 --- a/APP_Framework/Applications/benchmark/Make.dep +++ b/APP_Framework/Applications/benchmark/Make.dep @@ -1448,6 +1448,7 @@ benchmark.c.home.tyy.works.xiuos.APP_Framework.Applications.benchmark.o: \ /home/tyy/works/xiuos/Ubiquitous/Nuttx_Fusion_XiUOS/nuttx/include/termios.h \ /home/tyy/works/xiuos/Ubiquitous/Nuttx_Fusion_XiUOS/nuttx/include/nuttx/arch.h \ /home/tyy/works/xiuos/Ubiquitous/Nuttx_Fusion_XiUOS/nuttx/include/nuttx/cache.h \ - /home/tyy/works/xiuos/Ubiquitous/Nuttx_Fusion_XiUOS/apps/../../../APP_Framework/Applications/benchmark/support/beebsc.h + /home/tyy/works/xiuos/Ubiquitous/Nuttx_Fusion_XiUOS/apps/../../../APP_Framework/Applications/benchmark/support/beebsc.h \ + /home/tyy/works/xiuos/Ubiquitous/Nuttx_Fusion_XiUOS/apps/../../../APP_Framework/Framework/connection/zigbee/e18/../../../../../Ubiquitous/Nuttx_Fusion_XiUOS/nuttx/arch/risc-v/src/k210/encoding.h # No files specified for dependency generation # No files specified for dependency generation diff --git a/APP_Framework/Applications/benchmark/support/benchmark.c b/APP_Framework/Applications/benchmark/support/benchmark.c index 0baf8a853..8664a2012 100644 --- a/APP_Framework/Applications/benchmark/support/benchmark.c +++ b/APP_Framework/Applications/benchmark/support/benchmark.c @@ -5,6 +5,12 @@ #include #include +// #define NUTTX +#ifdef NUTTX +// #include "k210_sysctl.h" +#include "../../../../../Ubiquitous/Nuttx_Fusion_XiUOS/nuttx/arch/risc-v/src/k210/encoding.h" +#endif + extern benchmark_handle mont64_handle; extern benchmark_handle crc32_handle; extern benchmark_handle md5_handle; @@ -80,7 +86,7 @@ void start_trigger(clock_t *start_time) { *start_time = read_cycle(); } void stop_trigger(clock_t *end_time) { - *end_time = PrivGetTickTime(); + // *end_time = PrivGetTickTime(); *end_time = read_cycle(); } @@ -109,7 +115,7 @@ void organize_result(const benchmark_handle *handle, clock_t start_time, void print_result() { int i = 0; while (bmh_list[i].handle != NULL) { - printf("[BENCHMARK] Time Cost: %-15s %7ld\n", bmh_list[i].name, + printf("[BENCHMARK] Time Cost: %-15s %20ld\n", bmh_list[i].name, bmh_list[i].time); i++; } @@ -121,11 +127,11 @@ void *print_result_asyn() { stop_trigger(&g_stop_time); int i = 0; while (bmh_list[i].handle != NULL) { - printf("[BENCHMARK] Time Cost: %-15s %7ld\n", bmh_list[i].name, + printf("[BENCHMARK] Time Cost: %-15s %20ld\n", bmh_list[i].name, bmh_list[i].time); i++; } - printf("[BENCHMARK] Global Time Diff: %7ld, %d\n", + printf("[BENCHMARK] Global Time Diff: %20ld, %d\n", (clock_t)(g_stop_time - g_start_time), done_cnt); }; @@ -240,7 +246,7 @@ void *run_benchmark_sequential(void *args) { stop_trigger(&s_stop_time); print_result(); - printf("[BENCHMARK] Global Time Diff: %7ld\n", + printf("[BENCHMARK] Global Time Diff: %20ld\n", (clock_t)(s_stop_time - s_start_time)); } diff --git a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/tools/Unix.mk b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/tools/Unix.mk index e4824dbbb..906d6d032 100644 --- a/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/tools/Unix.mk +++ b/Ubiquitous/Nuttx_Fusion_XiUOS/app_match_nuttx/nuttx/tools/Unix.mk @@ -69,6 +69,7 @@ APPPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Applications/benchmark/src/cubi -I$(KERNEL_ROOT)/../../APP_Framework/Applications/benchmark/src/qrduino \ -I$(KERNEL_ROOT)/../../APP_Framework/Applications/benchmark/src/sglib-combined \ -I$(KERNEL_ROOT)/../../APP_Framework/Applications/benchmark/src/slre \ + -I$(KERNEL_ROOT)/../../Ubiquitous/Nuttx_Fusion_XiUOS/nuttx/arch/risc-v/src/k210 \ -lm export SRC_APP_DIR = ../../../APP_Framework