PhySettings: add databits to allow SoC to compute memory size more easily

This commit is contained in:
Florent Kermarrec 2019-05-10 15:44:44 +02:00
parent b93412bbdc
commit 50e1d478db
6 changed files with 7 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class Settings:
class PhySettings(Settings):
def __init__(self, memtype, dfi_databits,
def __init__(self, memtype, databits, dfi_databits,
nphases,
rdphase, wrphase,
rdcmdphase, wrcmdphase,

View File

@ -138,6 +138,7 @@ class ECP5DDRPHY(Module, AutoCSR):
wrcmdphase, wrphase = get_sys_phases(nphases, cwl_sys_latency, cwl)
self.settings = PhySettings(
memtype=memtype,
databits=databits,
dfi_databits=4*databits,
nranks=nranks,
nphases=nphases,

View File

@ -31,6 +31,7 @@ class GENSDRPHY(Module):
self.settings = PhySettings(
memtype="SDR",
databits=databits,
dfi_databits=databits,
nranks=nranks,
nphases=1,

View File

@ -43,6 +43,7 @@ class S6HalfRateDDRPHY(Module):
if memtype == "DDR3":
self.settings = PhySettings(
memtype="DDR3",
databits=databits,
dfi_databits=2*databits,
nranks=nranks,
nphases=nphases,
@ -58,6 +59,7 @@ class S6HalfRateDDRPHY(Module):
else:
self.settings = PhySettings(
memtype=memtype,
databits=databits,
dfi_databits=2*databits,
nranks=nranks,
nphases=nphases,

View File

@ -94,6 +94,7 @@ class S7DDRPHY(Module, AutoCSR):
wrcmdphase, wrphase = get_sys_phases(nphases, cwl_sys_latency, cwl)
self.settings = PhySettings(
memtype=memtype,
databits=databits,
dfi_databits=2*databits,
nranks=nranks,
nphases=nphases,

View File

@ -106,6 +106,7 @@ class USDDRPHY(Module, AutoCSR):
wrcmdphase, wrphase = get_sys_phases(nphases, cwl_sys_latency, cwl)
self.settings = PhySettings(
memtype=memtype,
databits=databits,
dfi_databits=2*databits,
nranks=nranks,
nphases=nphases,