diff --git a/litex/soc/software/bios/sdram.c b/litex/soc/software/bios/sdram.c index ba1bd216d..d9e3023d0 100644 --- a/litex/soc/software/bios/sdram.c +++ b/litex/soc/software/bios/sdram.c @@ -598,7 +598,33 @@ int memtest(void) } #ifdef CSR_DDRPHY_BASE -int sdrlevel(void) +#ifdef READ_LEVELING_BITSLIP +int sdrlevel(void) /* manual */ +{ + int bitslip, delay, module; + int i; + sdram_dfii_control_write(DFII_CONTROL_SEL); + for(module=0; module<8; module++) { + ddrphy_dly_sel_write(1<