Skip to content

Commit

Permalink
Merge remote-tracking branch 'parallax/master'
Browse files Browse the repository at this point in the history
Signed-off-by: Eder Monteiro <[email protected]>
  • Loading branch information
eder-matheus committed Dec 9, 2024
2 parents aa598a2 + a976bba commit 3878318
Show file tree
Hide file tree
Showing 60 changed files with 1,145 additions and 813 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ set(CXX_FLAGS -Wall -Wextra -pedantic -Wcast-qual -Wredundant-decls -Wformat-sec

if(USE_SANITIZE)
message(STATUS "Sanitize: ${USE_SANITIZE}")
set(CXX_FLAGS "${CXX_FLAGS};-fsanitize=address;-fno-omit-frame-pointer;-fno-common")
set(CMAKE_EXE_LINKER_FLAGS "-fsanitize=address")
set(CXX_FLAGS "${CXX_FLAGS};-fsanitize=thread")
set(CMAKE_EXE_LINKER_FLAGS "-fsanitize=thread")
endif()

target_compile_options(OpenSTA
Expand Down
8 changes: 4 additions & 4 deletions dcalc/CcsCeffDelayCalc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ CcsCeffDelayCalc::makeResult(const LibertyLibrary *drvr_library,
dcalc_result.setGateDelay(gate_delay);
dcalc_result.setDrvrSlew(drvr_slew);

for (const auto [load_pin, load_idx] : load_pin_index_map) {
for (const auto &[load_pin, load_idx] : load_pin_index_map) {
ArcDelay wire_delay;
Slew load_slew;
loadDelaySlew(load_pin, drvr_library, rf, drvr_slew, wire_delay, load_slew);
Expand Down Expand Up @@ -452,9 +452,9 @@ CcsCeffDelayCalc::findVlTime(double v,
double t_init = region_ramp_times_[0];
double t_final = region_ramp_times_[region_count_];
bool root_fail = false;
double time = findRoot([=] (double t,
double &y,
double &dy) {
double time = findRoot([&] (double t,
double &y,
double &dy) {
vl(t, elmore, y, dy);
y -= v;
}, t_init, t_final + elmore * 3.0, .001, 20, root_fail);
Expand Down
8 changes: 4 additions & 4 deletions dcalc/DmpCeff.cc
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ DmpAlg::findDriverParams(double ceff)
x_[DmpParam::dt] = dt;
x_[DmpParam::t0] = t0;
newtonRaphson(100, x_, nr_order_, driver_param_tol,
[=] () { evalDmpEqns(); },
[this] () { evalDmpEqns(); },
fvec_, fjac_, index_, p_, scale_);
t0_ = x_[DmpParam::t0];
dt_ = x_[DmpParam::dt];
Expand Down Expand Up @@ -494,7 +494,7 @@ DmpAlg::findVoCrossing(double vth,
double t_lower,
double t_upper)
{
FindRootFunc vo_func = [=] (double t,
FindRootFunc vo_func = [&] (double t,
double &y,
double &dy) {
double vo, vo_dt;
Expand Down Expand Up @@ -612,7 +612,7 @@ DmpAlg::findVlCrossing(double vth,
double t_lower,
double t_upper)
{
FindRootFunc vl_func = [=] (double t,
FindRootFunc vl_func = [&] (double t,
double &y,
double &dy) {
double vl, vl_dt;
Expand Down Expand Up @@ -1516,7 +1516,7 @@ DmpCeffDelayCalc::gateDelay(const Pin *drvr_pin,
dcalc_result.setGateDelay(gate_delay);
dcalc_result.setDrvrSlew(drvr_slew);

for (const auto [load_pin, load_idx] : load_pin_index_map) {
for (const auto &[load_pin, load_idx] : load_pin_index_map) {
ArcDelay wire_delay;
Slew load_slew;
loadDelaySlew(load_pin, drvr_slew, rf, drvr_library, parasitic,
Expand Down
2 changes: 1 addition & 1 deletion dcalc/FindRoot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include "FindRoot.hh"

#include <algorithm> // abs
#include <cmath> // abs

namespace sta {

Expand Down
2 changes: 1 addition & 1 deletion dcalc/ParallelDelayCalc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ ParallelDelayCalc::gateDelaysParallel(ArcDcalcArgSeq &dcalc_args,
slew_sum += 1.0 / drvr_slew;

dcalc_result.setLoadCount(load_pin_index_map.size());
for (const auto [load_pin, load_idx] : load_pin_index_map) {
for (const auto &[load_pin, load_idx] : load_pin_index_map) {
dcalc_result.setWireDelay(load_idx, gate_result.wireDelay(load_idx));
dcalc_result.setLoadSlew(load_idx, gate_result.loadSlew(load_idx));
}
Expand Down
3 changes: 3 additions & 0 deletions doc/ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ is now supported by the the read_saif command.

read_saif [-scope scope] filename

The report_checks -group_count option has been renamed to -group_path_count.
The report_checks -endpoing_count option has been renamed to -endpoint_path_count.

Release 2.5.0 2024/01/17
-------------------------

Expand Down
Binary file modified doc/OpenSTA.odt
Binary file not shown.
Binary file modified doc/OpenSTA.pdf
Binary file not shown.
693 changes: 349 additions & 344 deletions doc/messages.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions include/sta/Clock.hh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public:
int index() const { return index_; }
bool isPropagated() const { return is_propagated_; }
void setIsPropagated(bool propagated);
bool isIdeal() const { return !is_propagated_; }
// Ideal clock slew.
void slew(const RiseFall *rf,
const MinMax *min_max,
Expand Down
2 changes: 1 addition & 1 deletion include/sta/ConcreteLibrary.hh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class LibertyCell;
class LibertyPort;

typedef Map<const char*, ConcreteCell*, CharPtrLess> ConcreteCellMap;
typedef Map<string, string> AttributeMap;
typedef std::map<string, string> AttributeMap;
typedef Vector<ConcretePort*> ConcretePortSeq;
typedef Map<const char*, ConcretePort*, CharPtrLess> ConcretePortMap;
typedef ConcreteCellMap::ConstIterator ConcreteLibraryCellIterator;
Expand Down
2 changes: 1 addition & 1 deletion include/sta/ConcreteNetwork.hh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ConcreteBindingTbl;
class ConcreteLibertyLibraryIterator;

typedef Vector<ConcreteLibrary*> ConcreteLibrarySeq;
typedef Map<string, string> AttributeMap;
typedef std::map<string, string> AttributeMap;
typedef Map<const char*, ConcreteLibrary*, CharPtrLess> ConcreteLibraryMap;
typedef ConcreteLibrarySeq::ConstIterator ConcreteLibraryIterator;
typedef Map<const char *, ConcreteInstance*,
Expand Down
2 changes: 2 additions & 0 deletions include/sta/Liberty.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1147,5 +1147,7 @@ private:

string
portLibertyToSta(const char *port_name);
const char *
scanSignalTypeName(ScanSignalType scan_type);

} // namespace
1 change: 0 additions & 1 deletion include/sta/LibertyClass.hh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class TableAxis;
class GateTimingModel;
class CheckTimingModel;
class ScaleFactors;
class Group;
class Wireload;
class WireloadSelection;
class TimingArcSet;
Expand Down
3 changes: 3 additions & 0 deletions include/sta/PathEnd.hh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public:
// Required time with source clock offset.
virtual Required requiredTimeOffset(const StaState *sta) const;
virtual ArcDelay margin(const StaState *sta) const = 0;
virtual float macroClkTreeDelay(const StaState *) const { return 0.0; }
virtual Slack slack(const StaState *sta) const = 0;
virtual Slack slackNoCrpr(const StaState *sta) const = 0;
virtual Arrival borrow(const StaState *sta) const;
Expand Down Expand Up @@ -324,6 +325,7 @@ public:
virtual void reportFull(ReportPath *report) const;
virtual bool isCheck() const { return true; }
virtual ArcDelay margin(const StaState *sta) const;
virtual float macroClkTreeDelay(const StaState *sta) const;
virtual TimingRole *checkRole(const StaState *sta) const;
virtual TimingArc *checkArc() const { return check_arc_; }
virtual int exceptPathCmp(const PathEnd *path_end,
Expand All @@ -339,6 +341,7 @@ protected:
Crpr crpr,
bool crpr_valid);
Delay sourceClkDelay(const StaState *sta) const;
virtual Required requiredTimeNoCrpr(const StaState *sta) const;

TimingArc *check_arc_;
Edge *check_edge_;
Expand Down
42 changes: 21 additions & 21 deletions include/sta/PathGroup.hh
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ public:
virtual ~PathGroup();
// Path group that compares compare slacks.
static PathGroup *makePathGroupArrival(const char *name,
int group_count,
int endpoint_count,
int group_path_count,
int endpoint_path_count,
bool unique_pins,
const MinMax *min_max,
const StaState *sta);
// Path group that compares arrival time, sorted by min_max.
static PathGroup *makePathGroupSlack(const char *name,
int group_count,
int endpoint_count,
int group_path_count,
int endpoint_path_count,
bool unique_pins,
float min_slack,
float max_slack,
Expand All @@ -57,20 +57,20 @@ public:
const MinMax *minMax() const { return min_max_;}
const PathEndSeq &pathEnds() const { return path_ends_; }
void insert(PathEnd *path_end);
// Push group_count into path_ends.
// Push group_path_count into path_ends.
void pushEnds(PathEndSeq &path_ends);
// Predicates to determine if a PathEnd is worth saving.
virtual bool savable(PathEnd *path_end);
int maxPaths() const { return group_count_; }
int maxPaths() const { return group_path_count_; }
PathGroupIterator *iterator();
// This does NOT delete the path ends.
void clear();
static int group_count_max;
static int group_path_count_max;

protected:
PathGroup(const char *name,
int group_count,
int endpoint_count,
int group_path_count,
int endpoint_path_count,
bool unique_pins,
float min_slack,
float max_slack,
Expand All @@ -82,8 +82,8 @@ protected:
void sort();

const char *name_;
int group_count_;
int endpoint_count_;
int group_path_count_;
int endpoint_path_count_;
bool unique_pins_;
float slack_min_;
float slack_max_;
Expand All @@ -98,8 +98,8 @@ protected:
class PathGroups : public StaState
{
public:
PathGroups(int group_count,
int endpoint_count,
PathGroups(int group_path_count,
int endpoint_path_count,
bool unique_pins,
float slack_min,
float slack_max,
Expand Down Expand Up @@ -130,8 +130,8 @@ public:

protected:
void makeGroupPathEnds(ExceptionTo *to,
int group_count,
int endpoint_count,
int group_path_count,
int endpoint_path_count,
bool unique_pins,
const Corner *corner,
const MinMaxAll *min_max);
Expand All @@ -144,17 +144,17 @@ protected:
const MinMaxAll *min_max,
PathEndVisitor *visitor);
void enumPathEnds(PathGroup *group,
int group_count,
int endpoint_count,
int group_path_count,
int endpoint_path_count,
bool unique_pins,
bool cmp_slack);

void pushGroupPathEnds(PathEndSeq &path_ends);
void pushUnconstrainedPathEnds(PathEndSeq &path_ends,
const MinMaxAll *min_max);

void makeGroups(int group_count,
int endpoint_count,
void makeGroups(int group_path_count,
int endpoint_path_count,
bool unique_pins,
float slack_min,
float slack_max,
Expand All @@ -168,8 +168,8 @@ protected:
PathGroupNameSet *group_names) const;
GroupPath *groupPathTo(const PathEnd *path_end) const;

int group_count_;
int endpoint_count_;
int group_path_count_;
int endpoint_path_count_;
bool unique_pins_;
float slack_min_;
float slack_max_;
Expand Down
21 changes: 17 additions & 4 deletions include/sta/Sdc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,18 @@ private:
const Network *network_;
};

class NetWireCaps : public MinMaxFloatValues
{
public:
NetWireCaps();
bool subtractPinCap(const MinMax *min_max);
void setSubtractPinCap(bool subtrace_pin_cap,
const MinMax *min_max);

private:
bool subtract_pin_cap_[MinMax::index_count];
};

typedef Map<const char*,Clock*, CharPtrLess> ClockNameMap;
typedef UnorderedMap<const Pin*, ClockSet*, PinIdHash> ClockPinMap;
typedef Set<InputDelay*> InputDelaySet;
Expand Down Expand Up @@ -149,8 +161,8 @@ typedef Map<const Pin*, MinMaxFloatValues> PinCapLimitMap;
typedef Map<const Port*, MinMaxFloatValues> PortFanoutLimitMap;
typedef Map<const Cell*, MinMaxFloatValues> CellFanoutLimitMap;
typedef Map<const Port*, PortExtCap*, PortIdLess> PortExtCapMap;
typedef Map<const Net*, MinMaxFloatValues, NetIdLess> NetWireCapMap;
typedef Map<const Pin*, MinMaxFloatValues*, PinIdLess> PinWireCapMap;
typedef Map<const Net*, NetWireCaps, NetIdLess> NetWireCapMap;
typedef Map<const Pin*, NetWireCaps*, PinIdLess> PinWireCapMap;
typedef Map<const Instance*, Pvt*> InstancePvtMap;
typedef Map<const Edge*, ClockLatency*> EdgeClockLatencyMap;
typedef Map<const Pin*, RiseFallValues*> PinMinPulseWidthMap;
Expand Down Expand Up @@ -595,7 +607,7 @@ public:
bool subtract_pin_cap,
const Corner *corner,
const MinMax *min_max,
float cap);
float wire_cap);
bool hasNetWireCap(const Net *net) const;
// True if driver pin net has wire capacitance.
bool drvrPinHasWireCap(const Pin *pin,
Expand All @@ -606,7 +618,8 @@ public:
const MinMax *min_max,
// Return values.
float &cap,
bool &exists) const;
bool &exists,
bool &subtract_pin_cap) const;
// Pin capacitance derated by operating conditions and instance pvt.
float pinCapacitance(const Pin *pin,
const RiseFall *rf,
Expand Down
10 changes: 6 additions & 4 deletions include/sta/Search.hh
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ public:
bool unconstrained,
const Corner *corner,
const MinMaxAll *min_max,
int group_count,
int endpoint_count,
int group_path_count,
int endpoint_path_count,
bool unique_pins,
float slack_min,
float slack_max,
Expand Down Expand Up @@ -156,8 +156,8 @@ public:

PathGroup *pathGroup(const PathEnd *path_end) const;
void deletePathGroups();
void makePathGroups(int group_count,
int endpoint_count,
void makePathGroups(int group_path_count,
int endpoint_path_count,
bool unique_pins,
float min_slack,
float max_slack,
Expand Down Expand Up @@ -583,12 +583,14 @@ protected:
// Entries in tags_ may be missing where previous filter tags were deleted.
TagIndex tag_capacity_;
Tag **tags_;
Tag **tags_prev_;
TagIndex tag_next_;
// Holes in tags_ left by deleting filter tags.
std::vector<TagIndex> tag_free_indices_;
std::mutex tag_lock_;
TagGroupSet *tag_group_set_;
TagGroup **tag_groups_;
TagGroup **tag_groups_prev_;
TagGroupIndex tag_group_next_;
// Holes in tag_groups_ left by deleting filter tag groups.
std::vector<TagIndex> tag_group_free_indices_;
Expand Down
6 changes: 3 additions & 3 deletions include/sta/Sta.hh
Original file line number Diff line number Diff line change
Expand Up @@ -862,11 +862,11 @@ public:
const MinMaxAll *min_max,
// Number of path ends to report in
// each group.
int group_count,
int group_path_count,
// Number of paths to report for
// each endpoint.
int endpoint_count,
// endpoint_count paths report unique pins
int endpoint_path_count,
// endpoint_path_count paths report unique pins
// without rise/fall variations.
bool unique_pins,
// Min/max bounds for slack of
Expand Down
Loading

0 comments on commit 3878318

Please sign in to comment.