diff options
author | David Shah <dave@ds0.me> | 2019-10-25 09:37:13 +0100 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-10-25 09:37:13 +0100 |
commit | 36c07a0f45b13e4cf34e6db3b73ccf864af522f0 (patch) | |
tree | 45733cdbac1f0045cea5f57a44e4ed8229a8d7d7 /ecp5/arch_place.cc | |
parent | b582ba810cc54282d4c574bee80a7339c8da17f9 (diff) | |
download | nextpnr-36c07a0f45b13e4cf34e6db3b73ccf864af522f0.tar.gz nextpnr-36c07a0f45b13e4cf34e6db3b73ccf864af522f0.tar.bz2 nextpnr-36c07a0f45b13e4cf34e6db3b73ccf864af522f0.zip |
ecp5: Fix routing to shared DSP control inputs
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ecp5/arch_place.cc')
-rw-r--r-- | ecp5/arch_place.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ecp5/arch_place.cc b/ecp5/arch_place.cc index d5c345af..6057605b 100644 --- a/ecp5/arch_place.cc +++ b/ecp5/arch_place.cc @@ -196,4 +196,28 @@ void Arch::permute_luts() } } +void Arch::setupWireLocations() +{ + wire_loc_overrides.clear(); + for (auto cell : sorted(cells)) { + CellInfo *ci = cell.second; + if (ci->bel == BelId()) + continue; + if (ci->type == id_MULT18X18D || ci->type == id_DCUA) { + for (auto &port : ci->ports) { + if (port.second.type != PORT_IN || 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; + } + } + } + } +} + NEXTPNR_NAMESPACE_END |