aboutsummaryrefslogtreecommitdiffstats
path: root/icetime
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2016-05-16 11:47:33 +0200
committerClifford Wolf <clifford@clifford.at>2016-05-16 11:47:33 +0200
commita9ca5ef54365e9fa9fa853aa5cae8450f4b75d54 (patch)
treeeeb89562871cb705f5f02f05694443dfb3f47b51 /icetime
parenta2f635f3f150398c6379a59d1e3d537c318226d6 (diff)
downloadicestorm-a9ca5ef54365e9fa9fa853aa5cae8450f4b75d54.tar.gz
icestorm-a9ca5ef54365e9fa9fa853aa5cae8450f4b75d54.tar.bz2
icestorm-a9ca5ef54365e9fa9fa853aa5cae8450f4b75d54.zip
icetime: only include "net" in json output if different from hwnet
Diffstat (limited to 'icetime')
-rw-r--r--icetime/icetime.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/icetime/icetime.cc b/icetime/icetime.cc
index 26d58cc..b702a31 100644
--- a/icetime/icetime.cc
+++ b/icetime/icetime.cc
@@ -832,8 +832,9 @@ struct TimingAnalysis
rpt_lines.push_back(stringf(" %s (%s) %s [setup]: %.3f ns", std::get<1>(user).c_str(),
netlist_cell_types.at(std::get<1>(user)).c_str(), std::get<2>(user).c_str(), std::get<0>(user)));
- json_lines.push_back(stringf(" { net: \"%s\", hwnet: \"%s\", cell: \"%s\", cell_type: \"%s\", cell_in_port: \"%s\", cell_out_port: \"[setup]\", delay_ns: %.3f, },",
- outnetsym.c_str(), outnethw.c_str(), std::get<1>(user).c_str(), netlist_cell_types.at(std::get<1>(user)).c_str(), std::get<2>(user).c_str(), delay));
+ std::string netprop = outnetsym == outnethw ? "" : stringf("net: \"%s\", ", outnetsym.c_str());
+ json_lines.push_back(stringf(" { %shwnet: \"%s\", cell: \"%s\", cell_type: \"%s\", cell_in_port: \"%s\", cell_out_port: \"[setup]\", delay_ns: %.3f, },",
+ netprop.c_str(), outnethw.c_str(), std::get<1>(user).c_str(), netlist_cell_types.at(std::get<1>(user)).c_str(), std::get<2>(user).c_str(), delay));
}
while (1)
@@ -861,8 +862,9 @@ struct TimingAnalysis
auto &driver_cell = net_driver.at(n).first;
auto &driver_port = net_driver.at(n).second;
auto &driver_type = netlist_cell_types.at(driver_cell);
- json_lines.push_back(stringf(" { net: \"%s\", hwnet: \"%s\", cell: \"%s\", cell_type: \"%s\", cell_in_port: \"[clk]\", cell_out_port: \"%s\", delay_ns: %.3f, },",
- outnetsym.c_str(), n.c_str(), driver_cell.c_str(), driver_type.c_str(), driver_port.c_str(), calc_net_max_path_delay(n)));
+ std::string netprop = outnetsym == n ? "" : stringf("net: \"%s\", ", outnetsym.c_str());
+ json_lines.push_back(stringf(" { %shwnet: \"%s\", cell: \"%s\", cell_type: \"%s\", cell_in_port: \"[clk]\", cell_out_port: \"%s\", delay_ns: %.3f, },",
+ netprop.c_str(), n.c_str(), driver_cell.c_str(), driver_type.c_str(), driver_port.c_str(), calc_net_max_path_delay(n)));
rpt_lines.push_back(stringf(" %s (%s) [clk] -> %s: %.3f ns", driver_cell.c_str(),
driver_type.c_str(), driver_port.c_str(), calc_net_max_path_delay(n)));
break;
@@ -887,8 +889,9 @@ struct TimingAnalysis
}
}
- json_lines.push_back(stringf(" { net: \"%s\", hwnet: \"%s\", cell: \"%s\", cell_type: \"%s\", cell_in_port: \"%s\", cell_out_port: \"%s\", delay_ns: %.3f, },",
- outnetsym.c_str(), n.c_str(), std::get<1>(entry).c_str(), netlist_cell_types.at(std::get<1>(entry)).c_str(),
+ std::string netprop = outnetsym == n ? "" : stringf("net: \"%s\", ", outnetsym.c_str());
+ json_lines.push_back(stringf(" { %shwnet: \"%s\", cell: \"%s\", cell_type: \"%s\", cell_in_port: \"%s\", cell_out_port: \"%s\", delay_ns: %.3f, },",
+ netprop.c_str(), n.c_str(), std::get<1>(entry).c_str(), netlist_cell_types.at(std::get<1>(entry)).c_str(),
std::get<2>(entry).c_str(), std::get<3>(entry).c_str(), calc_net_max_path_delay(n)));
rpt_lines.push_back(stringf(" %s (%s) %s -> %s: %.3f ns", std::get<1>(entry).c_str(),