summaryrefslogtreecommitdiff
path: root/tb/sim/fibonacci.py
blob: fb20b6380b71d5d3a7fe05a69a2baa07385466fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
BASE = 0x0001_0000
COUNT = 20

cycles = 500
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)