Added a commandline option controlled writeout of per-net timing details
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
This commit is contained in:
parent
a9df3b425f
commit
9018782eaa
@ -179,6 +179,8 @@ po::options_description CommandHandler::getGeneralOptions()
|
|||||||
|
|
||||||
general.add_options()("report", po::value<std::string>(),
|
general.add_options()("report", po::value<std::string>(),
|
||||||
"write timing and utilization report in JSON format to file");
|
"write timing and utilization report in JSON format to file");
|
||||||
|
general.add_options()("detailed-timing-report",
|
||||||
|
"Append detailed net timing data to the JSON report");
|
||||||
|
|
||||||
general.add_options()("placed-svg", po::value<std::string>(), "write render of placement to SVG file");
|
general.add_options()("placed-svg", po::value<std::string>(), "write render of placement to SVG file");
|
||||||
general.add_options()("routed-svg", po::value<std::string>(), "write render of routing to SVG file");
|
general.add_options()("routed-svg", po::value<std::string>(), "write render of routing to SVG file");
|
||||||
@ -328,6 +330,10 @@ void CommandHandler::setupContext(Context *ctx)
|
|||||||
ctx->settings[ctx->id("placerHeap/criticalityExponent")] = std::to_string(2);
|
ctx->settings[ctx->id("placerHeap/criticalityExponent")] = std::to_string(2);
|
||||||
if (ctx->settings.find(ctx->id("placerHeap/timingWeight")) == ctx->settings.end())
|
if (ctx->settings.find(ctx->id("placerHeap/timingWeight")) == ctx->settings.end())
|
||||||
ctx->settings[ctx->id("placerHeap/timingWeight")] = std::to_string(10);
|
ctx->settings[ctx->id("placerHeap/timingWeight")] = std::to_string(10);
|
||||||
|
|
||||||
|
if (vm.count("detailed-timing-report")) {
|
||||||
|
ctx->detailed_timing_report = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int CommandHandler::executeMain(std::unique_ptr<Context> ctx)
|
int CommandHandler::executeMain(std::unique_ptr<Context> ctx)
|
||||||
|
@ -36,6 +36,8 @@ struct Context : Arch, DeterministicRNG
|
|||||||
|
|
||||||
// Should we disable printing of the location of nets in the critical path?
|
// Should we disable printing of the location of nets in the critical path?
|
||||||
bool disable_critical_path_source_print = false;
|
bool disable_critical_path_source_print = false;
|
||||||
|
// True when detailed per-net timing is to be stored / reported
|
||||||
|
bool detailed_timing_report = false;
|
||||||
|
|
||||||
ArchArgs arch_args;
|
ArchArgs arch_args;
|
||||||
|
|
||||||
|
@ -250,14 +250,18 @@ void Context::writeReport(std::ostream &out) const
|
|||||||
{"constraint", kv.second.constraint},
|
{"constraint", kv.second.constraint},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
out << Json(Json::object{
|
|
||||||
{"utilization", util_json},
|
Json::object jsonRoot{
|
||||||
{"fmax", fmax_json},
|
{"utilization", util_json},
|
||||||
{"critical_paths", report_critical_paths(this)},
|
{"fmax", fmax_json},
|
||||||
{"detailed_net_timings", report_detailed_net_timings(this)}
|
{"critical_paths", report_critical_paths(this)}
|
||||||
})
|
};
|
||||||
.dump()
|
|
||||||
<< std::endl;
|
if (detailed_timing_report) {
|
||||||
|
jsonRoot["detailed_net_timings"] = report_detailed_net_timings(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
out << Json(jsonRoot).dump() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
NEXTPNR_NAMESPACE_END
|
NEXTPNR_NAMESPACE_END
|
||||||
|
@ -1216,7 +1216,8 @@ void timing_analysis(Context *ctx, bool print_histogram, bool print_fmax, bool p
|
|||||||
DetailedNetTimings detailed_net_timings;
|
DetailedNetTimings detailed_net_timings;
|
||||||
|
|
||||||
Timing timing(ctx, true /* net_delays */, false /* update */, (print_path || print_fmax) ? &crit_paths : nullptr,
|
Timing timing(ctx, true /* net_delays */, false /* update */, (print_path || print_fmax) ? &crit_paths : nullptr,
|
||||||
print_histogram ? &slack_histogram : nullptr, update_results ? &detailed_net_timings : nullptr);
|
print_histogram ? &slack_histogram : nullptr,
|
||||||
|
(update_results && ctx->detailed_timing_report) ? &detailed_net_timings : nullptr);
|
||||||
timing.walk_paths();
|
timing.walk_paths();
|
||||||
|
|
||||||
bool report_critical_paths = print_path || print_fmax || update_results;
|
bool report_critical_paths = print_path || print_fmax || update_results;
|
||||||
|
Loading…
Reference in New Issue
Block a user