From 07d24834817e16aefe482c9468fa95cec7b44fe5 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 20 Feb 2020 09:29:38 +0100 Subject: [PATCH] litedram_gen: Limit SDRAM size exposed to the CPU to 16MB. This is enough for the Initialization/Calibration and fixes the mapping issues with large SDRAMs. --- litedram/gen.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/litedram/gen.py b/litedram/gen.py index bfe38f1..c779b4a 100755 --- a/litedram/gen.py +++ b/litedram/gen.py @@ -329,8 +329,9 @@ class LiteDRAMCore(SoCSDRAM): # SoCSDRAM --------------------------------------------------------------------------------- SoCSDRAM.__init__(self, platform, sys_clk_freq, - cpu_type = cpu_type, - csr_alignment = csr_align, + cpu_type = cpu_type, + csr_alignment = csr_align, + max_sdram_size = 0x01000000, # Only expose 16MB to the CPU, enough for Init/Calib. **kwargs) # CRG --------------------------------------------------------------------------------------