From b4ee95c3e347462d7c7c144e200587cd7068a785 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 7 Jan 2019 22:59:20 +0100 Subject: [PATCH] sdram_init: generate ddrx_mr1 only if mr1 is not None --- litedram/sdram_init.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/litedram/sdram_init.py b/litedram/sdram_init.py index c29be50..86ceffc 100644 --- a/litedram/sdram_init.py +++ b/litedram/sdram_init.py @@ -436,8 +436,9 @@ def get_sdram_phy_py_header(phy_settings, timing_settings): init_sequence, mr1 = get_sdram_phy_init_sequence(phy_settings, timing_settings) - r += "ddrx_mr1 = 0x{:x}\n".format(mr1) - r += "\n" + if mr1 is not None: + r += "ddrx_mr1 = 0x{:x}\n".format(mr1) + r += "\n" r += "init_sequence = [\n" for comment, a, ba, cmd, delay in init_sequence: