aboutsummaryrefslogtreecommitdiffstats
path: root/mistral/delay.cc
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-12-19 18:46:10 +0000
committerGitHub <noreply@github.com>2021-12-19 18:46:10 +0000
commit62a3e093856063180526b7189d5e711a98036fa0 (patch)
treed03ba5688367cb476a06b19d04ca78d0352afce3 /mistral/delay.cc
parent56d550733346000584b9490fac0953fe07124035 (diff)
parentddb084e9a8a0cba10536951236cde824526e8071 (diff)
downloadnextpnr-62a3e093856063180526b7189d5e711a98036fa0.tar.gz
nextpnr-62a3e093856063180526b7189d5e711a98036fa0.tar.bz2
nextpnr-62a3e093856063180526b7189d5e711a98036fa0.zip
Merge pull request #883 from YosysHQ/gatecat/new-predictdelay
archapi: Use arbitrary rather than actual placement in predictDelay [breaking change]
Diffstat (limited to 'mistral/delay.cc')
-rw-r--r--mistral/delay.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/mistral/delay.cc b/mistral/delay.cc
index bfaeb065..98ef1be6 100644
--- a/mistral/delay.cc
+++ b/mistral/delay.cc
@@ -239,14 +239,12 @@ DelayQuad Arch::getPipDelay(PipId pip) const
return DelayQuad{308};
}
-delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const
+delay_t Arch::predictDelay(BelId src_bel, IdString src_pin, BelId dst_bel, IdString dst_pin) const
{
- if (net_info->driver.cell == nullptr || net_info->driver.cell->bel == BelId())
- return 100;
- if (sink.cell->bel == BelId())
- return 100;
- Loc src_loc = getBelLocation(net_info->driver.cell->bel);
- Loc dst_loc = getBelLocation(sink.cell->bel);
+ NPNR_UNUSED(src_pin);
+ NPNR_UNUSED(dst_pin);
+ Loc src_loc = getBelLocation(src_bel);
+ Loc dst_loc = getBelLocation(dst_bel);
return std::abs(dst_loc.y - src_loc.y) * 100 + std::abs(dst_loc.x - src_loc.x) * 100 + 100;
}