Skip to content

litedram with vexriscv DDR4 SODIMM fails memtest (Xilinx VU9P + spd) #349

Open
@jersey99

Description

Hi All,

I am trying to bring up DDR4 on htg-940 board using litedram (I managed to get the spd dump over I2C). I feel like I have made some progress but seemed to have hit a dead-end for now. The memtest fails on about half the data (50 or 75% data errors). I would appreciate if some more experienced DDR4 personnel had a look at the memtest log or pin settings to see if they can give some feedback here.

litex> reboot                                                                                                                                                   

       __   _ __      _  __                                                                                                                                                     
      / /  (_) /____ | |/_/ 
     / /__/ / __/ -_)>  <                                                                                                                                                                                          
    /____/_/\__/\__/_/|_|                                                                                                                                                                                          
  Build your hardware, easily!  

(c) Copyright 2012-2023 Enjoy-Digital         
(c) Copyright 2007-2015 M-Labs
BIOS built on Oct  5 2023 21:40:13
BIOS CRC passed (b723a448)                                                                                                                                                                                             

LiteX git sha1: 98eb27df                                                                                                                                                                                       

--=============== SoC ==================--
CPU:            VexRiscv @ 125MHz
BUS:            WISHBONE 32-bit @ 4GiB
CSR:            32-bit data                                                                                                                                                                                             
ROM:            128.0KiB                                                                                                                                                                                    
SRAM:           8.0KiB                                                                                                                                                                              
L2:             8.0KiB                                                                                                                                                                              
SDRAM:          8.0GiB 64-bit @ 1000MT/s (CL-9 CWL-9)
MAIN-RAM:       1.0GiB                                                                                                                                                                              

--========== Initialization ============-- 
Initializing SDRAM @0x40000000... 
Switching SDRAM to software control. 
Write leveling:                                                                                                                                                         
 tCK equivalent taps: 604                                                                                                                                                                                          
 Cmd/Clk scan (0-302)                                                                                                                                                                              
 |00011  |011111111  |111111111  |111111111| best: 188
 Setting Cmd/Clk delay to 188 taps.
 Data scan:                                                                                                                                                
 m0: |11111111111110000000000| delay: 00                     
 m1: |11111111111111100000000| delay: 00                               
 m2: |11111111111111110000000| delay: 00                               
 m3: |11111111111111110000000| delay: 00                               
 m4: |00001111111111111111111| delay: 57                                 
 m5: |00001111111111111111111| delay: 58                                 
 m6: |00000111111111111111111| delay: 66                                 
 m7: |00001111111111111111111| delay: 54
