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

cycles = 1024 + 512
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)