litedram/init: Cleanup supported memory generation.
This commit is contained in:
parent
6dadc11b21
commit
50fc6792e6
|
@ -956,10 +956,10 @@ def get_sdram_phy_c_header(phy_settings, timing_settings, geom_settings):
|
|||
assert phy_settings.memtype == "DDR4"
|
||||
r.define("SDRAM_PHY_CLAM_SHELL")
|
||||
|
||||
# litedram doesn't support multiple ranks
|
||||
supported_memory = 2 ** (geom_settings.bankbits +
|
||||
geom_settings.rowbits +
|
||||
geom_settings.colbits) * phy_settings.databits // 8
|
||||
# Define memory size.
|
||||
supported_memory = 2**(geom_settings.bankbits +
|
||||
geom_settings.rowbits +
|
||||
geom_settings.colbits)*phy_settings.nranks*phy_settings.databits//8
|
||||
r.define("SDRAM_PHY_SUPPORTED_MEMORY", f"0x{supported_memory:016x}ULL")
|
||||
|
||||
r.newline()
|
||||
|
|
Loading…
Reference in New Issue