aboutsummaryrefslogtreecommitdiffstats
path: root/ice40
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2018-11-13 13:47:37 -0800
committerEddie Hung <eddieh@ece.ubc.ca>2018-11-13 13:47:37 -0800
commitc5ba77e06bc49dbf880f5f034cb900b7b7d41241 (patch)
treeb0cde51a2ec8940e60fbb35110ce4e199010d711 /ice40
parent4134bfa78e9d56593ee306e482f778e5fc04f3d0 (diff)
parentefa22e5ba9ec680c083274d4753cf1ce1de007a0 (diff)
downloadnextpnr-c5ba77e06bc49dbf880f5f034cb900b7b7d41241.tar.gz
nextpnr-c5ba77e06bc49dbf880f5f034cb900b7b7d41241.tar.bz2
nextpnr-c5ba77e06bc49dbf880f5f034cb900b7b7d41241.zip
Merge remote-tracking branch 'origin/master' into timingapi
Diffstat (limited to 'ice40')
-rw-r--r--ice40/arch.cc8
-rw-r--r--ice40/arch.h1
2 files changed, 5 insertions, 4 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc
index 2d910d6f..2a9e167b 100644
--- a/ice40/arch.cc
+++ b/ice40/arch.cc
@@ -575,11 +575,10 @@ bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay
{
const auto &driver = net_info->driver;
if (driver.port == id_COUT && sink.port == id_CIN) {
- auto driver_loc = getBelLocation(driver.cell->bel);
- auto sink_loc = getBelLocation(sink.cell->bel);
- if (driver_loc.y == sink_loc.y)
+ if (driver.cell->constr_abs_z && driver.cell->constr_z < 7)
budget = 0;
- else
+ else {
+ NPNR_ASSERT(driver.cell->constr_z == 7);
switch (args.type) {
#ifndef ICE40_HX1K_ONLY
case ArchArgs::HX8K:
@@ -600,6 +599,7 @@ bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay
default:
log_error("Unsupported iCE40 chip type.\n");
}
+ }
return true;
}
return false;
diff --git a/ice40/arch.h b/ice40/arch.h
index e9ec8130..836dc46e 100644
--- a/ice40/arch.h
+++ b/ice40/arch.h
@@ -485,6 +485,7 @@ struct Arch : BaseCtx
Loc getBelLocation(BelId bel) const
{
+ NPNR_ASSERT(bel != BelId());
Loc loc;
loc.x = chip_info->bel_data[bel.index].x;
loc.y = chip_info->bel_data[bel.index].y;