Change getBudgetOverride() signature to return bool and modify budget in place

This commit is contained in:
Eddie Hung 2018-08-05 22:31:59 -07:00
parent 2fb934b107
commit 823ceaacbf
2 changed files with 7 additions and 5 deletions

View File

@ -637,17 +637,19 @@ std::vector<GroupId> Arch::getGroupGroups(GroupId group) const
// -----------------------------------------------------------------------
delay_t Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t budget) 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) {
auto driver_loc = getBelLocation(driver.cell->bel);
auto sink_loc = getBelLocation(sink.cell->bel);
if (driver_loc.y == sink_loc.y)
return 0;
return 250;
budget = 0;
else
budget = 190;
return true;
}
return budget;
return false;
}
// -----------------------------------------------------------------------

View File

@ -766,7 +766,7 @@ struct Arch : BaseCtx
delay_t getRipupDelayPenalty() const { return 200; }
float getDelayNS(delay_t v) const { return v * 0.001; }
uint32_t getDelayChecksum(delay_t v) const { return v; }
delay_t getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t budget) const;
bool getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t &budget) const;
// -------------------------------------------------