match up dram initialisation parameters
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 19 Feb 2022 15:54:05 +0000 (15:54 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 19 Feb 2022 15:54:05 +0000 (15:54 +0000)
Makefile
coldboot/coldboot.c
src/ls2.py

index b547e2e05d56de4f83ec3468c5efba366d70b16a..0943765607783c868a7d6430a1a61bfbc1369478 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,7 @@ endif
 # Hello world
 MEMORY_SIZE=8192
 RAM_INIT_FILE=hello_world/hello_world.bin
+RAM_INIT_FILE=coldboot/coldboot.bin
 SIM_MAIN_BRAM=false
 
 # Micropython
index 3026442929a8fa8249e577629bc1fa9c9f524e23..8eba6a108c7edaf0d53ff8efb95b675b04596f82 100644 (file)
@@ -2,6 +2,7 @@
 #include <stdbool.h>
 
 #include "console.h"
+#include "microwatt_soc.h"
 
 #include <stdlib.h>
 #include <stdint.h>
@@ -74,9 +75,9 @@ int main(void) {
                .rdly_p1 = 2,
        };
        struct gramProfile profile2;
-       gram_init(&ctx, &profile, (void*)0x10000000,
-                              (void*)0x00009000, 
-                              (void*)0x00008000);
+       gram_init(&ctx, &profile, (void*)DRAM_BASE, //0x10000000,
+                              (void*)DRAM_CTRL_BASE, //0x00009000,
+                              (void*)DRAM_INIT_BASE); //0x00008000);
        puts("done\n");
 
        puts("Rdly\np0: ");
index 6486bdddb534e94f7084034e7159342a0445c578..2d5807fca13472c7943695718968af91fef59780 100644 (file)
@@ -298,9 +298,10 @@ if __name__ == "__main__":
 
     # set up the SOC
     soc = DDR3SoC(dram_cls=dram_cls,
-                  ddrphy_addr=0xff000000, # DRAM firmware init base
-                  dramcore_addr=0x80000000,
-                  ddr_addr=0x10000000,
+                  # check microwatt_soc.h for these
+                  ddrphy_addr=0xff000000,   # DRAM_INIT_BASE firmware base
+                  dramcore_addr=0xc8000000, # DRAM_CTRL_BASE
+                  ddr_addr=0x40000000,      # DRAM_BASE
                   fw_addr=fw_addr,
                   #fw_addr=None,
                   ddr_pins=ddr_pins,