aboutsummaryrefslogtreecommitdiffstats
path: root/common/report.cc
diff options
context:
space:
mode:
authorMaciej Kurc <mkurc@antmicro.com>2021-09-28 17:38:12 +0200
committerMaciej Kurc <mkurc@antmicro.com>2021-09-28 17:42:51 +0200
commit9018782eaaec23c57987266629b23484cfd9b984 (patch)
treed78fc4225f2cd4f0a5611720347ee757e769dc7e /common/report.cc
parenta9df3b425fb8a2e6b9054a0abbf033942eabc602 (diff)
downloadnextpnr-9018782eaaec23c57987266629b23484cfd9b984.tar.gz
nextpnr-9018782eaaec23c57987266629b23484cfd9b984.tar.bz2
nextpnr-9018782eaaec23c57987266629b23484cfd9b984.zip
Added a commandline option controlled writeout of per-net timing details
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Diffstat (limited to 'common/report.cc')
-rw-r--r--common/report.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/common/report.cc b/common/report.cc
index 5330583e..f2926c86 100644
--- a/common/report.cc
+++ b/common/report.cc
@@ -250,14 +250,18 @@ void Context::writeReport(std::ostream &out) const
{"constraint", kv.second.constraint},
};
}
- out << Json(Json::object{
- {"utilization", util_json},
- {"fmax", fmax_json},
- {"critical_paths", report_critical_paths(this)},
- {"detailed_net_timings", report_detailed_net_timings(this)}
- })
- .dump()
- << std::endl;
+
+ Json::object jsonRoot{
+ {"utilization", util_json},
+ {"fmax", fmax_json},
+ {"critical_paths", report_critical_paths(this)}
+ };
+
+ if (detailed_timing_report) {
+ jsonRoot["detailed_net_timings"] = report_detailed_net_timings(this);
+ }
+
+ out << Json(jsonRoot).dump() << std::endl;
}
NEXTPNR_NAMESPACE_END