aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/arch_place.cc
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-03-04 11:29:11 +0000
committergatecat <gatecat@ds0.me>2021-03-04 11:29:11 +0000
commit1ff2023f32320ffe8bf588d96a2cb8427ccbc618 (patch)
treefde50233b3056a44a1c340434f05565a93c7a75e /ecp5/arch_place.cc
parent5f6aaa2475774af2b0bd70f0bc013c975bcfe844 (diff)
downloadnextpnr-1ff2023f32320ffe8bf588d96a2cb8427ccbc618.tar.gz
nextpnr-1ff2023f32320ffe8bf588d96a2cb8427ccbc618.tar.bz2
nextpnr-1ff2023f32320ffe8bf588d96a2cb8427ccbc618.zip
timing: Replace all users of criticality with new engine
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'ecp5/arch_place.cc')
-rw-r--r--ecp5/arch_place.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/ecp5/arch_place.cc b/ecp5/arch_place.cc
index 5565a01c..57c3b181 100644
--- a/ecp5/arch_place.cc
+++ b/ecp5/arch_place.cc
@@ -95,8 +95,8 @@ bool Arch::isBelLocationValid(BelId bel) const
void Arch::permute_luts()
{
- NetCriticalityMap nc;
- get_criticalities(getCtx(), &nc);
+ TimingAnalyser tmg(getCtx());
+ tmg.setup();
std::unordered_map<PortInfo *, size_t> port_to_user;
for (auto net : sorted(nets)) {
@@ -121,13 +121,7 @@ void Arch::permute_luts()
ci->ports[port_names.at(i)].type = PORT_IN;
}
auto &port = ci->ports.at(port_names.at(i));
- float crit = 0;
- if (port.net != nullptr && nc.count(port.net->name)) {
- auto &n = nc.at(port.net->name);
- size_t usr = port_to_user.at(&port);
- if (usr < n.criticality.size())
- crit = n.criticality.at(usr);
- }
+ float crit = (port.net == nullptr) ? 0 : tmg.get_criticality(CellPortKey(ci->name, port_names.at(i)));
orig_nets.push_back(port.net);
inputs.emplace_back(crit, i);
}