From a5468f968b46707e08eacf79847f1e12a4213ff7 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Sun, 16 Oct 2022 16:02:52 -0600 Subject: Add C simulation testbench --- tb/sim/fibonacci.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tb/sim/fibonacci.c (limited to 'tb/sim/fibonacci.c') diff --git a/tb/sim/fibonacci.c b/tb/sim/fibonacci.c new file mode 100644 index 0000000..f02398a --- /dev/null +++ b/tb/sim/fibonacci.c @@ -0,0 +1,13 @@ +void reset() +{ + int a = 1, b = 1, *p = (int*)0x00010000; + + for(int i = 0; i < 20; ++i) + { + int c = a + b; + + *p++ = a; + a = b; + b = c; + } +} -- cgit v1.2.3