From 54d3312cc6481fe224eb0bf222c04bf1e63ded8b Mon Sep 17 00:00:00 2001 From: "Gabriel L. Somlo" Date: Mon, 29 Apr 2019 14:26:41 -0400 Subject: [PATCH] sdram_init: use "unsigned long" for address values --- litedram/sdram_init.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litedram/sdram_init.py b/litedram/sdram_init.py index 2dd101e..a2ffd49 100644 --- a/litedram/sdram_init.py +++ b/litedram/sdram_init.py @@ -380,7 +380,7 @@ __attribute__((unused)) static void command_p{n}(int cmd) for n in range(nphases): sdram_dfii_pix_wrdata_addr.append("CSR_SDRAM_DFII_PI{n}_WRDATA_ADDR".format(n=n)) r += """ -const unsigned int sdram_dfii_pix_wrdata_addr[{n}] = {{ +const unsigned long sdram_dfii_pix_wrdata_addr[{n}] = {{ {sdram_dfii_pix_wrdata_addr} }}; """.format(n=nphases, sdram_dfii_pix_wrdata_addr=",\n\t".join(sdram_dfii_pix_wrdata_addr)) @@ -389,7 +389,7 @@ const unsigned int sdram_dfii_pix_wrdata_addr[{n}] = {{ for n in range(nphases): sdram_dfii_pix_rddata_addr.append("CSR_SDRAM_DFII_PI{n}_RDDATA_ADDR".format(n=n)) r += """ -const unsigned int sdram_dfii_pix_rddata_addr[{n}] = {{ +const unsigned long sdram_dfii_pix_rddata_addr[{n}] = {{ {sdram_dfii_pix_rddata_addr} }}; """.format(n=nphases, sdram_dfii_pix_rddata_addr=",\n\t".join(sdram_dfii_pix_rddata_addr))