phy/model: Let the model pick default settings when settings is set to None (In this case, data_width needs to be provided).

This commit is contained in:
Florent Kermarrec 2021-07-08 09:09:05 +02:00
parent daf2cb7d39
commit 894c7fb49e
1 changed files with 10 additions and 1 deletions

View File

@ -501,12 +501,21 @@ class SDRAMPHYModel(Module):
return bank_init
def __init__(self, module, settings, clk_freq=100e6,
def __init__(self, module, settings=None, data_width=None, clk_freq=100e6,
we_granularity = 8,
init = [],
address_mapping = "ROW_BANK_COL",
verbosity = SDRAM_VERBOSE_OFF):
# PHY Settings -----------------------------------------------------------------------------
if settings is None:
assert data_width is not None
settings = get_sdram_phy_settings(
memtype = module.memtype,
data_width = data_width,
clk_freq = clk_freq
)
# Parameters -------------------------------------------------------------------------------
burst_length = {
"SDR": 1,