From: Florent Kermarrec Date: Thu, 13 Sep 2018 03:26:51 +0000 (+0200) Subject: bios/sdram: show all read scans when failing. X-Git-Tag: 24jan2021_ls180~1615 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1468b9f3ba68fd4ed509296cd2f2b49c047648d9;p=litex.git bios/sdram: show all read scans when failing. --- diff --git a/litex/soc/software/bios/main.c b/litex/soc/software/bios/main.c index fa5b1533..818a069d 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 a5496fc2..8146228f 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