diff options
author | Ross Schlaikjer <ross@schlaikjer.net> | 2020-04-07 14:03:55 -0400 |
---|---|---|
committer | Ross Schlaikjer <ross@schlaikjer.net> | 2020-04-07 14:03:55 -0400 |
commit | 0bdf1e05f126e01adcea3f11d1d76f3235ab44e8 (patch) | |
tree | b8c247e05ed73492f2dda5dd3b86e47f24c8642c /ecp5/pack.cc | |
parent | c00746316854566d82694a5ab1811ebb9bb7685d (diff) | |
download | nextpnr-0bdf1e05f126e01adcea3f11d1d76f3235ab44e8.tar.gz nextpnr-0bdf1e05f126e01adcea3f11d1d76f3235ab44e8.tar.bz2 nextpnr-0bdf1e05f126e01adcea3f11d1d76f3235ab44e8.zip |
Extract regmode configuration to ArchInfo
Diffstat (limited to 'ecp5/pack.cc')
-rw-r--r-- | ecp5/pack.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ecp5/pack.cc b/ecp5/pack.cc index f5e8a544..16728af4 100644 --- a/ecp5/pack.cc +++ b/ecp5/pack.cc @@ -3004,6 +3004,16 @@ void Arch::assignArchInfo() ci->sliceInfo.has_l6mux = true; } else if (ci->type == id_DP16KD) { ci->ramInfo.is_pdp = (int_or_default(ci->params, id("DATA_WIDTH_A"), 0) == 36); + + // Output register mode (REGMODE_{A,B}). Valid options are 'NOREG' and 'OUTREG'. + std::string regmode_a = str_or_default(ci->params, id("REGMODE_A"), "NOREG"); + if (!(regmode_a == "NOREG" || regmode_a == "OUTREG")) + NPNR_ASSERT_FALSE_STR("bad DP16KD REGMODE_A configuration '" + regmode_a + "'"); + std::string regmode_b = str_or_default(ci->params, id("REGMODE_B"), "NOREG"); + if (!(regmode_b == "NOREG" || regmode_b == "OUTREG")) + NPNR_ASSERT_FALSE_STR("bad DP16KD REGMODE_B configuration '" + regmode_b + "'"); + ci->ramInfo.output_a_registered = regmode_a == "OUTREG"; + ci->ramInfo.output_b_registered = regmode_b == "OUTREG"; } } for (auto net : sorted(nets)) { |