diff options
author | David Shah <dave@ds0.me> | 2020-11-10 10:09:08 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2020-11-30 08:45:28 +0000 |
commit | 6457b4ca7b90c59a886ed623d321504131ebeeb6 (patch) | |
tree | de337636a3604a8345bc2f958bf3192c6ae71826 /nexus/arch.cc | |
parent | fa9194e3e2212ef265b94b1be58da7c59d9a0bbf (diff) | |
download | nextpnr-6457b4ca7b90c59a886ed623d321504131ebeeb6.tar.gz nextpnr-6457b4ca7b90c59a886ed623d321504131ebeeb6.tar.bz2 nextpnr-6457b4ca7b90c59a886ed623d321504131ebeeb6.zip |
nexus: Swap sort order to make some lookups easier
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'nexus/arch.cc')
-rw-r--r-- | nexus/arch.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nexus/arch.cc b/nexus/arch.cc index a25fc95e..78e10e16 100644 --- a/nexus/arch.cc +++ b/nexus/arch.cc @@ -731,8 +731,8 @@ bool Arch::lookup_cell_delay(int type_idx, IdString from_port, IdString to_port, const auto &ct = speed_grade->cell_types[type_idx]; int dly_idx = db_binary_search( ct.prop_delays.get(), ct.num_prop_delays, - [](const CellPropDelayPOD &pd) { return std::make_pair(pd.from_port, pd.to_port); }, - std::make_pair(from_port.index, to_port.index)); + [](const CellPropDelayPOD &pd) { return std::make_pair(pd.to_port, pd.from_port); }, + std::make_pair(to_port.index, from_port.index)); if (dly_idx == -1) return false; delay.min_delay = ct.prop_delays[dly_idx].min_delay; |