diff --git a/litex/soc/software/bios/main.c b/litex/soc/software/bios/main.c index fa5b1533f..818a069d5 100644 --- a/litex/soc/software/bios/main.c +++ b/litex/soc/software/bios/main.c @@ -403,7 +403,7 @@ static void do_command(char *c) else if(strcmp(token, "sdrwlon") == 0) sdrwlon(); else if(strcmp(token, "sdrwloff") == 0) sdrwloff(); #endif - else if(strcmp(token, "sdrlevel") == 0) sdrlevel(); + else if(strcmp(token, "sdrlevel") == 0) sdrlevel(0); #endif else if(strcmp(token, "memtest") == 0) memtest(); else if(strcmp(token, "sdrinit") == 0) sdrinit(); diff --git a/litex/soc/software/bios/sdram.c b/litex/soc/software/bios/sdram.c index a5496fc2b..8146228fd 100644 --- a/litex/soc/software/bios/sdram.c +++ b/litex/soc/software/bios/sdram.c @@ -719,7 +719,7 @@ int memtest(void) } #ifdef CSR_DDRPHY_BASE -int sdrlevel(void) +int sdrlevel(int silent) { int delay[DFII_PIX_DATA_SIZE/2]; int high_skew[DFII_PIX_DATA_SIZE/2]; @@ -729,6 +729,8 @@ int sdrlevel(void) int best_score; int best_bitslip; + sdrsw(); + for(i=0; i best_score) { best_bitslip = bitslip; best_score = score; @@ -764,7 +768,7 @@ int sdrlevel(void) } /* select best read window */ - printf("Read bitslip: %d\n", best_bitslip); + printf("Best read bitslip: %d\n", best_bitslip); for(i=0; i