aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/arch.cc
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2018-07-26 22:30:15 -0700
committerEddie Hung <eddieh@ece.ubc.ca>2018-07-26 22:30:15 -0700
commitcd561b4316edeed72d468a28197c4b05c2cde85f (patch)
tree727b5c7a077c8c39336333a5ec0aea9f3e385861 /ice40/arch.cc
parent97e546041e109fdade1099b056c7166578314846 (diff)
downloadnextpnr-cd561b4316edeed72d468a28197c4b05c2cde85f.tar.gz
nextpnr-cd561b4316edeed72d468a28197c4b05c2cde85f.tar.bz2
nextpnr-cd561b4316edeed72d468a28197c4b05c2cde85f.zip
getBudgetOverride() now handles COUT crossing tiles
Diffstat (limited to 'ice40/arch.cc')
-rw-r--r--ice40/arch.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc
index fec35a0f..4e9baf7e 100644
--- a/ice40/arch.cc
+++ b/ice40/arch.cc
@@ -587,11 +587,18 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const
return xscale * abs(xd) + yscale * abs(yd) + offset;
}
-delay_t Arch::getBudgetOverride(const PortRef &pr, delay_t v) const
-{
- if (pr.port == id("COUT"))
- return 0;
- return v;
+delay_t Arch::getBudgetOverride(NetInfo *net_info, int user_idx, delay_t budget) const
+{
+ const auto& driver = net_info->driver;
+ if (driver.port == id_cout) {
+ const auto& sink = net_info->users[user_idx];
+ 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;
+ }
+ return budget;
}
// -----------------------------------------------------------------------