aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/arch_place.cc
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2020-01-16 12:00:52 +0000
committerDavid Shah <dave@ds0.me>2020-02-03 11:38:31 +0000
commit5e1aac67db4bec579ca9e8075aa32e4183d1004f (patch)
tree71b512d61187d21226df8672070e148428fbda2e /ecp5/arch_place.cc
parentf82e133c7c93b4589b2149631e6b72185148ada9 (diff)
downloadnextpnr-5e1aac67db4bec579ca9e8075aa32e4183d1004f.tar.gz
nextpnr-5e1aac67db4bec579ca9e8075aa32e4183d1004f.tar.bz2
nextpnr-5e1aac67db4bec579ca9e8075aa32e4183d1004f.zip
ecp5: Improve bounding box accuracy
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ecp5/arch_place.cc')
-rw-r--r--ecp5/arch_place.cc21
1 files changed, 15 insertions, 6 deletions
diff --git a/ecp5/arch_place.cc b/ecp5/arch_place.cc
index 6057605b..c5330694 100644
--- a/ecp5/arch_place.cc
+++ b/ecp5/arch_place.cc
@@ -203,17 +203,26 @@ void Arch::setupWireLocations()
CellInfo *ci = cell.second;
if (ci->bel == BelId())
continue;
- if (ci->type == id_MULT18X18D || ci->type == id_DCUA) {
+ if (ci->type == id_MULT18X18D || ci->type == id_DCUA || ci->type == id_DDRDLL || ci->type == id_DQSBUFM ||
+ ci->type == id_EHXPLLL) {
for (auto &port : ci->ports) {
- if (port.second.type != PORT_IN || port.second.net == nullptr)
+ if (port.second.net == nullptr)
continue;
WireId pw = getBelPinWire(ci->bel, port.first);
if (pw == WireId())
continue;
- for (auto uh : getPipsUphill(pw)) {
- WireId pip_src = getPipSrcWire(uh);
- wire_loc_overrides[pw] = std::make_pair(pip_src.location.x, pip_src.location.y);
- break;
+ if (port.second.type == PORT_OUT) {
+ for (auto dh : getPipsDownhill(pw)) {
+ WireId pip_dst = getPipDstWire(dh);
+ wire_loc_overrides[pw] = std::make_pair(pip_dst.location.x, pip_dst.location.y);
+ break;
+ }
+ } else {
+ for (auto uh : getPipsUphill(pw)) {
+ WireId pip_src = getPipSrcWire(uh);
+ wire_loc_overrides[pw] = std::make_pair(pip_src.location.x, pip_src.location.y);
+ break;
+ }
}
}
}