From 9bac2f01b1f182ad8d889db905da1543129a7542 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 9 May 2022 16:07:14 +0200 Subject: add treebench app --- src/app/treebench/main.cc | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/app/treebench/main.cc (limited to 'src/app/treebench/main.cc') diff --git a/src/app/treebench/main.cc b/src/app/treebench/main.cc new file mode 100644 index 0000000..e2ddfe3 --- /dev/null +++ b/src/app/treebench/main.cc @@ -0,0 +1,32 @@ +/* + * Copyright 2020 Daniel Friesel + * + * SPDX-License-Identifier: BSD-2-Clause + */ +#include "arch.h" +#include "driver/gpio.h" +#include "driver/stdout.h" +#include "driver/uptime.h" +#include "driver/counter.h" + +#include "tree.c.inc" + +void loop(void) +{ + counter.start(); + counter.stop(); + kout << "nop @ " << counter.value << "/" << counter.overflow << " cycles" << endl << endl; + + run_benchmark(); +} + +int main(void) +{ + arch.setup(); + gpio.setup(); + kout.setup(); + + arch.idle_loop(); + + return 0; +} -- cgit v1.2.3