Skip to content

Commit

Permalink
Smallfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
akashlevy committed Jan 7, 2025
1 parent 0fb0208 commit 725d4d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 23 deletions.
28 changes: 13 additions & 15 deletions search/ReportPath.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@

namespace sta {

static void
hierPinsAbove(const Pin *pin,
const Network *network,
PinSeq &pins_above);

static PinSeq
hierPinsThruEdge(const Edge *edge,
const Network *network,
Expand Down Expand Up @@ -1204,22 +1209,15 @@ ReportPath::reportJson(const PathExpanded &expanded,
escapeBackslashes(network_->pathName(net)).c_str());
}

const TimingArc *prev_arc = path->prevArc(this);
const Edge *prev_edge = nullptr;
if (prev_arc)
prev_edge = path->prevEdge(prev_arc, this);
if (prev_edge) {
vector<const Pin*> hpins = hierPinsThruEdge(prev_edge, network_, graph_);
PinSeq pins_above;
hierPinsAbove(pin, network_, pins_above);
if (!pins_above.empty()) {
stringAppend(result, "%*s \"hier_pins\": [\n", indent, "");
int i = 0;
int n = hpins.size();
for (const Pin *hpin : hpins) {
if (hpin)
stringAppend(result, "%*s \"%s\"%s\n",
indent, "",
escapeBackslashes(network_->pathName(hpin)).c_str(),
(i != n - 1) ? "," : "");
i++;
for (const Pin *hpin : pins_above) {
stringAppend(result, "%*s \"%s\"%s\n",
indent, "",
escapeBackslashes(network_->pathName(hpin)).c_str(),
(hpin != pins_above.back()) ? "," : "");
}
stringAppend(result, "%*s ],\n", indent, "");
}
Expand Down
8 changes: 0 additions & 8 deletions test/report_checks_json.ok
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
"src": "synthesis/tests/counter.v:22.3-28.6",
"pin": "_1415_/CLK",
"net": "clk",
"hier_pins": [
],
"arrival": 0.000e+00,
"slew": 0.000e+00
},
Expand All @@ -34,8 +32,6 @@
"src": "synthesis/tests/counter.v:22.3-28.6",
"pin": "_1415_/Q",
"net": "mid",
"hier_pins": [
],
"arrival": 3.296e-10,
"capacitance": 1.949e-15,
"slew": 3.612e-11
Expand All @@ -46,8 +42,6 @@
"src": "synthesis/tests/counter.v:22.3-28.6",
"pin": "_1416_/D",
"net": "mid",
"hier_pins": [
],
"arrival": 3.296e-10,
"slew": 3.612e-11
}
Expand All @@ -70,8 +64,6 @@
"src": "synthesis/tests/counter.v:22.3-28.6",
"pin": "_1416_/CLK",
"net": "clk",
"hier_pins": [
],
"arrival": 0.000e+00,
"slew": 0.000e+00
}
Expand Down

0 comments on commit 725d4d1

Please sign in to comment.