From fc0d5c3963146f67ad03ba0c6bdf06a6b4a0cde6 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 5 Nov 2018 18:44:28 +0100 Subject: [PATCH] bios/sdram: iterate multiple time for write leveling and add vote to eliminate transcients --- litex/soc/software/bios/sdram.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/litex/soc/software/bios/sdram.c b/litex/soc/software/bios/sdram.c index 6344006b9..17474c1ac 100644 --- a/litex/soc/software/bios/sdram.c +++ b/litex/soc/software/bios/sdram.c @@ -229,7 +229,7 @@ void sdrwloff(void) int write_level(void) { - int i, j; + int i, j, k; int dq_address; unsigned char dq; @@ -269,11 +269,22 @@ int write_level(void) #endif /* scan taps */ for(j=0;j zero_count) + taps_scan[j] = 1; + else + taps_scan[j] = 0; + printf("%d", taps_scan[j]); ddrphy_wdly_dq_inc_write(1); ddrphy_wdly_dqs_inc_write(1); cdelay(10);