sdram_init/get_sdram_phy_py_header: generate mr1 value, fix init_sequence identation

This commit is contained in:
Florent Kermarrec 2018-12-13 16:30:29 +01:00
parent 33ff34b622
commit 7a2ff338f5
1 changed files with 5 additions and 1 deletions

View File

@ -433,10 +433,14 @@ def get_sdram_phy_py_header(phy_settings, timing_settings):
r += "dfii_command_rddata = 0x20\n" r += "dfii_command_rddata = 0x20\n"
r += "\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" r += "init_sequence = [\n"
for comment, a, ba, cmd, delay in init_sequence: for comment, a, ba, cmd, delay in init_sequence:
r += " "
r += "(\"" + comment + "\", " r += "(\"" + comment + "\", "
r += str(a) + ", " r += str(a) + ", "
r += str(ba) + ", " r += str(ba) + ", "