Commit 9bac2f01 authored by Daniel Friesel's avatar Daniel Friesel
Browse files

add treebench app

parent d2486e3b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
# Copyright 2020 Daniel Friesel
#
# SPDX-License-Identifier: CC0-1.0

prompt "Tree Evaluation Benchmark"
depends on loop && !wakeup
+9 −0
Original line number Diff line number Diff line
# vim:ft=make
#
# Copyright 2020 Daniel Friesel
#
# SPDX-License-Identifier: CC0-1.0

ifdef app
	loop = 1
endif
+32 −0
Original line number Diff line number Diff line
/*
 * 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;
}