From 4fbc8d20b65952eeef64a2e4c54b9b0ddfb7de07 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 16 May 2016 15:18:25 +0200 Subject: Bugfix for when e.g. PLL LOCK drives longest path --- icetime/icetime.cc | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'icetime') diff --git a/icetime/icetime.cc b/icetime/icetime.cc index e77b1a8..2ba3158 100644 --- a/icetime/icetime.cc +++ b/icetime/icetime.cc @@ -860,19 +860,23 @@ struct TimingAnalysis net_sym.clear(); } - 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); - std::string netprop = outnetsym == n ? "" : stringf("\"net\": \"%s\", ", outnetsym.c_str()); - json_lines.push_back(stringf(" { %s\"hwnet\": \"%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))); + if (net_driver.count(n)) { + 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); + std::string netprop = outnetsym == n ? "" : stringf("\"net\": \"%s\", ", outnetsym.c_str()); + json_lines.push_back(stringf(" { %s\"hwnet\": \"%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))); + } else { + rpt_lines.push_back(stringf(" no driver model at %s", n.c_str())); + } break; } if (visited_nets.count(n)) { - rpt_lines.push_back(stringf("loop-start at %s", n.c_str())); + rpt_lines.push_back(stringf(" loop-start at %s", n.c_str())); break; } -- cgit v1.2.3