Skip to content

Commit

Permalink
Fix timing lookup for DP8KC
Browse files Browse the repository at this point in the history
  • Loading branch information
mmicko authored and gatecat committed Oct 2, 2023
1 parent e4cb7ea commit 95e7598
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions machxo2/pack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1742,6 +1742,17 @@ void Arch::assign_arch_info_for_cell(CellInfo *ci)
log_error("DP8KC %s has invalid REGMODE_B configuration '%s'\n", ci->name.c_str(this), regmode_b.c_str());
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_DP8KC_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_DP8KC_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_DP8KC_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_DP8KC_REGMODE_A_OUTREG_REGMODE_B_OUTREG;
}
}
}

Expand Down

0 comments on commit 95e7598

Please sign in to comment.