From 7a2ff338f5a6ae311b0f18962255bf361db1b034 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 13 Dec 2018 16:30:29 +0100 Subject: [PATCH] sdram_init/get_sdram_phy_py_header: generate mr1 value, fix init_sequence identation --- litedram/sdram_init.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/litedram/sdram_init.py b/litedram/sdram_init.py index 4b57204..a03c5ba 100644 --- a/litedram/sdram_init.py +++ b/litedram/sdram_init.py @@ -433,10 +433,14 @@ def get_sdram_phy_py_header(phy_settings, timing_settings): r += "dfii_command_rddata = 0x20\n" r += "\n" - init_sequence, _ = get_sdram_phy_init_sequence(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" r += "init_sequence = [\n" for comment, a, ba, cmd, delay in init_sequence: + r += " " r += "(\"" + comment + "\", " r += str(a) + ", " r += str(ba) + ", "