diff --git a/litedram/init.py b/litedram/init.py index d58c59a..2cc80a3 100644 --- a/litedram/init.py +++ b/litedram/init.py @@ -627,10 +627,10 @@ def get_sdram_phy_py_header(phy_settings, timing_settings): r += "dfii_command_rddata = 0x20\n" r += "\n" - init_sequence, mr1 = get_sdram_phy_init_sequence(phy_settings, timing_settings) + init_sequence, mr = get_sdram_phy_init_sequence(phy_settings, timing_settings) - if mr1 is not None: - r += "ddrx_mr1 = 0x{:x}\n".format(mr1) + if mr is not None and 1 in mr: + r += "ddrx_mr1 = 0x{:x}\n".format(mr[1]) r += "\n" r += "init_sequence = [\n"