add means to run hello_world.bin under simulation
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 4 Sep 2020 12:01:09 +0000 (13:01 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 4 Sep 2020 12:12:38 +0000 (13:12 +0100)
works with both microwatt and libresoc

src/soc/litex/florent/sim.py

index 23d0c6c04966030543ac4414f6446d74e39e9b6a..02d5e690d9da3440d7878bf896b11e87cd7c798d 100755 (executable)
@@ -51,7 +51,9 @@ class LibreSoCSim(SoCSDRAM):
         ram_fname = "/home/lkcl/src/libresoc/microwatt/" \
                     "tests/3.bin"
         #ram_fname = "/tmp/test.bin"
-        ram_fname = None
+        #ram_fname = None
+        ram_fname = "/home/lkcl/src/libresoc/microwatt/" \
+                    "hello_world/hello_world.bin"
 
         ram_init = []
         if ram_fname:
@@ -66,6 +68,9 @@ class LibreSoCSim(SoCSDRAM):
             # without sram nothing works, therefore move it to higher up
             self.mem_map["sram"] = 0x90000000
 
+            # put UART at 0xc000200 (w00t!  this works!)
+            self.csr_map["uart"] = 4
+
 
         # SoCCore -------------------------------------------------------------
         SoCSDRAM.__init__(self, platform, clk_freq=sys_clk_freq,