timing: Integration tweaks
Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
98d1c5a411
commit
8a4bf3a780
@ -241,6 +241,7 @@ class SAPlacer
|
|||||||
auto saplace_start = std::chrono::high_resolution_clock::now();
|
auto saplace_start = std::chrono::high_resolution_clock::now();
|
||||||
|
|
||||||
// Invoke timing analysis to obtain criticalities
|
// Invoke timing analysis to obtain criticalities
|
||||||
|
tmg.setup_only = true;
|
||||||
if (!cfg.budgetBased)
|
if (!cfg.budgetBased)
|
||||||
tmg.setup();
|
tmg.setup();
|
||||||
|
|
||||||
|
@ -143,6 +143,7 @@ class HeAPPlacer
|
|||||||
: ctx(ctx), cfg(cfg), fast_bels(ctx, /*check_bel_available=*/true, -1), tmg(ctx)
|
: ctx(ctx), cfg(cfg), fast_bels(ctx, /*check_bel_available=*/true, -1), tmg(ctx)
|
||||||
{
|
{
|
||||||
Eigen::initParallel();
|
Eigen::initParallel();
|
||||||
|
tmg.setup_only = true;
|
||||||
tmg.setup();
|
tmg.setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ void TimingAnalyser::topo_sort()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool no_loops = topo.sort();
|
bool no_loops = topo.sort();
|
||||||
if (!no_loops) {
|
if (!no_loops && verbose_mode) {
|
||||||
log_info("Found %d combinational loops:\n", int(topo.loops.size()));
|
log_info("Found %d combinational loops:\n", int(topo.loops.size()));
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (auto &loop : topo.loops) {
|
for (auto &loop : topo.loops) {
|
||||||
@ -463,10 +463,12 @@ void TimingAnalyser::compute_criticality()
|
|||||||
auto &pd = ports.at(p);
|
auto &pd = ports.at(p);
|
||||||
for (auto &pdp : pd.domain_pairs) {
|
for (auto &pdp : pd.domain_pairs) {
|
||||||
auto &dp = domain_pairs.at(pdp.first);
|
auto &dp = domain_pairs.at(pdp.first);
|
||||||
pdp.second.criticality =
|
float crit =
|
||||||
1.0f - (float(pdp.second.setup_slack) - float(dp.worst_setup_slack)) / float(-dp.worst_setup_slack);
|
1.0f - (float(pdp.second.setup_slack) - float(dp.worst_setup_slack)) / float(-dp.worst_setup_slack);
|
||||||
NPNR_ASSERT(pdp.second.criticality >= -0.00001f && pdp.second.criticality <= 1.00001f);
|
crit = std::min(crit, 1.0f);
|
||||||
pd.worst_crit = std::max(pd.worst_crit, pdp.second.criticality);
|
crit = std::max(crit, 0.0f);
|
||||||
|
pdp.second.criticality = crit;
|
||||||
|
pd.worst_crit = std::max(pd.worst_crit, crit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,6 +141,7 @@ struct TimingAnalyser
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool setup_only = false;
|
bool setup_only = false;
|
||||||
|
bool verbose_mode = false;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void init_ports();
|
void init_ports();
|
||||||
|
Loading…
Reference in New Issue
Block a user