Write latency calibration:                                                                                                                                                                                          
m0:6 m1:6 m2:6 m3:6 m4:6 m5:6 m6:6 m7:6                                                                                                                                                                                  ?  ? ? ? ? ? ? ?                                           
Read leveling:                                                                                                                                                      
 m0, b00: |00000000000000000000000000000000| delays: -                                                                                                                                                                  
 m0, b01: |00000000000000000000000000000000| delays: -                                                                                                                                                                     m0, b02: |00000000000000000000000000000000| delays: -                                                                                                                                                                     m0, b03: |11111111111110000000000000000000| delays: 100+-100
 m0, b04: |00000000000000001111111111111111| delays: 371+-130
 m0, b05: |00000000000000000000000000000000| delays: -
 m0, b06: |00000000000000000000000000000000| delays: -
 m0, b07: |00000000000000000000000000000000| delays: -
 best: m0, b04 delays: 371+-130
 m1, b00: |00000000000000000000000000000000| delays: -
 m1, b01: |00000000000000000000000000000000| delays: -
 m1, b02: |00000000000000000000000000000000| delays: -
 m1, b03: |11111111111111000000000000000000| delays: 111+-111
 m1, b04: |00000000000000000111111111111111| delays: 387+-124
 m1, b05: |00000000000000000000000000000000| delays: -
 m1, b06: |00000000000000000000000000000000| delays: -
 m1, b07: |00000000000000000000000000000000| delays: -
 best: m1, b04 delays: 387+-124
 m2, b00: |00000000000000000000000000000000| delays: -
 m2, b01: |00000000000000000000000000000000| delays: -
 m2, b02: |00000000000000000000000000000000| delays: -
 m2, b03: |11111111100000000000000000000000| delays: 69+-69
 m2, b04: |00000000000011111111111111111000| delays: 319+-126
 m2, b05: |00000000000000000000000000000001| delays: 503+-08
 m2, b06: |00000000000000000000000000000000| delays: -
 m2, b07: |00000000000000000000000000000000| delays: -
 best: m2, b04 delays: 318+-127
 m3, b00: |00000000000000000000000000000000| delays: -
 m3, b01: |00000000000000000000000000000000| delays: -
 m3, b02: |00000000000000000000000000000000| delays: -
 m3, b03: |11111111000000000000000000000000| delays: 59+-59
 m3, b04: |00000000000111111111111111100000| delays: 294+-128
 m3, b05: |00000000000000000000000000000011| delays: 492+-18
 m3, b06: |00000000000000000000000000000000| delays: -
 m3, b07: |00000000000000000000000000000000| delays: -
 best: m3, b04 delays: 293+-127
 m4, b00: |00000000000000000000000000000000| delays: -
 m4, b01: |00000000000000000000000000000000| delays: -
 m4, b02: |00000000000000000000000000000000| delays: -
 m4, b03: |11111110000000000000000000000000| delays: 50+-50
 m4, b04: |00000000001111111111111111000000| delays: 274+-126
 m4, b05: |00000000000000000000000000000111| delays: 481+-30
 m4, b06: |00000000000000000000000000000000| delays: -
 m4, b07: |00000000000000000000000000000000| delays: -
 best: m4, b04 delays: 274+-126
 m5, b00: |00000000000000000000000000000000| delays: -
 m5, b01: |00000000000000000000000000000000| delays: -
 m5, b02: |00000000000000000000000000000000| delays: -
 m5, b03: |11111110000000000000000000000000| delays: 52+-52
 m5, b04: |00000000001111111111111111000000| delays: 273+-129
 m5, b05: |00000000000000000000000000001111| delays: 480+-30
 m5, b06: |00000000000000000000000000000000| delays: -
 m5, b07: |00000000000000000000000000000000| delays: -
 best: m5, b04 delays: 274+-129
 m6, b00: |00000000000000000000000000000000| delays: -
 m6, b01: |00000000000000000000000000000000| delays: -
 m6, b02: |00000000000000000000000000000000| delays: -
 m6, b03: |11000000000000000000000000000000| delays: 14+-14
 m6, b04: |00000111111111111111100000000000| delays: 202+-128
 m6, b05: |00000000000000000000000011111111| delays: 445+-65
 m6, b06: |00000000000000000000000000000000| delays: -
 m6, b07: |00000000000000000000000000000000| delays: -
 best: m6, b04 delays: 202+-127
 m7, b00: |00000000000000000000000000000000| delays: -
 m7, b01: |00000000000000000000000000000000| delays: -
 m7, b02: |00000000000000000000000000000000| delays: -
 m7, b03: |10000000000000000000000000000000| delays: 06+-06
 m7, b04: |00001111111111111111000000000000| delays: 184+-129
 m7, b05: |00000000000000000000000111111111| delays: 433+-77
 m7, b06: |00000000000000000000000000000000| delays: -
 m7, b07: |00000000000000000000000000000000| delays: -
 best: m7, b04 delays: 185+-129
Switching SDRAM to hardware control.
Memtest at 0x40000000 (2.0MiB)...
 Write: 0x40000000-0x40200000 2.0MiB     
  Read: 0x40000000-0x40200000 2.0MiB     
 bus errors:  0/256
 addr errors: 0/8192
 data errors: 262144/524288
Memtest KO
Memory initialization failed

--============= Console ================--

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions