diff --git a/litex/soc/software/liblitedram/sdram.c b/litex/soc/software/liblitedram/sdram.c index 859bb121d..277d0c641 100644 --- a/litex/soc/software/liblitedram/sdram.c +++ b/litex/soc/software/liblitedram/sdram.c @@ -398,14 +398,16 @@ static void sdram_leveling_center_module( /* Get a bit further into the working zone */ #if SDRAM_PHY_DELAYS > 32 - for(i=0;i<16;i++) { + #define SDRAM_PHY_DELAY_JUMP 16 +#elif SDRAM_PHY_DELAYS > 8 + #define SDRAM_PHY_DELAY_JUMP 4 +#else + #define SDRAM_PHY_DELAY_JUMP 1 +#endif + for(i=0;i