From f01c75938c0c8212ac14cb78b0b864825b4adb17 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 9 Apr 2021 12:40:48 +0100 Subject: [PATCH] add blinken lights assembly (not used yet) --- src/soc/debug/firmware_upload.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/soc/debug/firmware_upload.py b/src/soc/debug/firmware_upload.py index 9fdef8b7..e0e16867 100644 --- a/src/soc/debug/firmware_upload.py +++ b/src/soc/debug/firmware_upload.py @@ -160,6 +160,21 @@ if __name__ == '__main__': sim = Simulator(m) sim.add_clock(1e-6, domain="sync") # standard clock + # blinken lights... + lst = """ + blink: + li 3, 0 + lis 4, 1234 + lis 5, 5678 + .LBB0_1: + std 3, 6780(4) + mtctr 5 + .LBB0_2: + bdnz .LBB0_2 + xori 3, 3, 1 + b .LBB0_1 + """ + # simple loop lst = ["addi 9, 0, 0x10", # i = 16 "addi 9,9,-1", # i = i - 1 "cmpi 2,1,9,12", # compare 9 to value 12, store in CR2 -- 2.30.2