From: Florent Kermarrec Date: Tue, 5 Mar 2019 17:01:03 +0000 (+0100) Subject: software/bios/sdram: use specific ERR_DDRPHY_BITSLIP/NMODULES computation X-Git-Tag: 24jan2021_ls180~1368 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=317dba831492474cde30b26a4324b3b684debcda;p=litex.git software/bios/sdram: use specific ERR_DDRPHY_BITSLIP/NMODULES computation In the future, the PHYs should generated these constants. --- diff --git a/litex/soc/software/bios/sdram.c b/litex/soc/software/bios/sdram.c index 4ffb108e..409a7b81 100644 --- a/litex/soc/software/bios/sdram.c +++ b/litex/soc/software/bios/sdram.c @@ -210,17 +210,18 @@ void sdrwr(char *startaddr) #if defined (USDDRPHY) #define ERR_DDRPHY_DELAY 512 -#define ERR_DDRPHY_BITSLIP DFII_NPHASES*2 +#define ERR_DDRPHY_BITSLIP 8 +#define NBMODULES DFII_PIX_DATA_SIZE/2 #elif defined (ECP5DDRPHY) #define ERR_DDRPHY_DELAY 8 #define ERR_DDRPHY_BITSLIP 1 +#define NBMODULES DFII_PIX_DATA_SIZE/4 #else #define ERR_DDRPHY_DELAY 32 -#define ERR_DDRPHY_BITSLIP DFII_NPHASES*2 +#define ERR_DDRPHY_BITSLIP 8 +#define NBMODULES DFII_PIX_DATA_SIZE/2 #endif -#define NBMODULES DFII_PIX_DATA_SIZE*DFII_NPHASES/8 - #ifdef CSR_DDRPHY_WLEVEL_EN_ADDR void sdrwlon(void)