diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-10-16 16:02:52 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-10-16 16:02:52 -0600 |
| commit | a5468f968b46707e08eacf79847f1e12a4213ff7 (patch) | |
| tree | b67da1116bf1a87b9cd113f0f9c25c3a9b9672e9 /tb/sim/fibonacci.py | |
| parent | 851e6ff85a8d2dabdfc0234abd0b284aed8e5031 (diff) | |
Add C simulation testbench
Diffstat (limited to 'tb/sim/fibonacci.py')
| -rw-r--r-- | tb/sim/fibonacci.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tb/sim/fibonacci.py b/tb/sim/fibonacci.py new file mode 100644 index 0000000..48a17d8 --- /dev/null +++ b/tb/sim/fibonacci.py @@ -0,0 +1,15 @@ +BASE = 0x0001_0000 +COUNT = 20 + +mem_dumps = [range(BASE, BASE + 4 * COUNT)] + +def final(): + words = [] + a, b = 1, 1 + + for _ in range(COUNT): + words.append(a) + c = a + b + a, b = b, c + + assert_mem(BASE, words) |
