diff --git a/dcalc/GraphDelayCalc.cc b/dcalc/GraphDelayCalc.cc index d2bf002a..47a92522 100644 --- a/dcalc/GraphDelayCalc.cc +++ b/dcalc/GraphDelayCalc.cc @@ -321,8 +321,8 @@ GraphDelayCalc::seedDrvrSlew(Vertex *drvr_vertex, Port *port = network_->port(drvr_pin); drive = sdc_->findInputDrive(port); } - for (auto rf : RiseFall::range()) { - for (auto dcalc_ap : corners_->dcalcAnalysisPts()) { + for (const RiseFall *rf : RiseFall::range()) { + for (const DcalcAnalysisPt *dcalc_ap : corners_->dcalcAnalysisPts()) { if (drive) { const MinMax *cnst_min_max = dcalc_ap->constraintMinMax(); const LibertyCell *drvr_cell; @@ -350,8 +350,8 @@ void GraphDelayCalc::seedNoDrvrCellSlew(Vertex *drvr_vertex, const Pin *drvr_pin, const RiseFall *rf, - InputDrive *drive, - DcalcAnalysisPt *dcalc_ap, + const InputDrive *drive, + const DcalcAnalysisPt *dcalc_ap, ArcDelayCalc *arc_delay_calc) { DcalcAPIndex ap_index = dcalc_ap->index(); @@ -397,7 +397,7 @@ void GraphDelayCalc::seedNoDrvrSlew(Vertex *drvr_vertex, const Pin *drvr_pin, const RiseFall *rf, - DcalcAnalysisPt *dcalc_ap, + const DcalcAnalysisPt *dcalc_ap, ArcDelayCalc *arc_delay_calc) { const MinMax *slew_min_max = dcalc_ap->slewMinMax(); @@ -429,8 +429,8 @@ GraphDelayCalc::seedLoadSlew(Vertex *vertex) vertex->name(sdc_network_)); ClockSet *clks = sdc_->findLeafPinClocks(pin); initSlew(vertex); - for (auto rf : RiseFall::range()) { - for (auto dcalc_ap : corners_->dcalcAnalysisPts()) { + for (const RiseFall *rf : RiseFall::range()) { + for (const DcalcAnalysisPt *dcalc_ap : corners_->dcalcAnalysisPts()) { const MinMax *slew_min_max = dcalc_ap->slewMinMax(); if (!vertex->slewAnnotated(rf, slew_min_max)) { float slew = 0.0; @@ -807,11 +807,11 @@ GraphDelayCalc::initLoadSlews(Vertex *drvr_vertex) Edge *wire_edge = edge_iter.next(); if (wire_edge->isWire()) { Vertex *load_vertex = wire_edge->to(graph_); - for (auto dcalc_ap : corners_->dcalcAnalysisPts()) { + for (const DcalcAnalysisPt *dcalc_ap : corners_->dcalcAnalysisPts()) { const MinMax *slew_min_max = dcalc_ap->slewMinMax(); Slew slew_init_value(slew_min_max->initValue()); DcalcAPIndex ap_index = dcalc_ap->index(); - for (auto rf : RiseFall::range()) { + for (const RiseFall *rf : RiseFall::range()) { if (!load_vertex->slewAnnotated(rf, slew_min_max)) graph_->setSlew(load_vertex, rf, ap_index, slew_init_value); } @@ -827,7 +827,6 @@ GraphDelayCalc::findDriverDelays1(Vertex *drvr_vertex, LoadPinIndexMap &load_pin_index_map) { initSlew(drvr_vertex); - initWireDelays(drvr_vertex); bool delay_changed = false; array delay_exists = {false, false}; VertexInEdgeIterator edge_iter(drvr_vertex, graph_); @@ -842,7 +841,7 @@ GraphDelayCalc::findDriverDelays1(Vertex *drvr_vertex, arc_delay_calc, load_pin_index_map, delay_exists); } - for (auto rf : RiseFall::range()) { + for (const RiseFall *rf : RiseFall::range()) { if (!delay_exists[rf->index()]) zeroSlewAndWireDelays(drvr_vertex, rf); } @@ -856,10 +855,10 @@ GraphDelayCalc::findDriverDelays1(Vertex *drvr_vertex, void GraphDelayCalc::initRootSlews(Vertex *vertex) { - for (auto dcalc_ap : corners_->dcalcAnalysisPts()) { + for (const DcalcAnalysisPt *dcalc_ap : corners_->dcalcAnalysisPts()) { const MinMax *slew_min_max = dcalc_ap->slewMinMax(); DcalcAPIndex ap_index = dcalc_ap->index(); - for (auto rf : RiseFall::range()) { + for (const RiseFall *rf : RiseFall::range()) { if (!vertex->slewAnnotated(rf, slew_min_max)) graph_->setSlew(vertex, rf, ap_index, default_slew); } @@ -895,7 +894,7 @@ GraphDelayCalc::findDriverEdgeDelays(Vertex *drvr_vertex, Vertex *from_vertex = edge->from(graph_); const TimingArcSet *arc_set = edge->timingArcSet(); bool delay_changed = false; - for (auto dcalc_ap : corners_->dcalcAnalysisPts()) { + for (const DcalcAnalysisPt *dcalc_ap : corners_->dcalcAnalysisPts()) { for (const TimingArc *arc : arc_set->arcs()) { delay_changed |= findDriverArcDelays(drvr_vertex, multi_drvr, edge, arc, dcalc_ap, arc_delay_calc, @@ -982,7 +981,7 @@ GraphDelayCalc::makeArcDcalcArgs(Vertex *drvr_vertex, ArcDelayCalc *arc_delay_calc) { ArcDcalcArgSeq dcalc_args; - for (auto drvr_vertex1 : multi_drvr->drvrs()) { + for (Vertex *drvr_vertex1 : multi_drvr->drvrs()) { Edge *edge1 = nullptr; const TimingArc *arc1 = nullptr; if (drvr_vertex1 == drvr_vertex) { @@ -1212,7 +1211,7 @@ GraphDelayCalc::loadCap(const Pin *drvr_pin, { const MinMax *min_max = dcalc_ap->constraintMinMax(); float load_cap = min_max->initValue(); - for (auto drvr_rf : RiseFall::range()) { + for (const RiseFall *drvr_rf : RiseFall::range()) { float cap = loadCap(drvr_pin, drvr_rf, dcalc_ap); load_cap = min_max->minMax(cap, load_cap); } @@ -1359,8 +1358,8 @@ GraphDelayCalc::netCaps(const Pin *drvr_pin, void GraphDelayCalc::initSlew(Vertex *vertex) { - for (auto rf : RiseFall::range()) { - for (auto dcalc_ap : corners_->dcalcAnalysisPts()) { + for (const RiseFall *rf : RiseFall::range()) { + for (const DcalcAnalysisPt *dcalc_ap : corners_->dcalcAnalysisPts()) { const MinMax *slew_min_max = dcalc_ap->slewMinMax(); if (!vertex->slewAnnotated(rf, slew_min_max)) { DcalcAPIndex ap_index = dcalc_ap->index(); @@ -1374,7 +1373,7 @@ void GraphDelayCalc::zeroSlewAndWireDelays(Vertex *drvr_vertex, const RiseFall *rf) { - for (auto dcalc_ap : corners_->dcalcAnalysisPts()) { + for (const DcalcAnalysisPt *dcalc_ap : corners_->dcalcAnalysisPts()) { DcalcAPIndex ap_index = dcalc_ap->index(); const MinMax *slew_min_max = dcalc_ap->slewMinMax(); // Init drvr slew. @@ -1406,11 +1405,11 @@ GraphDelayCalc::initWireDelays(Vertex *drvr_vertex) while (edge_iter.hasNext()) { Edge *wire_edge = edge_iter.next(); if (wire_edge->isWire()) { - for (auto dcalc_ap : corners_->dcalcAnalysisPts()) { + for (const DcalcAnalysisPt * dcalc_ap : corners_->dcalcAnalysisPts()) { const MinMax *delay_min_max = dcalc_ap->delayMinMax(); Delay delay_init_value(delay_min_max->initValue()); DcalcAPIndex ap_index = dcalc_ap->index(); - for (auto rf : RiseFall::range()) { + for (const RiseFall *rf : RiseFall::range()) { if (!graph_->wireDelayAnnotated(wire_edge, rf, ap_index)) graph_->setWireArcDelay(wire_edge, rf, ap_index, delay_init_value); } @@ -1466,7 +1465,7 @@ GraphDelayCalc::findCheckEdgeDelays(Edge *edge, const Pin *related_out_pin = 0; if (related_out_port) related_out_pin = network_->findPin(inst, related_out_port); - for (auto dcalc_ap : corners_->dcalcAnalysisPts()) { + for (const DcalcAnalysisPt *dcalc_ap : corners_->dcalcAnalysisPts()) { DcalcAPIndex ap_index = dcalc_ap->index(); if (!graph_->arcDelayAnnotated(edge, arc, ap_index)) { const Slew &from_slew = checkEdgeClkSlew(from_vertex, from_rf, @@ -1583,7 +1582,7 @@ GraphDelayCalc::minPeriod(const Pin *pin, { exists = false; const MinMax *min_max = MinMax::max(); - for (auto dcalc_ap : corners_->dcalcAnalysisPts()) { + for (const DcalcAnalysisPt *dcalc_ap : corners_->dcalcAnalysisPts()) { // Sdf annotation. float min_period1 = 0.0; bool exists1 = false; @@ -1639,11 +1638,11 @@ MultiDrvrNet::findCaps(const Sdc *sdc) int count = RiseFall::index_count * corners->dcalcAnalysisPtCount(); net_caps_.resize(count); const Pin *drvr_pin = dcalc_drvr_->pin(); - for (auto dcalc_ap : corners->dcalcAnalysisPts()) { + for (const DcalcAnalysisPt *dcalc_ap : corners->dcalcAnalysisPts()) { DcalcAPIndex ap_index = dcalc_ap->index(); const Corner *corner = dcalc_ap->corner(); const MinMax *min_max = dcalc_ap->constraintMinMax(); - for (auto drvr_rf : RiseFall::range()) { + for (const RiseFall *drvr_rf : RiseFall::range()) { int drvr_rf_index = drvr_rf->index(); int index = ap_index * RiseFall::index_count + drvr_rf_index; NetCaps &net_caps = net_caps_[index]; diff --git a/include/sta/ExceptionPath.hh b/include/sta/ExceptionPath.hh index eb0ea5c0..cfb8e642 100644 --- a/include/sta/ExceptionPath.hh +++ b/include/sta/ExceptionPath.hh @@ -125,7 +125,7 @@ public: virtual float delay() const { return 0.0; } virtual const char *name() const { return nullptr; } virtual bool isDefault() const { return false; } - virtual bool ignoreClkLatency() { return false; } + virtual bool ignoreClkLatency() const { return false; } protected: virtual const char *typeString() const = 0; @@ -210,7 +210,7 @@ public: virtual float delay() const { return delay_; } virtual int typePriority() const; virtual bool tighterThan(ExceptionPath *exception) const; - virtual bool ignoreClkLatency() { return ignore_clk_latency_; } + virtual bool ignoreClkLatency() const { return ignore_clk_latency_; } protected: bool ignore_clk_latency_; diff --git a/include/sta/GraphDelayCalc.hh b/include/sta/GraphDelayCalc.hh index 5488b09b..96857d6c 100644 --- a/include/sta/GraphDelayCalc.hh +++ b/include/sta/GraphDelayCalc.hh @@ -144,13 +144,13 @@ protected: void seedNoDrvrSlew(Vertex *drvr_vertex, const Pin *drvr_pin, const RiseFall *rf, - DcalcAnalysisPt *dcalc_ap, + const DcalcAnalysisPt *dcalc_ap, ArcDelayCalc *arc_delay_calc); void seedNoDrvrCellSlew(Vertex *drvr_vertex, const Pin *drvr_pin, const RiseFall *rf, - InputDrive *drive, - DcalcAnalysisPt *dcalc_ap, + const InputDrive *drive, + const DcalcAnalysisPt *dcalc_ap, ArcDelayCalc *arc_delay_calc); void seedLoadSlew(Vertex *vertex); void setInputPortWireDelays(Vertex *vertex); diff --git a/include/sta/InputDrive.hh b/include/sta/InputDrive.hh index d353f690..1da22817 100644 --- a/include/sta/InputDrive.hh +++ b/include/sta/InputDrive.hh @@ -51,10 +51,10 @@ public: void driveResistance(const RiseFall *rf, const MinMax *min_max, float &res, - bool &exists); + bool &exists) const; bool hasDriveResistance(const RiseFall *rf, - const MinMax *min_max); - bool driveResistanceMinMaxEqual(const RiseFall *rf); + const MinMax *min_max) const; + bool driveResistanceMinMaxEqual(const RiseFall *rf) const; void setDriveCell(const LibertyLibrary *library, const LibertyCell *cell, const LibertyPort *from_port, @@ -68,18 +68,18 @@ public: const LibertyCell *&cell, const LibertyPort *&from_port, float *&from_slews, - const LibertyPort *&to_port); + const LibertyPort *&to_port) const; InputDriveCell *driveCell(const RiseFall *rf, - const MinMax *min_max); + const MinMax *min_max) const; bool hasDriveCell(const RiseFall *rf, - const MinMax *min_max); + const MinMax *min_max) const; // True if rise/fall/min/max drive cells are equal. - bool driveCellsEqual(); + bool driveCellsEqual() const; void slew(const RiseFall *rf, const MinMax *min_max, float &slew, - bool &exists); - RiseFallMinMax *slews() { return &slews_; } + bool &exists) const; + const RiseFallMinMax *slews() const { return &slews_; } private: RiseFallMinMax slews_; diff --git a/include/sta/PathEnd.hh b/include/sta/PathEnd.hh index f935cf09..5491aa21 100644 --- a/include/sta/PathEnd.hh +++ b/include/sta/PathEnd.hh @@ -85,8 +85,8 @@ public: const RiseFall *transition(const StaState *sta) const; PathAnalysisPt *pathAnalysisPt(const StaState *sta) const; PathAPIndex pathIndex(const StaState *sta) const; - virtual void reportShort(ReportPath *report) const = 0; - virtual void reportFull(ReportPath *report) const = 0; + virtual void reportShort(const ReportPath *report) const = 0; + virtual void reportFull(const ReportPath *report) const = 0; // Predicates for PathEnd type. // Default methods overridden by respective types. @@ -228,8 +228,8 @@ public: virtual Type type() const; virtual const char *typeName() const; virtual PathEnd *copy(); - virtual void reportShort(ReportPath *report) const; - virtual void reportFull(ReportPath *report) const; + virtual void reportShort(const ReportPath *report) const; + virtual void reportFull(const ReportPath *report) const; virtual bool isUnconstrained() const; virtual Required requiredTime(const StaState *sta) const; virtual Required requiredTimeOffset(const StaState *sta) const; @@ -327,8 +327,8 @@ public: virtual PathEnd *copy(); virtual Type type() const; virtual const char *typeName() const; - virtual void reportShort(ReportPath *report) const; - virtual void reportFull(ReportPath *report) const; + virtual void reportShort(const ReportPath *report) const; + virtual void reportFull(const ReportPath *report) const; virtual bool isCheck() const { return true; } virtual ArcDelay margin(const StaState *sta) const; virtual float macroClkTreeDelay(const StaState *sta) const; @@ -373,8 +373,8 @@ public: virtual PathEnd *copy(); PathVertex *latchDisable(); const PathVertex *latchDisable() const; - virtual void reportShort(ReportPath *report) const; - virtual void reportFull(ReportPath *report) const; + virtual void reportShort(const ReportPath *report) const; + virtual void reportFull(const ReportPath *report) const; virtual TimingRole *checkRole(const StaState *sta) const; virtual Required requiredTime(const StaState *sta) const; virtual Arrival borrow(const StaState *sta) const; @@ -432,8 +432,8 @@ public: virtual PathEnd *copy(); virtual Type type() const; virtual const char *typeName() const; - virtual void reportShort(ReportPath *report) const; - virtual void reportFull(ReportPath *report) const; + virtual void reportShort(const ReportPath *report) const; + virtual void reportFull(const ReportPath *report) const; virtual bool isOutputDelay() const { return true; } virtual ArcDelay margin(const StaState *sta) const; virtual TimingRole *checkRole(const StaState *sta) const; @@ -478,8 +478,8 @@ public: virtual PathEnd *copy(); virtual Type type() const; virtual const char *typeName() const; - virtual void reportShort(ReportPath *report) const; - virtual void reportFull(ReportPath *report) const; + virtual void reportShort(const ReportPath *report) const; + virtual void reportFull(const ReportPath *report) const; virtual bool isGatedClock() const { return true; } virtual ArcDelay margin(const StaState *) const { return margin_; } virtual TimingRole *checkRole(const StaState *sta) const; @@ -510,8 +510,8 @@ public: virtual PathEnd *copy(); virtual Type type() const; virtual const char *typeName() const; - virtual void reportShort(ReportPath *report) const; - virtual void reportFull(ReportPath *report) const; + virtual void reportShort(const ReportPath *report) const; + virtual void reportFull(const ReportPath *report) const; virtual bool isDataCheck() const { return true; } virtual const ClockEdge *targetClkEdge(const StaState *sta) const; virtual TimingRole *checkRole(const StaState *sta) const; @@ -566,8 +566,8 @@ public: virtual PathEnd *copy(); virtual Type type() const; virtual const char *typeName() const; - virtual void reportShort(ReportPath *report) const; - virtual void reportFull(ReportPath *report) const; + virtual void reportShort(const ReportPath *report) const; + virtual void reportFull(const ReportPath *report) const; virtual bool isPathDelay() const { return true; } virtual TimingRole *checkRole(const StaState *sta) const; virtual bool pathDelayMarginIsExternal() const; diff --git a/include/sta/PathExpanded.hh b/include/sta/PathExpanded.hh index 3c891bd7..1abf7ae4 100644 --- a/include/sta/PathExpanded.hh +++ b/include/sta/PathExpanded.hh @@ -49,20 +49,20 @@ public: // path(0) is the startpoint. // path(size()-1) is the endpoint. const PathRef *path(size_t index) const; - TimingArc *prevArc(size_t index); + TimingArc *prevArc(size_t index) const; // Returns the path start point. // Register/Latch Q pin // Input pin - PathRef *startPath(); - PathRef *startPrevPath(); - PathRef *endPath(); - TimingArc *startPrevArc(); + const PathRef *startPath() const; + const PathRef *startPrevPath() const; + const PathRef *endPath() const; + TimingArc *startPrevArc() const; size_t startIndex() const; - void clkPath(PathRef &clk_path); + void clkPath(PathRef &clk_path) const; void latchPaths(// Return values. - PathRef *&d_path, - PathRef *&q_path, - Edge *&d_q_edge); + const PathRef *&d_path, + const PathRef *&q_path, + Edge *&d_q_edge) const; protected: void expandGenclk(PathRef *clk_path); diff --git a/include/sta/Search.hh b/include/sta/Search.hh index bf0194dc..f39decaf 100644 --- a/include/sta/Search.hh +++ b/include/sta/Search.hh @@ -341,9 +341,9 @@ public: Arrival insertion, const PathAnalysisPt *path_ap); // Timing derated arc delay for a path analysis point. - ArcDelay deratedDelay(Vertex *from_vertex, - TimingArc *arc, - Edge *edge, + ArcDelay deratedDelay(const Vertex *from_vertex, + const TimingArc *arc, + const Edge *edge, bool is_clk, const PathAnalysisPt *path_ap); @@ -501,9 +501,9 @@ protected: void findArrivalsSeed(); void seedFilterStarts(); bool hasEnabledChecks(Vertex *vertex) const; - virtual float timingDerate(Vertex *from_vertex, - TimingArc *arc, - Edge *edge, + virtual float timingDerate(const Vertex *from_vertex, + const TimingArc *arc, + const Edge *edge, bool is_clk, const PathAnalysisPt *path_ap); void deletePaths(); diff --git a/include/sta/Sta.hh b/include/sta/Sta.hh index ba6f5686..48df74b8 100644 --- a/include/sta/Sta.hh +++ b/include/sta/Sta.hh @@ -922,7 +922,7 @@ public: void reportPathEnd(PathEnd *end); void reportPathEnds(PathEndSeq *ends); ReportPath *reportPath() { return report_path_; } - void reportPath(Path *path); + void reportPath(const Path *path); // Report clk skews for clks. void reportClkSkew(ConstClockSeq &clks, diff --git a/sdc/InputDrive.cc b/sdc/InputDrive.cc index 35ae01a3..845bb5cf 100644 --- a/sdc/InputDrive.cc +++ b/sdc/InputDrive.cc @@ -64,19 +64,20 @@ void InputDrive::driveResistance(const RiseFall *rf, const MinMax *min_max, float &res, - bool &exists) + bool &exists) const { drive_resistances_.value(rf, min_max, res, exists); } bool -InputDrive::hasDriveResistance(const RiseFall *rf, const MinMax *min_max) +InputDrive::hasDriveResistance(const RiseFall *rf, + const MinMax *min_max) const { return drive_resistances_.hasValue(rf, min_max); } bool -InputDrive::driveResistanceMinMaxEqual(const RiseFall *rf) +InputDrive::driveResistanceMinMaxEqual(const RiseFall *rf) const { float min_res, max_res; bool min_exists, max_exists; @@ -120,7 +121,7 @@ InputDrive::driveCell(const RiseFall *rf, const LibertyCell *&cell, const LibertyPort *&from_port, float *&from_slews, - const LibertyPort *&to_port) + const LibertyPort *&to_port) const { InputDriveCell *drive = drive_cells_[rf->index()][min_max->index()]; if (drive) { @@ -139,20 +140,20 @@ InputDrive::driveCell(const RiseFall *rf, InputDriveCell * InputDrive::driveCell(const RiseFall *rf, - const MinMax *min_max) + const MinMax *min_max) const { return drive_cells_[rf->index()][min_max->index()]; } bool InputDrive::hasDriveCell(const RiseFall *rf, - const MinMax *min_max) + const MinMax *min_max) const { return drive_cells_[rf->index()][min_max->index()] != nullptr; } bool -InputDrive::driveCellsEqual() +InputDrive::driveCellsEqual() const { int rise_index = RiseFall::riseIndex(); int fall_index = RiseFall::fallIndex(); @@ -171,7 +172,7 @@ void InputDrive::slew(const RiseFall *rf, const MinMax *min_max, float &slew, - bool &exists) + bool &exists) const { slews_.value(rf, min_max, slew, exists); } diff --git a/sdc/WriteSdc.cc b/sdc/WriteSdc.cc index 183d2c17..5f985cee 100644 --- a/sdc/WriteSdc.cc +++ b/sdc/WriteSdc.cc @@ -1716,7 +1716,7 @@ WriteSdc::writeInputTransitions() const Port *port = port_iter->next(); InputDrive *drive = sdc_->findInputDrive(port); if (drive) { - RiseFallMinMax *slews = drive->slews(); + const RiseFallMinMax *slews = drive->slews(); WriteGetPort write_port(port, this); writeRiseFallMinMaxTimeCmd("set_input_transition", slews, write_port); } diff --git a/search/CheckMaxSkews.hh b/search/CheckMaxSkews.hh index e5b070eb..3fd937f5 100644 --- a/search/CheckMaxSkews.hh +++ b/search/CheckMaxSkews.hh @@ -61,9 +61,9 @@ public: PathVertex *ref_path, TimingArc *check_arc, Edge *check_edge); - PathVertex *clkPath() { return &clk_path_; } + const PathVertex *clkPath() const { return &clk_path_; } Pin *clkPin(const StaState *sta) const; - PathVertex *refPath() { return &ref_path_; } + const PathVertex *refPath() const { return &ref_path_; } Pin *refPin(const StaState *sta) const; Delay skew(const StaState *sta) const; ArcDelay maxSkew(const StaState *sta) const; diff --git a/search/Latches.cc b/search/Latches.cc index 2532165c..947243ac 100644 --- a/search/Latches.cc +++ b/search/Latches.cc @@ -51,15 +51,15 @@ void Latches::latchRequired(const Path *data_path, const PathVertex *enable_path, const PathVertex *disable_path, - MultiCyclePath *mcp, - PathDelay *path_delay, + const MultiCyclePath *mcp, + const PathDelay *path_delay, Arrival src_clk_latency, const ArcDelay &margin, // Return values. Required &required, Arrival &borrow, Arrival &adjusted_data_arrival, - Delay &time_given_to_startpoint) + Delay &time_given_to_startpoint) const { const Arrival data_arrival = data_path->arrival(this); float max_delay = 0.0; @@ -161,7 +161,7 @@ Latches::latchBorrowInfo(const Path *data_path, Crpr &open_crpr, Crpr &crpr_diff, Delay &max_borrow, - bool &borrow_limit_exists) + bool &borrow_limit_exists) const { if (data_path && enable_path && disable_path) { const ClockEdge *data_clk_edge = data_path->clkEdge(this); @@ -220,7 +220,7 @@ Latches::latchRequired(const Path *data_path, Required &required, Arrival &borrow, Arrival &adjusted_data_arrival, - Delay &time_given_to_startpoint) + Delay &time_given_to_startpoint) const { Vertex *data_vertex = data_path->vertex(this); const RiseFall *data_rf = data_path->transition(this); @@ -244,10 +244,10 @@ Latches::latchRequired(const Path *data_path, // Find the latch enable open/close path from the close/open path. void -Latches::latchEnableOtherPath(Path *path, - const PathAnalysisPt *tgt_clk_path_ap, - // Return value. - PathVertex &other_path) +Latches::latchEnableOtherPath(const Path *path, + const PathAnalysisPt *tgt_clk_path_ap, + // Return value. + PathVertex &other_path) const { Vertex *vertex = path->vertex(this); const ClockEdge *clk_edge = path->clkEdge(this); @@ -266,8 +266,8 @@ Latches::latchEnableOtherPath(Path *path, } void -Latches::latchEnablePath(Path *q_path, - Edge *d_q_edge, +Latches::latchEnablePath(const Path *q_path, + const Edge *d_q_edge, // Return value. PathVertex &enable_path) const @@ -299,9 +299,9 @@ Latches::latchEnablePath(Path *q_path, // times of the enable. The to_tag for Q is adjusted to the that of // the enable open edge. void -Latches::latchOutArrival(Path *data_path, - TimingArc *d_q_arc, - Edge *d_q_edge, +Latches::latchOutArrival(const Path *data_path, + const TimingArc *d_q_arc, + const Edge *d_q_edge, const PathAnalysisPt *path_ap, // Return values. Tag *&q_tag, @@ -398,7 +398,7 @@ Latches::latchOutArrival(Path *data_path, } ExceptionPath * -Latches::exceptionTo(Path *data_path, +Latches::exceptionTo(const Path *data_path, const ClockEdge *en_clk_edge) { // Look for exceptions -to data or -to enable clk. @@ -415,7 +415,7 @@ ArcDelay Latches::latchSetupMargin(Vertex *data_vertex, const RiseFall *data_rf, const Path *disable_path, - const PathAnalysisPt *path_ap) + const PathAnalysisPt *path_ap) const { if (disable_path) { Vertex *enable_vertex = disable_path->vertex(this); @@ -443,12 +443,12 @@ Latches::latchSetupMargin(Vertex *data_vertex, } void -Latches::latchTimeGivenToStartpoint(Path *d_path, - Path *q_path, - Edge *d_q_edge, +Latches::latchTimeGivenToStartpoint(const Path *d_path, + const Path *q_path, + const Edge *d_q_edge, // Return values. Arrival &time_given, - PathVertex &enable_path) + PathVertex &enable_path) const { latchEnablePath(q_path, d_q_edge, enable_path); if (!enable_path.isNull() @@ -470,7 +470,7 @@ Latches::latchTimeGivenToStartpoint(Path *d_path, } void -Latches::latchDtoQEnable(Edge *d_q_edge, +Latches::latchDtoQEnable(const Edge *d_q_edge, const Instance *inst, // Return values. Vertex *&enable_vertex, diff --git a/search/Latches.hh b/search/Latches.hh index 6f4941cf..4f14fc2d 100644 --- a/search/Latches.hh +++ b/search/Latches.hh @@ -38,24 +38,24 @@ class Latches : public StaState { public: Latches(StaState *sta); - void latchTimeGivenToStartpoint(Path *d_path, - Path *q_path, - Edge *d_q_edge, + void latchTimeGivenToStartpoint(const Path *d_path, + const Path *q_path, + const Edge *d_q_edge, // Return values. Arrival &time_given, - PathVertex &enable_path); + PathVertex &enable_path) const; void latchRequired(const Path *data_path, const PathVertex *enable_path, const PathVertex *disable_path, - MultiCyclePath *mcp, - PathDelay *path_delay, + const MultiCyclePath *mcp, + const PathDelay *path_delay, Arrival src_clk_latency, const ArcDelay &margin, // Return values. Required &required, Delay &borrow, Arrival &adjusted_data_arrival, - Delay &time_given_to_startpoint); + Delay &time_given_to_startpoint) const; void latchRequired(const Path *data_path, const PathVertex *enable_path, const PathVertex *disable_path, @@ -64,7 +64,7 @@ public: Required &required, Delay &borrow, Arrival &adjusted_data_arrival, - Delay &time_given_to_startpoint); + Delay &time_given_to_startpoint) const; void latchBorrowInfo(const Path *data_path, const PathVertex *enable_path, const PathVertex *disable_path, @@ -78,26 +78,27 @@ public: Crpr &open_crpr, Crpr &crpr_diff, Delay &max_borrow, - bool &borrow_limit_exists); + bool &borrow_limit_exists) const; bool isLatchDtoQ(Edge *edge) const; // Find the latch EN->Q edge for a D->Q edge. - void latchDtoQEnable(Edge *d_q_edge, + void latchDtoQEnable(const Edge *d_q_edge, const Instance *inst, // Return values. Vertex *&enable_vertex, const RiseFall *&enable_rf, LatchEnableState &state) const; LatchEnableState latchDtoQState(Edge *d_q_edge) const; - void latchEnableOtherPath(Path *path, + void latchEnableOtherPath(const Path *path, const PathAnalysisPt *tgt_clk_path_ap, // Return value. - PathVertex &other_path); - void latchEnablePath(Path *q_path, Edge *d_q_edge, + PathVertex &other_path) const; + void latchEnablePath(const Path *q_path, + const Edge *d_q_edge, // Return value. PathVertex &enable_path) const; - void latchOutArrival(Path *data_path, - TimingArc *d_q_arc, - Edge *d_q_edge, + void latchOutArrival(const Path *data_path, + const TimingArc *d_q_arc, + const Edge *d_q_edge, const PathAnalysisPt *path_ap, Tag *&q_tag, ArcDelay &arc_delay, @@ -107,8 +108,8 @@ protected: ArcDelay latchSetupMargin(Vertex *data_vertex, const RiseFall *data_rf, const Path *disable_path, - const PathAnalysisPt *path_ap); - ExceptionPath *exceptionTo(Path *data_path, + const PathAnalysisPt *path_ap) const; + ExceptionPath *exceptionTo(const Path *data_path, const ClockEdge *en_clk_edge); }; diff --git a/search/PathEnd.cc b/search/PathEnd.cc index 5157fc7b..9bca45d6 100644 --- a/search/PathEnd.cc +++ b/search/PathEnd.cc @@ -428,7 +428,7 @@ PathEnd::checkInterClkUncertainty(const ClockEdge *src_clk_edge, //////////////////////////////////////////////////////////////// void -PathEndUnconstrained::reportFull(ReportPath *report) const +PathEndUnconstrained::reportFull(const ReportPath *report) const { report->reportFull(this); } @@ -440,7 +440,7 @@ PathEndUnconstrained::slackNoCrpr(const StaState *) const } void -PathEndUnconstrained::reportShort(ReportPath *report) const +PathEndUnconstrained::reportShort(const ReportPath *report) const { report->reportShort(this); } @@ -979,13 +979,13 @@ PathEndCheck::typeName() const } void -PathEndCheck::reportFull(ReportPath *report) const +PathEndCheck::reportFull(const ReportPath *report) const { report->reportFull(this); } void -PathEndCheck::reportShort(ReportPath *report) const +PathEndCheck::reportShort(const ReportPath *report) const { report->reportShort(this); } @@ -1170,13 +1170,13 @@ PathEndLatchCheck::latchDisable() const } void -PathEndLatchCheck::reportFull(ReportPath *report) const +PathEndLatchCheck::reportFull(const ReportPath *report) const { report->reportFull(this); } void -PathEndLatchCheck::reportShort(ReportPath *report) const +PathEndLatchCheck::reportShort(const ReportPath *report) const { report->reportShort(this); } @@ -1359,13 +1359,13 @@ PathEndOutputDelay::typeName() const } void -PathEndOutputDelay::reportFull(ReportPath *report) const +PathEndOutputDelay::reportFull(const ReportPath *report) const { report->reportFull(this); } void -PathEndOutputDelay::reportShort(ReportPath *report) const +PathEndOutputDelay::reportShort(const ReportPath *report) const { report->reportShort(this); } @@ -1571,13 +1571,13 @@ PathEndGatedClock::checkRole(const StaState *) const } void -PathEndGatedClock::reportFull(ReportPath *report) const +PathEndGatedClock::reportFull(const ReportPath *report) const { report->reportFull(this); } void -PathEndGatedClock::reportShort(ReportPath *report) const +PathEndGatedClock::reportShort(const ReportPath *report) const { report->reportShort(this); } @@ -1734,13 +1734,13 @@ PathEndDataCheck::checkRole(const StaState *sta) const } void -PathEndDataCheck::reportFull(ReportPath *report) const +PathEndDataCheck::reportFull(const ReportPath *report) const { report->reportFull(this); } void -PathEndDataCheck::reportShort(ReportPath *report) const +PathEndDataCheck::reportShort(const ReportPath *report) const { report->reportShort(this); } @@ -1858,13 +1858,13 @@ PathEndPathDelay::findSrcClkArrival(const StaState *sta) } void -PathEndPathDelay::reportFull(ReportPath *report) const +PathEndPathDelay::reportFull(const ReportPath *report) const { report->reportFull(this); } void -PathEndPathDelay::reportShort(ReportPath *report) const +PathEndPathDelay::reportShort(const ReportPath *report) const { report->reportShort(this); } diff --git a/search/PathExpanded.cc b/search/PathExpanded.cc index d3288966..6eb2c578 100644 --- a/search/PathExpanded.cc +++ b/search/PathExpanded.cc @@ -164,31 +164,31 @@ PathExpanded::path(size_t index) const } TimingArc * -PathExpanded::prevArc(size_t index) +PathExpanded::prevArc(size_t index) const { return prev_arcs_[pathsIndex(index)]; } -PathRef * -PathExpanded::startPath() +const PathRef * +PathExpanded::startPath() const { return &paths_[start_index_]; } -PathRef * -PathExpanded::endPath() +const PathRef * +PathExpanded::endPath() const { return &paths_[0]; } TimingArc * -PathExpanded::startPrevArc() +PathExpanded::startPrevArc() const { return prev_arcs_[start_index_]; } -PathRef * -PathExpanded::startPrevPath() +const PathRef * +PathExpanded::startPrevPath() const { size_t start1 = start_index_ + 1; if (start1 < paths_.size()) @@ -198,11 +198,11 @@ PathExpanded::startPrevPath() } void -PathExpanded::clkPath(PathRef &clk_path) +PathExpanded::clkPath(PathRef &clk_path) const { const Latches *latches = sta_->latches(); - PathRef *start = startPath(); - TimingArc *prev_arc = startPrevArc(); + const PathRef *start = startPath(); + const TimingArc *prev_arc = startPrevArc(); if (start && prev_arc) { TimingRole *role = prev_arc->role(); if (role == TimingRole::latchDtoQ()) { @@ -215,7 +215,7 @@ PathExpanded::clkPath(PathRef &clk_path) } else if (role == TimingRole::regClkToQ() || role == TimingRole::latchEnToQ()) { - PathRef *start_prev = startPrevPath(); + const PathRef *start_prev = startPrevPath(); if (start_prev) clk_path.init(start_prev); } @@ -226,15 +226,15 @@ PathExpanded::clkPath(PathRef &clk_path) void PathExpanded::latchPaths(// Return values. - PathRef *&d_path, - PathRef *&q_path, - Edge *&d_q_edge) + const PathRef *&d_path, + const PathRef *&q_path, + Edge *&d_q_edge) const { d_path = nullptr; q_path = nullptr; d_q_edge = nullptr; - PathRef *start = startPath(); - TimingArc *prev_arc = startPrevArc(); + const PathRef *start = startPath(); + const TimingArc *prev_arc = startPrevArc(); if (start && prev_arc && prev_arc->role() == TimingRole::latchDtoQ()) { diff --git a/search/ReportPath.cc b/search/ReportPath.cc index 687ec230..401301c5 100644 --- a/search/ReportPath.cc +++ b/search/ReportPath.cc @@ -200,11 +200,9 @@ ReportPath::makeField(const char *name, } ReportField * -ReportPath::findField(const char *name) +ReportPath::findField(const char *name) const { - ReportFieldSeq::Iterator field_iter(fields_); - while (field_iter.hasNext()) { - ReportField *field = field_iter.next(); + for (ReportField *field : fields_) { if (stringEq(name, field->name())) return field; } @@ -222,9 +220,7 @@ ReportPath::setReportFieldOrder(StringSeq *field_names) } ReportFieldSeq next_fields; - StringSeq::Iterator name_iter(field_names); - while (name_iter.hasNext()) { - const char *field_name = name_iter.next(); + for (const char *field_name : *field_names) { ReportField *field = findField(field_name); if (field) { next_fields.push_back(field); @@ -232,19 +228,14 @@ ReportPath::setReportFieldOrder(StringSeq *field_names) } } // Push remaining disabled fields on the end. - ReportFieldSeq::Iterator field_iter2(fields_); - while (field_iter2.hasNext()) { - ReportField *field = field_iter2.next(); + for (ReportField *field : fields_) { if (!field->enabled()) next_fields.push_back(field); } fields_.clear(); - ReportFieldSeq::Iterator field_iter3(next_fields); - while (field_iter3.hasNext()) { - ReportField *field = field_iter3.next(); + for (ReportField *field : next_fields) fields_.push_back(field); - } } void @@ -300,15 +291,15 @@ ReportPath::setReportSigmas(bool report) //////////////////////////////////////////////////////////////// void -ReportPath::reportPathEnd(PathEnd *end) +ReportPath::reportPathEnd(const PathEnd *end) const { reportPathEnd(end, nullptr, true); } void -ReportPath::reportPathEnd(PathEnd *end, - PathEnd *prev_end, - bool last) +ReportPath::reportPathEnd(const PathEnd *end, + const PathEnd *prev_end, + bool last) const { switch (format_) { case ReportPathFormat::full: @@ -340,12 +331,12 @@ ReportPath::reportPathEnd(PathEnd *end, } void -ReportPath::reportPathEnds(PathEndSeq *ends) +ReportPath::reportPathEnds(const PathEndSeq *ends) const { reportPathEndHeader(); if (ends && !ends->empty()) { - PathEndSeq::Iterator end_iter(ends); PathEnd *prev_end = nullptr; + PathEndSeq::ConstIterator end_iter(ends); while (end_iter.hasNext()) { PathEnd *end = end_iter.next(); reportPathEnd(end, prev_end, !end_iter.hasNext()); @@ -360,7 +351,7 @@ ReportPath::reportPathEnds(PathEndSeq *ends) } void -ReportPath::reportPathEndHeader() +ReportPath::reportPathEndHeader() const { switch (format_) { case ReportPathFormat::full: @@ -382,7 +373,7 @@ ReportPath::reportPathEndHeader() } void -ReportPath::reportPathEndFooter() +ReportPath::reportPathEndFooter() const { string header; switch (format_) { @@ -403,8 +394,8 @@ ReportPath::reportPathEndFooter() } void -ReportPath::reportEndpointHeader(PathEnd *end, - PathEnd *prev_end) +ReportPath::reportEndpointHeader(const PathEnd *end, + const PathEnd *prev_end) const { PathGroup *prev_group = nullptr; if (prev_end) @@ -427,7 +418,7 @@ ReportPath::reportEndpointHeader(PathEnd *end, //////////////////////////////////////////////////////////////// void -ReportPath::reportShort(const PathEndUnconstrained *end) +ReportPath::reportShort(const PathEndUnconstrained *end) const { PathExpanded expanded(end->path(), this); reportShort(end, expanded); @@ -435,7 +426,7 @@ ReportPath::reportShort(const PathEndUnconstrained *end) void ReportPath::reportShort(const PathEndUnconstrained *end, - PathExpanded &expanded) + const PathExpanded &expanded) const { reportStartpoint(end, expanded); reportUnclockedEndpoint(end, "internal pin"); @@ -443,7 +434,7 @@ ReportPath::reportShort(const PathEndUnconstrained *end, } void -ReportPath::reportFull(const PathEndUnconstrained *end) +ReportPath::reportFull(const PathEndUnconstrained *end) const { PathExpanded expanded(end->path(), this); reportShort(end, expanded); @@ -459,7 +450,7 @@ ReportPath::reportFull(const PathEndUnconstrained *end) //////////////////////////////////////////////////////////////// void -ReportPath::reportShort(const PathEndCheck *end) +ReportPath::reportShort(const PathEndCheck *end) const { PathExpanded expanded(end->path(), this); reportShort(end, expanded); @@ -467,7 +458,7 @@ ReportPath::reportShort(const PathEndCheck *end) void ReportPath::reportShort(const PathEndCheck *end, - PathExpanded &expanded) + const PathExpanded &expanded) const { reportStartpoint(end, expanded); reportEndpoint(end); @@ -475,7 +466,7 @@ ReportPath::reportShort(const PathEndCheck *end, } void -ReportPath::reportFull(const PathEndCheck *end) +ReportPath::reportFull(const PathEndCheck *end) const { PathExpanded expanded(end->path(), this); reportShort(end, expanded); @@ -486,14 +477,14 @@ ReportPath::reportFull(const PathEndCheck *end) } string -ReportPath::checkRoleString(const PathEnd *end) +ReportPath::checkRoleString(const PathEnd *end) const { const char *check_role = end->checkRole(this)->asString(); return stdstrPrint("library %s time", check_role); } void -ReportPath::reportEndpoint(const PathEndCheck *end) +ReportPath::reportEndpoint(const PathEndCheck *end) const { Instance *inst = network_->instance(end->vertex(this)->pin()); const char *inst_name = cmd_network_->pathName(inst); @@ -529,7 +520,7 @@ ReportPath::reportEndpoint(const PathEndCheck *end) //////////////////////////////////////////////////////////////// void -ReportPath::reportShort(const PathEndLatchCheck *end) +ReportPath::reportShort(const PathEndLatchCheck *end) const { PathExpanded expanded(end->path(), this); reportShort(end, expanded); @@ -537,7 +528,7 @@ ReportPath::reportShort(const PathEndLatchCheck *end) void ReportPath::reportShort(const PathEndLatchCheck *end, - PathExpanded &expanded) + const PathExpanded &expanded) const { reportStartpoint(end, expanded); reportEndpoint(end); @@ -545,7 +536,7 @@ ReportPath::reportShort(const PathEndLatchCheck *end, } void -ReportPath::reportFull(const PathEndLatchCheck *end) +ReportPath::reportFull(const PathEndLatchCheck *end) const { PathExpanded expanded(end->path(), this); const EarlyLate *early_late = end->pathEarlyLate(this); @@ -602,7 +593,7 @@ ReportPath::reportFull(const PathEndLatchCheck *end) } void -ReportPath::reportEndpoint(const PathEndLatchCheck *end) +ReportPath::reportEndpoint(const PathEndLatchCheck *end) const { Instance *inst = network_->instance(end->vertex(this)->pin()); const char *inst_name = cmd_network_->pathName(inst); @@ -613,7 +604,7 @@ ReportPath::reportEndpoint(const PathEndLatchCheck *end) } const char * -ReportPath::latchDesc(const PathEndLatchCheck *end) +ReportPath::latchDesc(const PathEndLatchCheck *end) const { TimingArc *check_arc = end->checkArc(); const RiseFall *en_rf = check_arc->fromEdge()->asRiseFall()->opposite(); @@ -623,7 +614,7 @@ ReportPath::latchDesc(const PathEndLatchCheck *end) void ReportPath::reportBorrowing(const PathEndLatchCheck *end, Arrival &borrow, - Arrival &time_given_to_startpoint) + Arrival &time_given_to_startpoint) const { Delay open_latency, latency_diff, max_borrow; float nom_pulse_width, open_uncertainty; @@ -678,7 +669,7 @@ ReportPath::reportBorrowing(const PathEndLatchCheck *end, //////////////////////////////////////////////////////////////// void -ReportPath::reportShort(const PathEndPathDelay *end) +ReportPath::reportShort(const PathEndPathDelay *end) const { PathExpanded expanded(end->path(), this); reportShort(end, expanded); @@ -686,7 +677,7 @@ ReportPath::reportShort(const PathEndPathDelay *end) void ReportPath::reportShort(const PathEndPathDelay *end, - PathExpanded &expanded) + const PathExpanded &expanded) const { reportStartpoint(end, expanded); if (end->targetClk(this)) @@ -697,7 +688,7 @@ ReportPath::reportShort(const PathEndPathDelay *end, } void -ReportPath::reportEndpoint(const PathEndPathDelay *end) +ReportPath::reportEndpoint(const PathEndPathDelay *end) const { if (end->hasOutputDelay()) reportEndpointOutputDelay(end); @@ -712,7 +703,7 @@ ReportPath::reportEndpoint(const PathEndPathDelay *end) } void -ReportPath::reportFull(const PathEndPathDelay *end) +ReportPath::reportFull(const PathEndPathDelay *end) const { PathExpanded expanded(end->path(), this); reportShort(end, expanded); @@ -767,14 +758,14 @@ ReportPath::reportFull(const PathEndPathDelay *end) } bool -ReportPath::isPropagated(const Path *clk_path) +ReportPath::isPropagated(const Path *clk_path) const { return clk_path->clkInfo(search_)->isPropagated(); } bool ReportPath::isPropagated(const Path *clk_path, - const Clock *clk) + const Clock *clk) const { if (clk_path) return clk_path->clkInfo(search_)->isPropagated(); @@ -783,7 +774,7 @@ ReportPath::isPropagated(const Path *clk_path, } const char * -ReportPath::clkNetworkDelayIdealProp(bool is_prop) +ReportPath::clkNetworkDelayIdealProp(bool is_prop) const { if (is_prop) return "clock network delay (propagated)"; @@ -794,7 +785,7 @@ ReportPath::clkNetworkDelayIdealProp(bool is_prop) //////////////////////////////////////////////////////////////// void -ReportPath::reportShort(const PathEndOutputDelay *end) +ReportPath::reportShort(const PathEndOutputDelay *end) const { PathExpanded expanded(end->path(), this); reportShort(end, expanded); @@ -802,7 +793,7 @@ ReportPath::reportShort(const PathEndOutputDelay *end) void ReportPath::reportShort(const PathEndOutputDelay *end, - PathExpanded &expanded) + const PathExpanded &expanded) const { reportStartpoint(end, expanded); reportEndpoint(end); @@ -810,7 +801,7 @@ ReportPath::reportShort(const PathEndOutputDelay *end, } void -ReportPath::reportFull(const PathEndOutputDelay *end) +ReportPath::reportFull(const PathEndOutputDelay *end) const { PathExpanded expanded(end->path(), this); reportShort(end, expanded); @@ -821,13 +812,13 @@ ReportPath::reportFull(const PathEndOutputDelay *end) } void -ReportPath::reportEndpoint(const PathEndOutputDelay *end) +ReportPath::reportEndpoint(const PathEndOutputDelay *end) const { reportEndpointOutputDelay(end); } void -ReportPath::reportEndpointOutputDelay(const PathEndClkConstrained *end) +ReportPath::reportEndpointOutputDelay(const PathEndClkConstrained *end) const { Vertex *vertex = end->vertex(this); Pin *pin = vertex->pin(); @@ -859,7 +850,7 @@ ReportPath::reportEndpointOutputDelay(const PathEndClkConstrained *end) //////////////////////////////////////////////////////////////// void -ReportPath::reportShort(const PathEndGatedClock *end) +ReportPath::reportShort(const PathEndGatedClock *end) const { PathExpanded expanded(end->path(), this); reportShort(end, expanded); @@ -867,7 +858,7 @@ ReportPath::reportShort(const PathEndGatedClock *end) void ReportPath::reportShort(const PathEndGatedClock *end, - PathExpanded &expanded) + const PathExpanded &expanded) const { reportStartpoint(end, expanded); reportEndpoint(end); @@ -875,7 +866,7 @@ ReportPath::reportShort(const PathEndGatedClock *end, } void -ReportPath::reportFull(const PathEndGatedClock *end) +ReportPath::reportFull(const PathEndGatedClock *end) const { PathExpanded expanded(end->path(), this); reportShort(end, expanded); @@ -886,7 +877,7 @@ ReportPath::reportFull(const PathEndGatedClock *end) } void -ReportPath::reportEndpoint(const PathEndGatedClock *end) +ReportPath::reportEndpoint(const PathEndGatedClock *end) const { Instance *inst = network_->instance(end->vertex(this)->pin()); const char *inst_name = cmd_network_->pathName(inst); @@ -905,7 +896,7 @@ ReportPath::reportEndpoint(const PathEndGatedClock *end) //////////////////////////////////////////////////////////////// void -ReportPath::reportShort(const PathEndDataCheck *end) +ReportPath::reportShort(const PathEndDataCheck *end) const { PathExpanded expanded(end->path(), this); reportShort(end, expanded); @@ -913,7 +904,7 @@ ReportPath::reportShort(const PathEndDataCheck *end) void ReportPath::reportShort(const PathEndDataCheck *end, - PathExpanded &expanded) + const PathExpanded &expanded) const { reportStartpoint(end, expanded); reportEndpoint(end); @@ -922,7 +913,7 @@ ReportPath::reportShort(const PathEndDataCheck *end, } void -ReportPath::reportFull(const PathEndDataCheck *end) +ReportPath::reportFull(const PathEndDataCheck *end) const { PathExpanded expanded(end->path(), this); reportShort(end, expanded); @@ -955,7 +946,7 @@ ReportPath::reportFull(const PathEndDataCheck *end) } void -ReportPath::reportEndpoint(const PathEndDataCheck *end) +ReportPath::reportEndpoint(const PathEndDataCheck *end) const { Instance *inst = network_->instance(end->vertex(this)->pin()); const char *inst_name = cmd_network_->pathName(inst); @@ -970,7 +961,7 @@ ReportPath::reportEndpoint(const PathEndDataCheck *end) //////////////////////////////////////////////////////////////// void -ReportPath::reportEndHeader() +ReportPath::reportEndHeader() const { string line; // Line one. @@ -996,7 +987,7 @@ ReportPath::reportEndHeader() } void -ReportPath::reportEndLine(PathEnd *end) +ReportPath::reportEndLine(const PathEnd *end) const { string line; string endpoint = pathEndpoint(end); @@ -1011,7 +1002,7 @@ ReportPath::reportEndLine(PathEnd *end) //////////////////////////////////////////////////////////////// void -ReportPath::reportSummaryHeader() +ReportPath::reportSummaryHeader() const { string line; reportDescription("Startpoint", line); @@ -1025,7 +1016,7 @@ ReportPath::reportSummaryHeader() } void -ReportPath::reportSummaryLine(PathEnd *end) +ReportPath::reportSummaryLine(const PathEnd *end) const { string line; PathExpanded expanded(end->path(), this); @@ -1043,10 +1034,10 @@ ReportPath::reportSummaryLine(PathEnd *end) } string -ReportPath::pathStartpoint(PathEnd *end, - PathExpanded &expanded) +ReportPath::pathStartpoint(const PathEnd *end, + const PathExpanded &expanded) const { - PathRef *start = expanded.startPath(); + const PathRef *start = expanded.startPath(); Pin *pin = start->pin(graph_); const char *pin_name = cmd_network_->pathName(pin); if (network_->isTopLevelPort(pin)) { @@ -1061,7 +1052,7 @@ ReportPath::pathStartpoint(PathEnd *end, } string -ReportPath::pathEndpoint(PathEnd *end) +ReportPath::pathEndpoint(const PathEnd *end) const { Pin *pin = end->vertex(this)->pin(); const char *pin_name = cmd_network_->pathName(pin); @@ -1079,13 +1070,13 @@ ReportPath::pathEndpoint(PathEnd *end) //////////////////////////////////////////////////////////////// void -ReportPath::reportJsonHeader() +ReportPath::reportJsonHeader() const { report_->reportLine("{\"checks\": ["); } void -ReportPath::reportJsonFooter() +ReportPath::reportJsonFooter() const { report_->reportLine("]"); report_->reportLine("}"); @@ -1093,7 +1084,7 @@ ReportPath::reportJsonFooter() void ReportPath::reportJson(const PathEnd *end, - bool last) + bool last) const { string result; result += "{\n"; @@ -1161,7 +1152,7 @@ ReportPath::reportJson(const PathEnd *end, } void -ReportPath::reportJson(const Path *path) +ReportPath::reportJson(const Path *path) const { string result; result += "{\n"; @@ -1175,7 +1166,7 @@ ReportPath::reportJson(const Path *path, const char *path_name, int indent, bool trailing_comma, - string &result) + string &result) const { PathExpanded expanded(path, this); reportJson(expanded, path_name, indent, trailing_comma, result); @@ -1186,7 +1177,7 @@ ReportPath::reportJson(const PathExpanded &expanded, const char *path_name, int indent, bool trailing_comma, - string &result) + string &result) const { stringAppend(result, "%*s\"%s\": [\n", indent, "", path_name); for (size_t i = 0; i < expanded.size(); i++) { @@ -1267,7 +1258,7 @@ ReportPath::reportJson(const PathExpanded &expanded, //////////////////////////////////////////////////////////////// void -ReportPath::reportSlackOnlyHeader() +ReportPath::reportSlackOnlyHeader() const { string line; reportDescription("Group", line); @@ -1279,7 +1270,7 @@ ReportPath::reportSlackOnlyHeader() } void -ReportPath::reportSlackOnly(PathEnd *end) +ReportPath::reportSlackOnly(const PathEnd *end) const { string line; const EarlyLate *early_late = end->pathEarlyLate(this); @@ -1294,8 +1285,8 @@ ReportPath::reportSlackOnly(PathEnd *end) //////////////////////////////////////////////////////////////// void -ReportPath::reportMpwCheck(MinPulseWidthCheck *check, - bool verbose) +ReportPath::reportMpwCheck(const MinPulseWidthCheck *check, + bool verbose) const { if (verbose) { reportVerbose(check); @@ -1309,32 +1300,27 @@ ReportPath::reportMpwCheck(MinPulseWidthCheck *check, } void -ReportPath::reportMpwChecks(MinPulseWidthCheckSeq *checks, - bool verbose) +ReportPath::reportMpwChecks(const MinPulseWidthCheckSeq *checks, + bool verbose) const { if (!checks->empty()) { if (verbose) { - MinPulseWidthCheckSeq::Iterator check_iter(checks); - while (check_iter.hasNext()) { - MinPulseWidthCheck *check = check_iter.next(); - reportVerbose(check); + for (const MinPulseWidthCheck *check : *checks) { + reportVerbose(check); reportBlankLine(); } } else { reportMpwHeaderShort(); - MinPulseWidthCheckSeq::Iterator check_iter(checks); - while (check_iter.hasNext()) { - MinPulseWidthCheck *check = check_iter.next(); + for (const MinPulseWidthCheck *check : *checks) reportShort(check); - } } reportBlankLine(); } } void -ReportPath::reportMpwHeaderShort() +ReportPath::reportMpwHeaderShort() const { string line; reportDescription("", line); @@ -1358,7 +1344,7 @@ ReportPath::reportMpwHeaderShort() } void -ReportPath::reportShort(MinPulseWidthCheck *check) +ReportPath::reportShort(const MinPulseWidthCheck *check) const { string line; const char *pin_name = cmd_network_->pathName(check->pin(this)); @@ -1372,7 +1358,7 @@ ReportPath::reportShort(MinPulseWidthCheck *check) } void -ReportPath::reportVerbose(MinPulseWidthCheck *check) +ReportPath::reportVerbose(const MinPulseWidthCheck *check) const { string line; const char *pin_name = cmd_network_->pathName(check->pin(this)); @@ -1432,7 +1418,7 @@ ReportPath::reportVerbose(MinPulseWidthCheck *check) } const char * -ReportPath::mpwCheckHiLow(MinPulseWidthCheck *check) +ReportPath::mpwCheckHiLow(const MinPulseWidthCheck *check) const { if (check->openTransition(this) == RiseFall::rise()) return "high"; @@ -1443,8 +1429,8 @@ ReportPath::mpwCheckHiLow(MinPulseWidthCheck *check) //////////////////////////////////////////////////////////////// void -ReportPath::reportCheck(MinPeriodCheck *check, - bool verbose) +ReportPath::reportCheck(const MinPeriodCheck *check, + bool verbose) const { if (verbose) { reportVerbose(check); @@ -1458,32 +1444,27 @@ ReportPath::reportCheck(MinPeriodCheck *check, } void -ReportPath::reportChecks(MinPeriodCheckSeq *checks, - bool verbose) +ReportPath::reportChecks(const MinPeriodCheckSeq *checks, + bool verbose) const { if (!checks->empty()) { if (verbose) { - MinPeriodCheckSeq::Iterator check_iter(checks); - while (check_iter.hasNext()) { - MinPeriodCheck *check = check_iter.next(); + for (const MinPeriodCheck *check : *checks) { reportVerbose(check); reportBlankLine(); } } else { reportPeriodHeaderShort(); - MinPeriodCheckSeq::Iterator check_iter(checks); - while (check_iter.hasNext()) { - MinPeriodCheck *check = check_iter.next(); + for (const MinPeriodCheck *check : *checks) reportShort(check); - } } reportBlankLine(); } } void -ReportPath::reportPeriodHeaderShort() +ReportPath::reportPeriodHeaderShort() const { string line; reportDescription("", line); @@ -1509,7 +1490,7 @@ ReportPath::reportPeriodHeaderShort() } void -ReportPath::reportShort(MinPeriodCheck *check) +ReportPath::reportShort(const MinPeriodCheck *check) const { string line; const char *pin_name = cmd_network_->pathName(check->pin()); @@ -1521,7 +1502,7 @@ ReportPath::reportShort(MinPeriodCheck *check) } void -ReportPath::reportVerbose(MinPeriodCheck *check) +ReportPath::reportVerbose(const MinPeriodCheck *check) const { string line; const char *pin_name = cmd_network_->pathName(check->pin()); @@ -1539,8 +1520,8 @@ ReportPath::reportVerbose(MinPeriodCheck *check) //////////////////////////////////////////////////////////////// void -ReportPath::reportCheck(MaxSkewCheck *check, - bool verbose) +ReportPath::reportCheck(const MaxSkewCheck *check, + bool verbose) const { if (verbose) { reportVerbose(check); @@ -1554,31 +1535,25 @@ ReportPath::reportCheck(MaxSkewCheck *check, } void -ReportPath::reportChecks(MaxSkewCheckSeq *checks, - bool verbose) +ReportPath::reportChecks(const MaxSkewCheckSeq *checks, + bool verbose) const { if (!checks->empty()) { if (verbose) { - MaxSkewCheckSeq::Iterator check_iter(checks); - while (check_iter.hasNext()) { - MaxSkewCheck *check = check_iter.next(); + for (const MaxSkewCheck *check : *checks) reportVerbose(check); - } } else { reportMaxSkewHeaderShort(); - MaxSkewCheckSeq::Iterator check_iter(checks); - while (check_iter.hasNext()) { - MaxSkewCheck *check = check_iter.next(); + for (const MaxSkewCheck *check : *checks) reportShort(check); - } } reportBlankLine(); } } void -ReportPath::reportMaxSkewHeaderShort() +ReportPath::reportMaxSkewHeaderShort() const { string line; reportDescription("", line); @@ -1604,7 +1579,7 @@ ReportPath::reportMaxSkewHeaderShort() } void -ReportPath::reportShort(MaxSkewCheck *check) +ReportPath::reportShort(const MaxSkewCheck *check) const { string line; Pin *clk_pin = check->clkPin(this); @@ -1623,7 +1598,7 @@ ReportPath::reportShort(MaxSkewCheck *check) } void -ReportPath::reportVerbose(MaxSkewCheck *check) +ReportPath::reportVerbose(const MaxSkewCheck *check) const { string line; const char *clk_pin_name = cmd_network_->pathName(check->clkPin(this)); @@ -1654,7 +1629,7 @@ ReportPath::reportVerbose(MaxSkewCheck *check) // Based on reportTgtClk. void ReportPath::reportSkewClkPath(const char *arrival_msg, - const PathVertex *clk_path) + const PathVertex *clk_path) const { const ClockEdge *clk_edge = clk_path->clkEdge(this); const Clock *clk = clk_edge->clock(); @@ -1697,7 +1672,7 @@ ReportPath::reportSkewClkPath(const char *arrival_msg, //////////////////////////////////////////////////////////////// void -ReportPath::reportLimitShortHeader(const ReportField *field) +ReportPath::reportLimitShortHeader(const ReportField *field) const { string line; reportDescription("Pin", line); @@ -1717,7 +1692,7 @@ ReportPath::reportLimitShort(const ReportField *field, Pin *pin, float value, float limit, - float slack) + float slack) const { string line; const char *pin_name = cmd_network_->pathName(pin); @@ -1742,7 +1717,7 @@ ReportPath::reportLimitVerbose(const ReportField *field, float limit, float slack, const Corner *corner, - const MinMax *min_max) + const MinMax *min_max) const { string line; line += "Pin "; @@ -1789,13 +1764,13 @@ ReportPath::reportLimitVerbose(const ReportField *field, void ReportPath::reportStartpoint(const PathEnd *end, - PathExpanded &expanded) + const PathExpanded &expanded) const { const Path *path = end->path(); - PathRef *start = expanded.startPath(); - TimingArc *prev_arc = expanded.startPrevArc(); - Edge *prev_edge = start->prevEdge(prev_arc, this); - Pin *pin = start->pin(graph_); + const PathRef *start = expanded.startPath(); + const TimingArc *prev_arc = expanded.startPrevArc(); + const Edge *prev_edge = start->prevEdge(prev_arc, this); + const Pin *pin = start->pin(graph_); const ClockEdge *clk_edge = path->clkEdge(this); const Clock *clk = path->clock(search_); const char *pin_name = cmd_network_->pathName(pin); @@ -1853,17 +1828,17 @@ ReportPath::reportStartpoint(const PathEnd *end, } bool -ReportPath::pathFromClkPin(PathExpanded &expanded) +ReportPath::pathFromClkPin(const PathExpanded &expanded) const { - PathRef *start = expanded.startPath(); - PathRef *end = expanded.endPath(); + const PathRef *start = expanded.startPath(); + const PathRef *end = expanded.endPath(); const Pin *start_pin = start->pin(graph_); return pathFromClkPin(end, start_pin); } bool ReportPath::pathFromClkPin(const Path *path, - const Pin *start_pin) + const Pin *start_pin) const { const Clock *clk = path->clock(search_); return clk @@ -1872,14 +1847,14 @@ ReportPath::pathFromClkPin(const Path *path, void ReportPath::reportStartpoint(const char *start, - string reason) + const string reason) const { reportStartEndPoint(start, reason, "Startpoint"); } void ReportPath::reportUnclockedEndpoint(const PathEnd *end, - const char *default_reason) + const char *default_reason) const { Vertex *vertex = end->vertex(this); Pin *pin = vertex->pin(); @@ -1921,7 +1896,7 @@ ReportPath::reportUnclockedEndpoint(const PathEnd *end, void ReportPath::reportEndpoint(const char *end, - string reason) + const string reason) const { reportStartEndPoint(end, reason, "Endpoint"); } @@ -1929,7 +1904,7 @@ ReportPath::reportEndpoint(const char *end, void ReportPath::reportStartEndPoint(const char *pt, string reason, - const char *key) + const char *key) const { string line; // Account for punctuation in the line. @@ -1962,7 +1937,7 @@ ReportPath::reportStartEndPoint(const char *pt, } void -ReportPath::reportGroup(const PathEnd *end) +ReportPath::reportGroup(const PathEnd *end) const { string line; line = "Path Group: "; @@ -1984,14 +1959,14 @@ ReportPath::reportGroup(const PathEnd *end) //////////////////////////////////////////////////////////////// string -ReportPath::checkRoleReason(const PathEnd *end) +ReportPath::checkRoleReason(const PathEnd *end) const { const char *setup_hold = end->checkRole(this)->asString(); return stdstrPrint("%s time", setup_hold); } string -ReportPath::tgtClkName(const PathEnd *end) +ReportPath::tgtClkName(const PathEnd *end) const { const ClockEdge *tgt_clk_edge = end->targetClkEdge(this); const Clock *tgt_clk = tgt_clk_edge->clock(); @@ -2002,7 +1977,7 @@ ReportPath::tgtClkName(const PathEnd *end) string ReportPath::clkName(const Clock *clk, - bool inverted) + bool inverted) const { string name = clk->name(); if (inverted) @@ -2011,7 +1986,7 @@ ReportPath::clkName(const Clock *clk, } const char * -ReportPath::clkRegLatchDesc(const PathEnd *end) +ReportPath::clkRegLatchDesc(const PathEnd *end) const { // Goofy libraries can have registers with both rising and falling // clk->q timing arcs. Try and match the timing check transition. @@ -2044,7 +2019,7 @@ ReportPath::clkRegLatchDesc(const PathEnd *end) void ReportPath::reportSrcPathArrival(const PathEnd *end, - PathExpanded &expanded) + const PathExpanded &expanded) const { reportBlankLine(); reportSrcPath(end, expanded); @@ -2055,7 +2030,7 @@ ReportPath::reportSrcPathArrival(const PathEnd *end, void ReportPath::reportSrcPath(const PathEnd *end, - PathExpanded &expanded) + const PathExpanded &expanded) const { reportPathHeader(); float src_clk_offset = end->sourceClkOffset(this); @@ -2068,11 +2043,11 @@ ReportPath::reportSrcPath(const PathEnd *end, void ReportPath::reportSrcClkAndPath(const Path *path, - PathExpanded &expanded, + const PathExpanded &expanded, float time_offset, Arrival clk_insertion, Arrival clk_latency, - bool is_path_delay) + bool is_path_delay) const { const ClockEdge *clk_edge = path->clkEdge(this); const MinMax *min_max = path->minMax(this); @@ -2108,8 +2083,8 @@ ReportPath::reportSrcClkAndPath(const Path *path, clk_delay = clk_insertion + clk_latency; clk_end_time = clk_time + clk_delay; - PathRef *first_path = expanded.startPath(); - InputDelay *input_delay = pathInputDelay(first_path); + const PathRef *first_path = expanded.startPath(); + const InputDelay *input_delay = pathInputDelay(first_path); if (input_delay) { path_from_input = true; const Pin *ref_pin = input_delay->refPin(); @@ -2192,14 +2167,14 @@ ReportPath::reportSrcClkAndPath(const Path *path, } void -ReportPath::reportTgtClk(const PathEnd *end) +ReportPath::reportTgtClk(const PathEnd *end) const { reportTgtClk(end, 0.0); } void ReportPath::reportTgtClk(const PathEnd *end, - float prev_time) + float prev_time) const { const Clock *clk = end->targetClk(this); const Path *clk_path = end->targetClkPath(); @@ -2209,7 +2184,7 @@ ReportPath::reportTgtClk(const PathEnd *end, void ReportPath::reportTgtClk(const PathEnd *end, float prev_time, - bool is_prop) + bool is_prop) const { float src_offset = end->sourceClkOffset(this); reportTgtClk(end, prev_time, src_offset, is_prop); @@ -2219,7 +2194,7 @@ void ReportPath::reportTgtClk(const PathEnd *end, float prev_time, float src_offset, - bool is_prop) + bool is_prop) const { const ClockEdge *clk_edge = end->targetClkEdge(this); Clock *clk = clk_edge->clock(); @@ -2287,7 +2262,7 @@ ReportPath::reportTgtClk(const PathEnd *end, float ReportPath::tgtClkInsertionOffet(const Path *clk_path, const EarlyLate *early_late, - PathAnalysisPt *path_ap) + const PathAnalysisPt *path_ap) const { ClkInfo *clk_info = clk_path->clkInfo(this); const Pin *src_pin = clk_info->clkSrc(); @@ -2306,7 +2281,7 @@ ReportPath::tgtClkInsertionOffet(const Path *clk_path, bool ReportPath::pathFromGenPropClk(const Path *clk_path, - const EarlyLate *early_late) + const EarlyLate *early_late) const { ClkInfo *clk_info = clk_path->tag(search_)->clkInfo(); const ClockEdge *clk_edge = clk_info->clkEdge(); @@ -2330,7 +2305,7 @@ bool ReportPath::isGenPropClk(const Clock *clk, const RiseFall *clk_rf, const MinMax *min_max, - const EarlyLate *early_late) + const EarlyLate *early_late) const { float insertion; bool exists; @@ -2346,7 +2321,7 @@ ReportPath::reportClkLine(const Clock *clk, const char *clk_name, const RiseFall *clk_rf, Arrival clk_time, - const MinMax *min_max) + const MinMax *min_max) const { reportClkLine(clk, clk_name, clk_rf, 0.0, clk_time, min_max); } @@ -2357,7 +2332,7 @@ ReportPath::reportClkLine(const Clock *clk, const RiseFall *clk_rf, Arrival prev_time, Arrival clk_time, - const MinMax *min_max) + const MinMax *min_max) const { const char *rise_fall = asRiseFall(clk_rf); auto clk_msg = stdstrPrint("clock %s (%s edge)", clk_name, rise_fall); @@ -2375,7 +2350,7 @@ ReportPath::reportGenClkSrcPath(const Path *clk_path, const Clock *clk, const RiseFall *clk_rf, const MinMax *min_max, - const EarlyLate *early_late) + const EarlyLate *early_late) const { bool from_gen_prop_clk = clk_path ? pathFromGenPropClk(clk_path, early_late) @@ -2392,7 +2367,7 @@ ReportPath::reportGenClkSrcAndPath(const Path *path, const PathAnalysisPt *path_ap, float time_offset, float path_time_offset, - bool clk_used_as_data) + bool clk_used_as_data) const { const Pin *clk_pin = path ? path->clkInfo(search_)->clkSrc() @@ -2416,7 +2391,7 @@ ReportPath::reportGenClkSrcPath1(const Clock *clk, const PathAnalysisPt *path_ap, float gclk_time, float time_offset, - bool clk_used_as_data) + bool clk_used_as_data) const { PathAnalysisPt *insert_ap = path_ap->insertionAnalysisPt(early_late); PathVertex src_path; @@ -2464,7 +2439,7 @@ ReportPath::reportGenClkSrcPath1(const Clock *clk, void ReportPath::reportClkSrcLatency(Arrival insertion, float clk_time, - const EarlyLate *early_late) + const EarlyLate *early_late) const { reportLine("clock source latency", insertion, clk_time + insertion, early_late); } @@ -2473,7 +2448,7 @@ void ReportPath::reportPathLine(const Path *path, Arrival incr, Arrival time, - const char *line_case) + const char *line_case) const { Vertex *vertex = path->vertex(this); Pin *pin = vertex->pin(); @@ -2500,7 +2475,7 @@ ReportPath::reportPathLine(const Path *path, void ReportPath::reportRequired(const PathEnd *end, - string margin_msg) + string margin_msg) const { Required req_time = end->requiredTimeOffset(this); const EarlyLate *early_late = end->clkEarlyLate(this); @@ -2519,7 +2494,7 @@ ReportPath::reportRequired(const PathEnd *end, } void -ReportPath::reportSlack(const PathEnd *end) +ReportPath::reportSlack(const PathEnd *end) const { const EarlyLate *early_late = end->pathEarlyLate(this); reportLine("data required time", end->requiredTimeOffset(this), @@ -2530,7 +2505,7 @@ ReportPath::reportSlack(const PathEnd *end) } void -ReportPath::reportSlack(Slack slack) +ReportPath::reportSlack(Slack slack) const { const EarlyLate *early_late = EarlyLate::early(); const char *msg = (delayAsFloat(slack, early_late, this) >= 0.0) @@ -2540,8 +2515,8 @@ ReportPath::reportSlack(Slack slack) } void -ReportPath::reportSpaceSlack(PathEnd *end, - string &result) +ReportPath::reportSpaceSlack(const PathEnd *end, + string &result) const { Slack slack = end->slack(this); reportSpaceSlack(slack, result); @@ -2549,7 +2524,7 @@ ReportPath::reportSpaceSlack(PathEnd *end, void ReportPath::reportSpaceSlack(Slack slack, - string &result) + string &result) const { const EarlyLate *early_late = EarlyLate::early(); reportSpaceFieldDelay(slack, early_late, result); @@ -2560,7 +2535,7 @@ ReportPath::reportSpaceSlack(Slack slack, void ReportPath::reportCommonClkPessimism(const PathEnd *end, - Arrival &clk_arrival) + Arrival &clk_arrival) const { if (sdc_->crprEnabled()) { Crpr pessimism = end->checkCrpr(this); @@ -2572,7 +2547,7 @@ ReportPath::reportCommonClkPessimism(const PathEnd *end, void ReportPath::reportClkUncertainty(const PathEnd *end, - Arrival &clk_arrival) + Arrival &clk_arrival) const { const EarlyLate *early_late = end->clkEarlyLate(this); float uncertainty = end->targetNonInterClkUncertainty(this); @@ -2590,7 +2565,7 @@ ReportPath::reportClkUncertainty(const PathEnd *end, void ReportPath::reportPath(const PathEnd *end, - PathExpanded &expanded) + const PathExpanded &expanded) const { reportPathHeader(); // Source clk offset for path delays removes clock phase time. @@ -2599,7 +2574,7 @@ ReportPath::reportPath(const PathEnd *end, } void -ReportPath::reportPath(const Path *path) +ReportPath::reportPath(const Path *path) const { switch (format_) { case ReportPathFormat::full: @@ -2620,7 +2595,7 @@ ReportPath::reportPath(const Path *path) } void -ReportPath::reportPathFull(const Path *path) +ReportPath::reportPathFull(const Path *path) const { reportPathHeader(); PathExpanded expanded(path, this); @@ -2631,11 +2606,11 @@ ReportPath::reportPathFull(const Path *path) void ReportPath::reportPath1(const Path *path, - PathExpanded &expanded, + const PathExpanded &expanded, bool clk_used_as_data, - float time_offset) + float time_offset) const { - PathRef *d_path, *q_path; + const PathRef *d_path, *q_path; Edge *d_q_edge; expanded.latchPaths(d_path, q_path, d_q_edge); if (d_path) { @@ -2674,9 +2649,9 @@ ReportPath::reportPath1(const Path *path, void ReportPath::reportPath2(const Path *path, - PathExpanded &expanded, + const PathExpanded &expanded, bool clk_used_as_data, - float time_offset) + float time_offset) const { // Report the clock path if the end is a clock or we wouldn't have // anything to report. @@ -2689,11 +2664,11 @@ ReportPath::reportPath2(const Path *path, void ReportPath::reportPath3(const Path *path, - PathExpanded &expanded, + const PathExpanded &expanded, bool clk_used_as_data, bool report_clk_path, Arrival prev_time, - float time_offset) + float time_offset) const { bool propagated_clk = clk_used_as_data || path->clkInfo(search_)->isPropagated(); @@ -2704,11 +2679,11 @@ ReportPath::reportPath3(const Path *path, void ReportPath::reportPath4(const Path *path, - PathExpanded &expanded, + const PathExpanded &expanded, bool skip_first_path, bool skip_last_path, bool clk_used_as_data, - float time_offset) + float time_offset) const { size_t path_first_index = 0; Arrival prev_time(0.0); @@ -2733,13 +2708,13 @@ ReportPath::reportPath4(const Path *path, void ReportPath::reportPath5(const Path *path, - PathExpanded &expanded, + const PathExpanded &expanded, size_t path_first_index, size_t path_last_index, bool propagated_clk, bool report_clk_path, Arrival prev_time, - float time_offset) + float time_offset) const { const MinMax *min_max = path->minMax(this); DcalcAnalysisPt *dcalc_ap = path->pathAnalysisPt(this)->dcalcAnalysisPt(); @@ -2878,7 +2853,7 @@ ReportPath::reportPath5(const Path *path, void ReportPath::reportHierPinsThru(const Path *path, - const TimingArc *prev_arc) + const TimingArc *prev_arc) const { if (report_hier_pins_) { const Edge *prev_edge = path->prevEdge(prev_arc, this); @@ -2896,7 +2871,7 @@ ReportPath::reportHierPinsThru(const Path *path, Delay ReportPath::delayIncr(Delay time, Delay prev, - const MinMax *min_max) + const MinMax *min_max) const { if (report_sigmas_) return delayRemove(time, prev); @@ -2907,8 +2882,8 @@ ReportPath::delayIncr(Delay time, bool ReportPath::nextArcAnnotated(const PathRef *next_path, size_t next_index, - PathExpanded &expanded, - DcalcAPIndex ap_index) + const PathExpanded &expanded, + DcalcAPIndex ap_index) const { TimingArc *arc = expanded.prevArc(next_index); Edge *edge = next_path->prevEdge(arc, this); @@ -2916,13 +2891,13 @@ ReportPath::nextArcAnnotated(const PathRef *next_path, } string -ReportPath::descriptionField(Vertex *vertex) +ReportPath::descriptionField(const Vertex *vertex) const { return descriptionField(vertex->pin()); } string -ReportPath::descriptionField(const Pin *pin) +ReportPath::descriptionField(const Pin *pin) const { const char *pin_name = cmd_network_->pathName(pin); const char *name2; @@ -2948,7 +2923,7 @@ ReportPath::descriptionField(const Pin *pin) } string -ReportPath::descriptionNet(const Pin *pin) +ReportPath::descriptionNet(const Pin *pin) const { if (network_->isTopLevelPort(pin)) { const char *pin_name = cmd_network_->pathName(pin); @@ -2969,7 +2944,7 @@ ReportPath::descriptionNet(const Pin *pin) float ReportPath::drvrFanout(Vertex *drvr, const Corner *corner, - const MinMax *min_max) + const MinMax *min_max) const { float fanout = 0.0; VertexOutEdgeIterator iter(drvr, graph_); @@ -2992,7 +2967,7 @@ ReportPath::drvrFanout(Vertex *drvr, bool ReportPath::hasExtInputDriver(const Pin *pin, const RiseFall *rf, - const MinMax *min_max) + const MinMax *min_max) const { Port *port = network_->port(pin); InputDrive *drive = sdc_->findInputDrive(port); @@ -3003,7 +2978,7 @@ ReportPath::hasExtInputDriver(const Pin *pin, void ReportPath::reportInputExternalDelay(const Path *first_path, - float time_offset) + float time_offset) const { const Pin *first_pin = first_path->pin(graph_); if (!pathFromClkPin(first_path, first_pin)) { @@ -3041,12 +3016,12 @@ ReportPath::pathInputDelay(const Path *first_path) const void ReportPath::pathInputDelayRefPath(const Path *path, - InputDelay *input_delay, + const InputDelay *input_delay, // Return value. - PathRef &ref_path) + PathRef &ref_path) const { const Pin *ref_pin = input_delay->refPin(); - RiseFall *ref_rf = input_delay->refTransition(); + const RiseFall *ref_rf = input_delay->refTransition(); Vertex *ref_vertex = graph_->pinDrvrVertex(ref_pin); if (ref_vertex) { const PathAnalysisPt *path_ap = path->pathAnalysisPt(this); @@ -3066,13 +3041,11 @@ ReportPath::pathInputDelayRefPath(const Path *path, //////////////////////////////////////////////////////////////// void -ReportPath::reportPathHeader() +ReportPath::reportPathHeader() const { - ReportFieldSeq::Iterator field_iter(fields_); string line; bool first_field = true; - while (field_iter.hasNext()) { - ReportField *field = field_iter.next(); + for (const ReportField *field : fields_) { if (field->enabled()) { if (!first_field) line += ' '; @@ -3089,7 +3062,7 @@ ReportPath::reportPathHeader() void ReportPath::reportLine(const char *what, Delay total, - const EarlyLate *early_late) + const EarlyLate *early_late) const { reportLine(what, field_blank_, field_blank_, field_blank_, field_blank_, total, false, early_late, nullptr, @@ -3100,7 +3073,7 @@ ReportPath::reportLine(const char *what, void ReportPath::reportLineNegative(const char *what, Delay total, - const EarlyLate *early_late) + const EarlyLate *early_late) const { reportLine(what, field_blank_, field_blank_, field_blank_, field_blank_, total, true, early_late, nullptr, @@ -3112,7 +3085,7 @@ void ReportPath::reportLine(const char *what, Delay total, const EarlyLate *early_late, - const RiseFall *rf) + const RiseFall *rf) const { reportLine(what, field_blank_, field_blank_, field_blank_, field_blank_, total, false, early_late, rf, "", @@ -3124,7 +3097,7 @@ void ReportPath::reportLine(const char *what, Delay incr, Delay total, - const EarlyLate *early_late) + const EarlyLate *early_late) const { reportLine(what, field_blank_, field_blank_, field_blank_, incr, total, false, early_late, nullptr, "", @@ -3137,7 +3110,7 @@ ReportPath::reportLine(const char *what, Delay incr, Delay total, const EarlyLate *early_late, - const RiseFall *rf) + const RiseFall *rf) const { reportLine(what, field_blank_, field_blank_, field_blank_, incr, total, false, early_late, rf, "", @@ -3150,7 +3123,7 @@ ReportPath::reportLine(const char *what, Slew slew, Delay incr, Delay total, - const EarlyLate *early_late) + const EarlyLate *early_late) const { reportLine(what, field_blank_, slew, field_blank_, incr, total, false, early_late, nullptr, @@ -3168,14 +3141,12 @@ ReportPath::reportLine(const char *what, const EarlyLate *early_late, const RiseFall *rf, string src_attr, - const char *line_case) + const char *line_case) const { - ReportFieldSeq::Iterator field_iter(fields_); string line; size_t field_index = 0; bool first_field = true; - while (field_iter.hasNext()) { - ReportField *field = field_iter.next(); + for (const ReportField *field : fields_) { bool last_field = field_index == (fields_.size() - 1); if (field->enabled()) { @@ -3235,7 +3206,7 @@ ReportPath::reportLine(const char *what, void ReportPath::reportLineTotal(const char *what, Delay incr, - const EarlyLate *early_late) + const EarlyLate *early_late) const { reportLineTotal1(what, incr, false, early_late); } @@ -3244,7 +3215,7 @@ ReportPath::reportLineTotal(const char *what, void ReportPath::reportLineTotalMinus(const char *what, Delay decr, - const EarlyLate *early_late) + const EarlyLate *early_late) const { reportLineTotal1(what, decr, true, early_late); } @@ -3253,7 +3224,7 @@ void ReportPath::reportLineTotal1(const char *what, Delay incr, bool incr_with_minus, - const EarlyLate *early_late) + const EarlyLate *early_late) const { string line; reportDescription(what, line); @@ -3266,7 +3237,7 @@ ReportPath::reportLineTotal1(const char *what, } void -ReportPath::reportDashLineTotal() +ReportPath::reportDashLineTotal() const { reportDashLine(field_description_->width() + field_total_->width() + 1); } @@ -3275,7 +3246,7 @@ ReportPath::reportDashLineTotal() void ReportPath::reportDescription(const char *what, - string &line) + string &line) const { reportDescription(what, false, false, line); } @@ -3284,7 +3255,7 @@ void ReportPath::reportDescription(const char *what, bool first_field, bool last_field, - string &line) + string &line) const { line += what; int length = strlen(what); @@ -3304,7 +3275,7 @@ ReportPath::reportDescription(const char *what, void ReportPath::reportFieldTime(float value, ReportField *field, - string &line) + string &line) const { if (delayAsFloat(value) == field_blank_) reportFieldBlank(field, line); @@ -3319,7 +3290,7 @@ ReportPath::reportFieldTime(float value, void ReportPath::reportSpaceFieldTime(float value, - string &line) + string &line) const { line += ' '; reportFieldTime(value, field_total_, line); @@ -3328,7 +3299,7 @@ ReportPath::reportSpaceFieldTime(float value, void ReportPath::reportSpaceFieldDelay(Delay value, const EarlyLate *early_late, - string &line) + string &line) const { line += ' '; reportTotalDelay(value, early_late, line); @@ -3337,7 +3308,7 @@ ReportPath::reportSpaceFieldDelay(Delay value, void ReportPath::reportTotalDelay(Delay value, const EarlyLate *early_late, - string &line) + string &line) const { const char *str = delayAsString(value, early_late, this, digits_); if (stringEq(str, minus_zero_)) @@ -3350,8 +3321,8 @@ ReportPath::reportTotalDelay(Delay value, void ReportPath::reportFieldDelayMinus(Delay value, const EarlyLate *early_late, - ReportField *field, - string &line) + const ReportField *field, + string &line) const { if (delayAsFloat(value) == field_blank_) reportFieldBlank(field, line); @@ -3370,8 +3341,8 @@ ReportPath::reportFieldDelayMinus(Delay value, void ReportPath::reportFieldDelay(Delay value, const EarlyLate *early_late, - ReportField *field, - string &line) + const ReportField *field, + string &line) const { if (delayAsFloat(value) == field_blank_) reportFieldBlank(field, line); @@ -3389,7 +3360,7 @@ ReportPath::reportFieldDelay(Delay value, void ReportPath::reportField(float value, const ReportField *field, - string &line) + string &line) const { if (value == field_blank_) reportFieldBlank(field, line); @@ -3411,7 +3382,7 @@ ReportPath::reportField(float value, void ReportPath::reportField(const char *value, const ReportField *field, - string &line) + string &line) const { if (field->leftJustify()) line += value; @@ -3423,18 +3394,16 @@ ReportPath::reportField(const char *value, void ReportPath::reportFieldBlank(const ReportField *field, - string &line) + string &line) const { line += field->blank(); } void -ReportPath::reportDashLine() +ReportPath::reportDashLine() const { string line; - ReportFieldSeq::Iterator field_iter(fields_); - while (field_iter.hasNext()) { - ReportField *field = field_iter.next(); + for (const ReportField *field : fields_) { if (field->enabled()) { for (int i = 0; i < field->width(); i++) line += '-'; @@ -3445,7 +3414,7 @@ ReportPath::reportDashLine() } void -ReportPath::reportDashLine(int line_width) +ReportPath::reportDashLine(int line_width) const { string line; for (int i = 0; i < line_width; i++) @@ -3454,7 +3423,7 @@ ReportPath::reportDashLine(int line_width) } void -ReportPath::reportBlankLine() +ReportPath::reportBlankLine() const { report_->reportBlankLine(); } @@ -3469,7 +3438,7 @@ ReportPath::reportClkPath() const //////////////////////////////////////////////////////////////// const char * -ReportPath::asRisingFalling(const RiseFall *rf) +ReportPath::asRisingFalling(const RiseFall *rf) const { if (rf == RiseFall::rise()) return "rising"; @@ -3478,7 +3447,7 @@ ReportPath::asRisingFalling(const RiseFall *rf) } const char * -ReportPath::asRiseFall(const RiseFall *rf) +ReportPath::asRiseFall(const RiseFall *rf) const { if (rf == RiseFall::rise()) return "rise"; @@ -3488,8 +3457,8 @@ ReportPath::asRiseFall(const RiseFall *rf) // Find the startpoint type from the first path edge. const char * -ReportPath::edgeRegLatchDesc(Edge *first_edge, - TimingArc *first_arc) +ReportPath::edgeRegLatchDesc(const Edge *first_edge, + const TimingArc *first_arc) const { TimingRole *role = first_arc->role(); if (role == TimingRole::latchDtoQ()) { diff --git a/search/ReportPath.hh b/search/ReportPath.hh index 93a27db7..10ef2d0e 100644 --- a/search/ReportPath.hh +++ b/search/ReportPath.hh @@ -44,7 +44,7 @@ typedef Vector ReportFieldSeq; class ReportPath : public StaState { public: - explicit ReportPath(StaState *sta); + ReportPath(StaState *sta); virtual ~ReportPath(); ReportPathFormat pathFormat() const { return format_; } void setPathFormat(ReportPathFormat format); @@ -61,93 +61,93 @@ public: void setNoSplit(bool no_split); bool reportSigmas() const { return report_sigmas_; } void setReportSigmas(bool report); - ReportField *findField(const char *name); + ReportField *findField(const char *name) const; // Header above reportPathEnd results. - void reportPathEndHeader(); + void reportPathEndHeader() const; // Footer below reportPathEnd results. - void reportPathEndFooter(); - void reportPathEnd(PathEnd *end); + void reportPathEndFooter() const; + void reportPathEnd(const PathEnd *end) const; // Format report_path_endpoint only: // Previous path end is used to detect path group changes // so headers are reported by group. - void reportPathEnd(PathEnd *end, - PathEnd *prev_end, - bool last); - void reportPathEnds(PathEndSeq *ends); - void reportPath(const Path *path); + void reportPathEnd(const PathEnd *end, + const PathEnd *prev_end, + bool last) const; + void reportPathEnds(const PathEndSeq *ends) const; + void reportPath(const Path *path) const; - void reportShort(const PathEndUnconstrained *end); - void reportShort(const PathEndCheck *end); - void reportShort(const PathEndLatchCheck *end); - void reportShort(const PathEndPathDelay *end); - void reportShort(const PathEndOutputDelay *end); - void reportShort(const PathEndGatedClock *end); - void reportShort(const PathEndDataCheck *end); + void reportShort(const PathEndUnconstrained *end) const; + void reportShort(const PathEndCheck *end) const; + void reportShort(const PathEndLatchCheck *end) const; + void reportShort(const PathEndPathDelay *end) const; + void reportShort(const PathEndOutputDelay *end) const; + void reportShort(const PathEndGatedClock *end) const; + void reportShort(const PathEndDataCheck *end) const; - void reportFull(const PathEndUnconstrained *end); - void reportFull(const PathEndCheck *end); - void reportFull(const PathEndLatchCheck *end); - void reportFull(const PathEndPathDelay *end); - void reportFull(const PathEndOutputDelay *end); - void reportFull(const PathEndGatedClock *end); - void reportFull(const PathEndDataCheck *end); + void reportFull(const PathEndUnconstrained *end) const; + void reportFull(const PathEndCheck *end) const; + void reportFull(const PathEndLatchCheck *end) const; + void reportFull(const PathEndPathDelay *end) const; + void reportFull(const PathEndOutputDelay *end) const; + void reportFull(const PathEndGatedClock *end) const; + void reportFull(const PathEndDataCheck *end) const; - void reportJsonHeader(); - void reportJsonFooter(); + void reportJsonHeader() const; + void reportJsonFooter() const; void reportJson(const PathEnd *end, - bool last); - void reportJson(const Path *path); + bool last) const; + void reportJson(const Path *path) const; void reportJson(const Path *path, const char *path_name, int indent, bool trailing_comma, - string &result); + string &result) const; void reportJson(const PathExpanded &expanded, const char *path_name, int indent, bool trailing_comma, - string &result); + string &result) const; - void reportEndHeader(); - void reportEndLine(PathEnd *end); + void reportEndHeader() const; + void reportEndLine(const PathEnd *end) const; - void reportSummaryHeader(); - void reportSummaryLine(PathEnd *end); + void reportSummaryHeader() const; + void reportSummaryLine(const PathEnd *end) const; - void reportSlackOnlyHeader(); - void reportSlackOnly(PathEnd *end); + void reportSlackOnlyHeader() const; + void reportSlackOnly(const PathEnd *end) const; - void reportMpwCheck(MinPulseWidthCheck *check, - bool verbose); - void reportMpwChecks(MinPulseWidthCheckSeq *checks, - bool verbose); - void reportMpwHeaderShort(); - void reportShort(MinPulseWidthCheck *check); - void reportVerbose(MinPulseWidthCheck *check); + void reportMpwCheck(const MinPulseWidthCheck *check, + bool verbose) const; + void reportMpwChecks(const MinPulseWidthCheckSeq *checks, + bool verbose) const; + void reportMpwHeaderShort() const; + void reportShort(const MinPulseWidthCheck *check) const; + void reportVerbose(const MinPulseWidthCheck *check) const; - void reportCheck(MinPeriodCheck *check, - bool verbose); - void reportChecks(MinPeriodCheckSeq *checks, - bool verbose); - void reportPeriodHeaderShort(); - void reportShort(MinPeriodCheck *check); - void reportVerbose(MinPeriodCheck *check); + void reportCheck(const MinPeriodCheck *check, + bool verbose) const; + void reportChecks(const MinPeriodCheckSeq *checks, + bool verbose) const; + void reportPeriodHeaderShort() const; + void reportShort(const MinPeriodCheck *check) const; + void reportVerbose(const MinPeriodCheck *check) const; - void reportCheck(MaxSkewCheck *check, - bool verbose); - void reportChecks(MaxSkewCheckSeq *checks, - bool verbose); - void reportMaxSkewHeaderShort(); - void reportShort(MaxSkewCheck *check); - void reportVerbose(MaxSkewCheck *check); + void reportCheck(const MaxSkewCheck *check, + bool verbose) const; + void reportChecks(const MaxSkewCheckSeq *checks, + bool verbose) const; + void reportMaxSkewHeaderShort() const; + void reportShort(const MaxSkewCheck *check) const; + void reportVerbose(const MaxSkewCheck *check) const; - void reportLimitShortHeader(const ReportField *field); + void reportLimitShortHeader(const ReportField *field) const; void reportLimitShort(const ReportField *field, Pin *pin, float value, float limit, - float slack); + float slack) const; void reportLimitVerbose(const ReportField *field, Pin *pin, const RiseFall *rf, @@ -155,7 +155,7 @@ public: float limit, float slack, const Corner *corner, - const MinMax *min_max); + const MinMax *min_max) const; ReportField *fieldSlew() const { return field_slew_; } ReportField *fieldFanout() const { return field_fanout_; } ReportField *fieldCapacitance() const { return field_capacitance_; } @@ -169,83 +169,83 @@ protected: bool left_justify, Unit *unit, bool enabled); - void reportEndpointHeader(PathEnd *end, - PathEnd *prev_end); + void reportEndpointHeader(const PathEnd *end, + const PathEnd *prev_end) const; void reportShort(const PathEndUnconstrained *end, - PathExpanded &expanded); + const PathExpanded &expanded) const; void reportShort(const PathEndCheck *end, - PathExpanded &expanded); + const PathExpanded &expanded) const; void reportShort(const PathEndLatchCheck *end, - PathExpanded &expanded); + const PathExpanded &expanded) const; void reportShort(const PathEndPathDelay *end, - PathExpanded &expanded); + const PathExpanded &expanded) const; void reportShort(const PathEndOutputDelay *end, - PathExpanded &expanded); + const PathExpanded &expanded) const; void reportShort(const PathEndGatedClock *end, - PathExpanded &expanded); + const PathExpanded &expanded) const; void reportShort(const PathEndDataCheck *end, - PathExpanded &expanded); - void reportEndpoint(const PathEndOutputDelay *end); - void reportEndpointOutputDelay(const PathEndClkConstrained *end); - void reportEndpoint(const PathEndPathDelay *end); - void reportEndpoint(const PathEndGatedClock *end); - string pathEndpoint(PathEnd *end); - string pathStartpoint(PathEnd *end, - PathExpanded &expanded); + const PathExpanded &expanded) const; + void reportEndpoint(const PathEndOutputDelay *end) const; + void reportEndpointOutputDelay(const PathEndClkConstrained *end) const; + void reportEndpoint(const PathEndPathDelay *end) const; + void reportEndpoint(const PathEndGatedClock *end) const; + string pathEndpoint(const PathEnd *end) const; + string pathStartpoint(const PathEnd *end, + const PathExpanded &expanded) const; void reportBorrowing(const PathEndLatchCheck *end, Arrival &borrow, - Arrival &time_given_to_startpoint); - void reportEndpoint(const PathEndDataCheck *end); - const char *clkNetworkDelayIdealProp(bool is_ideal); + Arrival &time_given_to_startpoint) const; + void reportEndpoint(const PathEndDataCheck *end) const; + const char *clkNetworkDelayIdealProp(bool is_ideal) const; - string checkRoleReason(const PathEnd *end); - string checkRoleString(const PathEnd *end); - virtual void reportGroup(const PathEnd *end); + string checkRoleReason(const PathEnd *end) const; + string checkRoleString(const PathEnd *end) const; + virtual void reportGroup(const PathEnd *end) const; void reportStartpoint(const PathEnd *end, - PathExpanded &expanded); + const PathExpanded &expanded) const; void reportUnclockedEndpoint(const PathEnd *end, - const char *default_reason); - void reportEndpoint(const PathEndCheck *end); - void reportEndpoint(const PathEndLatchCheck *end); - const char *latchDesc(const PathEndLatchCheck *end); + const char *default_reason) const; + void reportEndpoint(const PathEndCheck *end) const; + void reportEndpoint(const PathEndLatchCheck *end) const; + const char *latchDesc(const PathEndLatchCheck *end) const; void reportStartpoint(const char *start, - string reason); + const string reason) const; void reportEndpoint(const char *end, - string reason); + const string reason) const; void reportStartEndPoint(const char *pt, - string reason, - const char *key); - string tgtClkName(const PathEnd *end); - const char *clkRegLatchDesc(const PathEnd *end); + const string reason, + const char *key) const; + string tgtClkName(const PathEnd *end) const; + const char *clkRegLatchDesc(const PathEnd *end) const; void reportSrcPath(const PathEnd *end, - PathExpanded &expanded); - void reportTgtClk(const PathEnd *end); + const PathExpanded &expanded) const; + void reportTgtClk(const PathEnd *end) const; void reportTgtClk(const PathEnd *end, - float prev_time); + float prev_time) const; void reportTgtClk(const PathEnd *end, float prev_time, - bool is_prop); + bool is_prop) const; void reportTgtClk(const PathEnd *end, float prev_time, float src_offset, - bool is_prop); + bool is_prop) const; bool pathFromGenPropClk(const Path *clk_path, - const EarlyLate *early_late); + const EarlyLate *early_late) const; bool isGenPropClk(const Clock *clk, const RiseFall *clk_rf, const MinMax *min_max, - const EarlyLate *early_late); + const EarlyLate *early_late) const; void reportSrcClkAndPath(const Path *path, - PathExpanded &expanded, + const PathExpanded &expanded, float time_offset, Arrival clk_insertion, Arrival clk_latency, - bool is_path_delay); + bool is_path_delay) const; bool reportGenClkSrcPath(const Path *clk_path, const Clock *clk, const RiseFall *clk_rf, const MinMax *min_max, - const EarlyLate *early_late); + const EarlyLate *early_late) const; void reportGenClkSrcAndPath(const Path *path, const Clock *clk, const RiseFall *clk_rf, @@ -253,7 +253,7 @@ protected: const PathAnalysisPt *path_ap, float time_offset, float path_time_offset, - bool clk_used_as_data); + bool clk_used_as_data) const; bool reportGenClkSrcPath1(const Clock *clk, const Pin *clk_pin, const RiseFall *clk_rf, @@ -261,99 +261,99 @@ protected: const PathAnalysisPt *path_ap, float gclk_time, float time_offset, - bool clk_used_as_data); + bool clk_used_as_data) const; void reportClkSrcLatency(Arrival insertion, float clk_time, - const EarlyLate *early_late); + const EarlyLate *early_late) const; void reportPathLine(const Path *path, Delay incr, Arrival time, - const char *line_case); + const char *line_case) const; void reportCommonClkPessimism(const PathEnd *end, - Arrival &clk_arrival); + Arrival &clk_arrival) const ; void reportClkUncertainty(const PathEnd *end, - Arrival &clk_arrival); + Arrival &clk_arrival) const ; void reportClkLine(const Clock *clk, const char *clk_name, const RiseFall *clk_rf, Arrival clk_time, - const MinMax *min_max); + const MinMax *min_max) const ; void reportClkLine(const Clock *clk, const char *clk_name, const RiseFall *clk_rf, Arrival prev_time, Arrival clk_time, - const MinMax *min_max); + const MinMax *min_max) const ; void reportRequired(const PathEnd *end, - string margin_msg); - void reportSlack(const PathEnd *end); - void reportSlack(Slack slack); - void reportSpaceSlack(PathEnd *end, - string &line); + string margin_msg) const ; + void reportSlack(const PathEnd *end) const ; + void reportSlack(Slack slack) const ; + void reportSpaceSlack(const PathEnd *end, + string &line) const ; void reportSpaceSlack(Slack slack, - string &line); + string &line) const ; void reportSrcPathArrival(const PathEnd *end, - PathExpanded &expanded); + const PathExpanded &expanded) const ; void reportPath(const PathEnd *end, - PathExpanded &expanded); - void reportPathFull(const Path *path); - void reportPathHeader(); + const PathExpanded &expanded) const; + void reportPathFull(const Path *path) const; + void reportPathHeader() const; void reportPath1(const Path *path, - PathExpanded &expanded, + const PathExpanded &expanded, bool clk_used_as_data, - float time_offset); + float time_offset) const; void reportPath2(const Path *path, - PathExpanded &expanded, + const PathExpanded &expanded, bool clk_used_as_data, - float time_offset); + float time_offset) const; void reportPath3(const Path *path, - PathExpanded &expanded, + const PathExpanded &expanded, bool clk_used_as_data, bool report_clk_path, Arrival prev_time, - float time_offset); + float time_offset) const; void reportPath4(const Path *path, - PathExpanded &expanded, + const PathExpanded &expanded, bool clk_used_as_data, bool skip_first_path, bool skip_last_path, - float time_offset); + float time_offset) const; void reportPath5(const Path *path, - PathExpanded &expanded, + const PathExpanded &expanded, size_t path_first_index, size_t path_last_index, bool propagated_clk, bool report_clk_path, Arrival prev_time, - float time_offset); + float time_offset) const; void reportHierPinsThru(const Path *path, - const TimingArc *prev_arc); + const TimingArc *prev_arc) const; void reportInputExternalDelay(const Path *path, - float time_offset); + float time_offset) const; void reportLine(const char *what, Delay total, - const EarlyLate *early_late); + const EarlyLate *early_late) const; void reportLineNegative(const char *what, Delay total, - const EarlyLate *early_late); + const EarlyLate *early_late) const; void reportLine(const char *what, Delay total, const EarlyLate *early_late, - const RiseFall *rf); + const RiseFall *rf) const; void reportLine(const char *what, Delay incr, Delay total, - const EarlyLate *early_late); + const EarlyLate *early_late) const; void reportLine(const char *what, Delay incr, Delay total, const EarlyLate *early_late, - const RiseFall *rf); + const RiseFall *rf) const; void reportLine(const char *what, Slew slew, Delay incr, Delay total, - const EarlyLate *early_late); + const EarlyLate *early_late) const; void reportLine(const char *what, float cap, Slew slew, @@ -364,106 +364,106 @@ protected: const EarlyLate *early_late, const RiseFall *rf, string src_attr, - const char *line_case); + const char *line_case) const; void reportLineTotal(const char *what, Delay incr, - const EarlyLate *early_late); + const EarlyLate *early_late) const; void reportLineTotalMinus(const char *what, Delay decr, - const EarlyLate *early_late); + const EarlyLate *early_late) const; void reportLineTotal1(const char *what, Delay incr, bool incr_with_minus, - const EarlyLate *early_late); - void reportDashLineTotal(); + const EarlyLate *early_late) const; + void reportDashLineTotal() const; void reportDescription(const char *what, - string &result); + string &result) const; void reportDescription(const char *what, bool first_field, bool last_field, - string &result); + string &result) const; void reportFieldTime(float value, ReportField *field, - string &result); + string &result) const; void reportSpaceFieldTime(float value, - string &result); + string &result) const; void reportSpaceFieldDelay(Delay value, const EarlyLate *early_late, - string &result); + string &result) const; void reportFieldDelayMinus(Delay value, const EarlyLate *early_late, - ReportField *field, - string &result); + const ReportField *field, + string &result) const; void reportTotalDelay(Delay value, const EarlyLate *early_late, - string &result); + string &result) const; void reportFieldDelay(Delay value, const EarlyLate *early_late, - ReportField *field, - string &result); + const ReportField *field, + string &result) const; void reportField(float value, const ReportField *field, - string &result); + string &result) const; void reportField(const char *value, const ReportField *field, - string &result); + string &result) const; void reportFieldBlank(const ReportField *field, - string &result); - void reportDashLine(); - void reportDashLine(int line_width); - void reportBlankLine(); - string descriptionField(Vertex *vertex); - string descriptionField(const Pin *pin); - string descriptionNet(const Pin *pin); + string &result) const; + void reportDashLine() const; + void reportDashLine(int line_width) const; + void reportBlankLine() const; + string descriptionField(const Vertex *vertex) const; + string descriptionField(const Pin *pin) const; + string descriptionNet(const Pin *pin) const; bool reportClkPath() const; string clkName(const Clock *clk, - bool inverted); + bool inverted) const; bool hasExtInputDriver(const Pin *pin, const RiseFall *rf, - const MinMax *min_max); + const MinMax *min_max) const; float drvrFanout(Vertex *drvr, const Corner *corner, - const MinMax *min_max); - const char *mpwCheckHiLow(MinPulseWidthCheck *check); + const MinMax *min_max) const; + const char *mpwCheckHiLow(const MinPulseWidthCheck *check) const; void reportSkewClkPath(const char *arrival_msg, - const PathVertex *clk_path); - const char *edgeRegLatchDesc(Edge *edge, - TimingArc *arc); + const PathVertex *clk_path) const; + const char *edgeRegLatchDesc(const Edge *edge, + const TimingArc *arc) const; const char *checkRegLatchDesc(const TimingRole *role, const RiseFall *clk_rf) const; const char *regDesc(const RiseFall *clk_rf) const; const char *latchDesc(const RiseFall *clk_rf) const; void pathClkPath(const Path *path, - PathRef &clk_path) const; - bool isPropagated(const Path *clk_path); + const PathRef &clk_path) const; + bool isPropagated(const Path *clk_path) const; bool isPropagated(const Path *clk_path, - const Clock *clk); - bool pathFromClkPin(PathExpanded &expanded); + const Clock *clk) const; + bool pathFromClkPin(const PathExpanded &expanded) const; bool pathFromClkPin(const Path *path, - const Pin *start_pin); + const Pin *start_pin) const; void latchPaths(const Path *path, - // Return values. - PathRef &d_path, + // Return values. + PathRef &d_path, PathRef &q_path, Edge *&d_q_edge) const; bool nextArcAnnotated(const PathRef *next_path, size_t next_index, - PathExpanded &expanded, - DcalcAPIndex ap_index); + const PathExpanded &expanded, + DcalcAPIndex ap_index) const; float tgtClkInsertionOffet(const Path *clk_path, const EarlyLate *early_late, - PathAnalysisPt *path_ap); + const PathAnalysisPt *path_ap) const; // InputDelay used to seed path root. InputDelay *pathInputDelay(const Path *path) const; void pathInputDelayRefPath(const Path *path, - InputDelay *input_delay, + const InputDelay *input_delay, // Return value. - PathRef &ref_path); - const char *asRisingFalling(const RiseFall *rf); - const char *asRiseFall(const RiseFall *rf); + PathRef &ref_path) const; + const char *asRisingFalling(const RiseFall *rf) const; + const char *asRiseFall(const RiseFall *rf) const; Delay delayIncr(Delay time, Delay prev, - const MinMax *min_max); + const MinMax *min_max) const; // Path options. ReportPathFormat format_; diff --git a/search/Search.cc b/search/Search.cc index 5639d4f0..96589391 100644 --- a/search/Search.cc +++ b/search/Search.cc @@ -2997,9 +2997,9 @@ Search::clkInfoCount() const } ArcDelay -Search::deratedDelay(Vertex *from_vertex, - TimingArc *arc, - Edge *edge, +Search::deratedDelay(const Vertex *from_vertex, + const TimingArc *arc, + const Edge *edge, bool is_clk, const PathAnalysisPt *path_ap) { @@ -3011,9 +3011,9 @@ Search::deratedDelay(Vertex *from_vertex, } float -Search::timingDerate(Vertex *from_vertex, - TimingArc *arc, - Edge *edge, +Search::timingDerate(const Vertex *from_vertex, + const TimingArc *arc, + const Edge *edge, bool is_clk, const PathAnalysisPt *path_ap) { diff --git a/search/Sta.cc b/search/Sta.cc index 5c349726..56503d56 100644 --- a/search/Sta.cc +++ b/search/Sta.cc @@ -2574,7 +2574,7 @@ Sta::reportPathEnds(PathEndSeq *ends) } void -Sta::reportPath(Path *path) +Sta::reportPath(const Path *path) { report_path_->reportPath(path); } @@ -3177,7 +3177,7 @@ bool MinPeriodEndVisitor::pathIsFromInputPort(PathEnd *path_end) { PathExpanded expanded(path_end->path(), sta_); - PathRef *start = expanded.startPath(); + const PathRef *start = expanded.startPath(); Graph *graph = sta_->graph(); const Pin *first_pin = start->pin(graph); Network *network = sta_->network(); diff --git a/spice/WritePathSpice.cc b/spice/WritePathSpice.cc index 7db01a26..bc4136ca 100644 --- a/spice/WritePathSpice.cc +++ b/spice/WritePathSpice.cc @@ -220,7 +220,7 @@ WritePathSpice::writeSpice() void WritePathSpice::writeHeader() { - Path *start_path = path_expanded_.startPath(); + const Path *start_path = path_expanded_.startPath(); string title = stdstrPrint("Path from %s %s to %s %s", network_->pathName(start_path->pin(this)), start_path->transition(this)->asString(),