From: Luke Kenneth Casson Leighton Date: Fri, 9 Apr 2021 11:40:48 +0000 (+0100) Subject: add blinken lights assembly (not used yet) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f01c75938c0c8212ac14cb78b0b864825b4adb17;p=soc.git add blinken lights assembly (not used yet) --- 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