From 317dba831492474cde30b26a4324b3b684debcda Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 5 Mar 2019 18:01:03 +0100 Subject: [PATCH] software/bios/sdram: use specific ERR_DDRPHY_BITSLIP/NMODULES computation In the future, the PHYs should generated these constants. --- litex/soc/software/bios/sdram.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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) -- 2.30.2