From: Florent Kermarrec Date: Mon, 2 Jul 2018 12:12:27 +0000 (+0200) Subject: bios/sdram: also check for last read of scan to choose optimal window X-Git-Tag: 24jan2021_ls180~1691 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=df99cc66e8273b0ea9cf5860d46dd4922f99c88a;p=litex.git bios/sdram: also check for last read of scan to choose optimal window --- diff --git a/litex/soc/software/bios/sdram.c b/litex/soc/software/bios/sdram.c index b0e74161..cd189424 100644 --- a/litex/soc/software/bios/sdram.c +++ b/litex/soc/software/bios/sdram.c @@ -422,7 +422,7 @@ static int read_level_scan(int silent) if(MMPTR(sdram_dfii_pix_rddata_addr[p]+4*(i+DFII_PIX_DATA_SIZE/2)) != prs[DFII_PIX_DATA_SIZE*p+i+DFII_PIX_DATA_SIZE/2]) working = 0; } - if (j == 0) + if ((j == 0) || (j == (ERR_DDRPHY_DELAY-1))) /* to have an optimal scan, first tap should not be working */ optimal &= (working == 0); if (!silent)