From e7ca72b22f6e9ddd49e507866d1f8b00496b2aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Boczar?= Date: Tue, 19 Jan 2021 13:48:33 +0100 Subject: [PATCH] fix Python init header generation --- litedram/init.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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"