Skip to content

Commit

Permalink
Merge pull request #220 from YosysHQ/coi3
Browse files Browse the repository at this point in the history
ice40: Add budget override for CO->I3 path
  • Loading branch information
eddiehung authored Jan 29, 2019
2 parents 6cc1bfc + 77bb5ea commit 6d66404
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions ice40/arch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -594,26 +594,29 @@ std::vector<GroupId> Arch::getGroupGroups(GroupId group) const
bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t &budget) const
{
const auto &driver = net_info->driver;
if (driver.port == id_COUT && sink.port == id_CIN) {
if (driver.cell->constr_abs_z && driver.cell->constr_z < 7)
if (driver.port == id_COUT) {
NPNR_ASSERT(sink.port == id_CIN || sink.port == id_I3);
NPNR_ASSERT(driver.cell->constr_abs_z);
bool cin = sink.port == id_CIN;
bool same_y = driver.cell->constr_z < 7;
if (cin && same_y)
budget = 0;
else {
NPNR_ASSERT(driver.cell->constr_z == 7);
switch (args.type) {
#ifndef ICE40_HX1K_ONLY
case ArchArgs::HX8K:
#endif
case ArchArgs::HX1K:
budget = 190;
budget = cin ? 190 : (same_y ? 260 : 560);
break;
#ifndef ICE40_HX1K_ONLY
case ArchArgs::LP384:
case ArchArgs::LP1K:
case ArchArgs::LP8K:
budget = 290;
budget = cin ? 290 : (same_y ? 380 : 670);
break;
case ArchArgs::UP5K:
budget = 560;
budget = cin ? 560 : (same_y ? 660 : 1220);
break;
#endif
default:
Expand Down

0 comments on commit 6d66404

Please sign in to comment.