aboutsummaryrefslogtreecommitdiffstats
path: root/common/timing.cc
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2022-02-26 15:17:46 +0000
committergatecat <gatecat@ds0.me>2022-02-27 13:47:05 +0000
commit86699b42f619960bfefd4d0b479dd44a90527ea4 (patch)
tree06997246ae104b75ce472215fcee3ba37ee5c50c /common/timing.cc
parent434a9737bb459189b463c8768454ea6c0e151406 (diff)
downloadnextpnr-86699b42f619960bfefd4d0b479dd44a90527ea4.tar.gz
nextpnr-86699b42f619960bfefd4d0b479dd44a90527ea4.tar.bz2
nextpnr-86699b42f619960bfefd4d0b479dd44a90527ea4.zip
Switch to potentially-sparse net users array
This uses a new data structure for net.users that allows gaps, so removing a port from a net is no longer an O(n) operation on the number of users the net has. Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'common/timing.cc')
-rw-r--r--common/timing.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/common/timing.cc b/common/timing.cc
index f30d4fc5..834785fb 100644
--- a/common/timing.cc
+++ b/common/timing.cc
@@ -60,14 +60,6 @@ void TimingAnalyser::init_ports()
data.cell_port = CellPortKey(ci->name, port.first);
}
}
- // Cell port to net port mapping
- for (auto &net : ctx->nets) {
- NetInfo *ni = net.second.get();
- if (ni->driver.cell != nullptr)
- ports[CellPortKey(ni->driver)].net_port = NetPortKey(ni->name);
- for (size_t i = 0; i < ni->users.size(); i++)
- ports[CellPortKey(ni->users.at(i))].net_port = NetPortKey(ni->name, i);
- }
}
void TimingAnalyser::get_cell_delays()
@@ -79,7 +71,7 @@ void TimingAnalyser::get_cell_delays()
IdString name = port.first.port;
// Ignore dangling ports altogether for timing purposes
- if (pd.net_port.net == IdString())
+ if (!pi.net)
continue;
pd.cell_arcs.clear();
int clkInfoCount = 0;