From 48ec20e2efdb5ed6a48a36c7c49f12ac6e40c8a9 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 26 Apr 2021 17:24:53 +0200 Subject: [PATCH] software/liblitedram/sdram: Remove wraps around in sdram_leveling_center_module. Adding wraps around capability will have to be discussed, if implemented this has to be done very carefully since there are no relation between the total delay that can be compensated through the I/O-DELAYs and the SDRAM clock period. As implemented, it also produced confusing values in the logs: m0:0 m1:0 Read leveling: m0, b0: |00000000000000000000000000000000| delays: - m0, b1: |00000000000011111111111111100000| delays: 19+-07 m0, b2: |00000000000000000000000000001111| delays: 14+-17 m0, b3: |00000000000000000000000000000000| delays: - m0, b4: |00000000000000000000000000000000| delays: - m0, b5: |00000000000000000000000000000000| delays: - m0, b6: |00000000000000000000000000000000| delays: - m0, b7: |00000000000000000000000000000000| delays: - best: m0, b01 delays: 19+-07 m1, b0: |00000000000000000000000000000000| delays: - m1, b1: |00000000000011111111111111000000| delays: 19+-07 m1, b2: |00000000000000000000000000001111| delays: 15+-17 m1, b3: |00000000000000000000000000000000| delays: - m1, b4: |00000000000000000000000000000000| delays: - m1, b5: |00000000000000000000000000000000| delays: - m1, b6: |00000000000000000000000000000000| delays: - m1, b7: |00000000000000000000000000000000| delays: - best: m1, b01 delays: 19+-07 Switching SDRAM to hardware control. --> 14+-17 and 15+-17 are confusing. --- litex/soc/software/liblitedram/sdram.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/litex/soc/software/liblitedram/sdram.c b/litex/soc/software/liblitedram/sdram.c index af4096d45..b1b10aedd 100644 --- a/litex/soc/software/liblitedram/sdram.c +++ b/litex/soc/software/liblitedram/sdram.c @@ -877,12 +877,6 @@ static void sdram_leveling_center_module( delay_max = delay; } - /* Extend the range if it wraps around */ - if (delay_min_next > 0) { - delay_min = delay_min_next; - delay_max += SDRAM_PHY_DELAYS; - } - if (show_long) printf("| ");