argh, reading regfile over DMI was overlapped and corrupting reg 0
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 24 Aug 2020 22:27:02 +0000 (23:27 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 24 Aug 2020 22:27:02 +0000 (23:27 +0100)
src/soc/litex/florent/sim.py

index e4a1fbbf2446ea4c62694cdcdcc573dd69e1a137..688fde4b67dfdf1d46eb579ff99eb22b58baf198 100755 (executable)
@@ -285,7 +285,7 @@ class LibreSoCSim(SoCSDRAM):
 
         # read all 32 GPRs
         for i in range(32):
-            self.sync += If(active_dbg & (dmicount == 14+(i*8)),
+            self.sync += If(active_dbg & (dmicount == 16+(i*8)),
                 (dmi_addr.eq(0b100), # GSPR addr
                  dmi_din.eq(i), # r1
                  dmi_req.eq(1),
@@ -293,7 +293,7 @@ class LibreSoCSim(SoCSDRAM):
                 )
             )
 
-            self.sync += If(active_dbg & (dmicount == 18+(i*8)),
+            self.sync += If(active_dbg & (dmicount == 20+(i*8)),
                 (dmi_addr.eq(0b101), # GSPR data
                  dmi_req.eq(1),
                  dmi_wen.eq(0),