Merge pull request #95 from gsomlo/gls-dfii-nphases

init: improve legibility of generated/sdram_phy.h (cosmetic)
This commit is contained in:
enjoy-digital 2019-11-15 19:42:27 +01:00 committed by GitHub
commit 3fa4397224
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -416,19 +416,19 @@ __attribute__((unused)) static void command_p{n}(int cmd)
for n in range(nphases): for n in range(nphases):
sdram_dfii_pix_wrdata_addr.append("CSR_SDRAM_DFII_PI{n}_WRDATA_ADDR".format(n=n)) sdram_dfii_pix_wrdata_addr.append("CSR_SDRAM_DFII_PI{n}_WRDATA_ADDR".format(n=n))
r += """ r += """
const unsigned long sdram_dfii_pix_wrdata_addr[{n}] = {{ const unsigned long sdram_dfii_pix_wrdata_addr[DFII_NPHASES] = {{
{sdram_dfii_pix_wrdata_addr} \t{sdram_dfii_pix_wrdata_addr}
}}; }};
""".format(n=nphases, sdram_dfii_pix_wrdata_addr=",\n\t".join(sdram_dfii_pix_wrdata_addr)) """.format(sdram_dfii_pix_wrdata_addr=",\n\t".join(sdram_dfii_pix_wrdata_addr))
sdram_dfii_pix_rddata_addr = [] sdram_dfii_pix_rddata_addr = []
for n in range(nphases): for n in range(nphases):
sdram_dfii_pix_rddata_addr.append("CSR_SDRAM_DFII_PI{n}_RDDATA_ADDR".format(n=n)) sdram_dfii_pix_rddata_addr.append("CSR_SDRAM_DFII_PI{n}_RDDATA_ADDR".format(n=n))
r += """ r += """
const unsigned long sdram_dfii_pix_rddata_addr[{n}] = {{ const unsigned long sdram_dfii_pix_rddata_addr[DFII_NPHASES] = {{
{sdram_dfii_pix_rddata_addr} \t{sdram_dfii_pix_rddata_addr}
}}; }};
""".format(n=nphases, sdram_dfii_pix_rddata_addr=",\n\t".join(sdram_dfii_pix_rddata_addr)) """.format(sdram_dfii_pix_rddata_addr=",\n\t".join(sdram_dfii_pix_rddata_addr))
r += "\n" r += "\n"
init_sequence, mr1 = get_sdram_phy_init_sequence(phy_settings, timing_settings) init_sequence, mr1 = get_sdram_phy_init_sequence(phy_settings, timing_settings)