aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/pack.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ecp5/pack.cc')
-rw-r--r--ecp5/pack.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/ecp5/pack.cc b/ecp5/pack.cc
index 16728af4..11aef630 100644
--- a/ecp5/pack.cc
+++ b/ecp5/pack.cc
@@ -3012,8 +3012,19 @@ void Arch::assignArchInfo()
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";
+ ci->ramInfo.is_output_a_registered = regmode_a == "OUTREG";
+ ci->ramInfo.is_output_b_registered = regmode_b == "OUTREG";
+
+ // Based on the REGMODE, we have different timing lookup tables.
+ if (!ci->ramInfo.is_output_a_registered && !ci->ramInfo.is_output_b_registered) {
+ ci->ramInfo.regmode_timing_id = id_DP16KD_REGMODE_A_NOREG_REGMODE_B_NOREG;
+ } else if (!ci->ramInfo.is_output_a_registered && ci->ramInfo.is_output_b_registered) {
+ ci->ramInfo.regmode_timing_id = id_DP16KD_REGMODE_A_NOREG_REGMODE_B_OUTREG;
+ } else if (ci->ramInfo.is_output_a_registered && !ci->ramInfo.is_output_b_registered) {
+ ci->ramInfo.regmode_timing_id = id_DP16KD_REGMODE_A_OUTREG_REGMODE_B_NOREG;
+ } else if (ci->ramInfo.is_output_a_registered && ci->ramInfo.is_output_b_registered) {
+ ci->ramInfo.regmode_timing_id = id_DP16KD_REGMODE_A_OUTREG_REGMODE_B_OUTREG;
+ }
}
}
for (auto net : sorted(nets)) {