add blinken lights assembly (not used yet)
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 9 Apr 2021 11:40:48 +0000 (12:40 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 9 Apr 2021 11:40:48 +0000 (12:40 +0100)
src/soc/debug/firmware_upload.py

index 9fdef8b706c2dd3dbbdf1e1e8c01dd74e3ff729a..e0e16867619b12a53f4b46db6b804feff8ef9a93 100644 (file)
@@ -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