aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/arch.cc
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2018-08-05 22:31:59 -0700
committerEddie Hung <eddieh@ece.ubc.ca>2018-08-06 07:56:28 -0700
commit823ceaacbf87aa222f7396891b5018cb00b6e9ef (patch)
treeeffd3d71acaa89aca3f39f60bcb9794a0ddf8694 /ice40/arch.cc
parent2fb934b107d63b43afcde0e724a91c33500fe95c (diff)
downloadnextpnr-823ceaacbf87aa222f7396891b5018cb00b6e9ef.tar.gz
nextpnr-823ceaacbf87aa222f7396891b5018cb00b6e9ef.tar.bz2
nextpnr-823ceaacbf87aa222f7396891b5018cb00b6e9ef.zip
Change getBudgetOverride() signature to return bool and modify budget in place
Diffstat (limited to 'ice40/arch.cc')
-rw-r--r--ice40/arch.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc
index 0b168383..b8bb13ea 100644
--- a/ice40/arch.cc
+++ b/ice40/arch.cc
@@ -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;
}
// -----------------------------------------------------------------------