summaryrefslogtreecommitdiff
path: root/src/app/treebench/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/treebench/main.cc')
-rw-r--r--src/app/treebench/main.cc32
1 files changed, 32 insertions, 0 deletions
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;
+}