mirror of
https://github.com/The-OpenROAD-Project/OpenSTA.git
synced 2026-08-31 10:04:55 +02:00
tidy round1
This commit is contained in:
@@ -63,7 +63,7 @@ public:
|
||||
const Pin *drvr_pin,
|
||||
Edge *edge,
|
||||
const TimingArc *arc,
|
||||
const Slew in_slew,
|
||||
Slew in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *parasitic);
|
||||
ArcDcalcArg(const Pin *in_pin,
|
||||
@@ -160,7 +160,6 @@ class ArcDelayCalc : public StaState
|
||||
{
|
||||
public:
|
||||
ArcDelayCalc(StaState *sta);
|
||||
virtual ~ArcDelayCalc() {}
|
||||
virtual ArcDelayCalc *copy() = 0;
|
||||
virtual std::string_view name() const = 0;
|
||||
|
||||
@@ -262,4 +261,4 @@ public:
|
||||
virtual void finishDrvrPin() = 0;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+2
-2
@@ -41,7 +41,7 @@ class Bdd : public StaState
|
||||
{
|
||||
public:
|
||||
Bdd(const StaState *sta);
|
||||
~Bdd();
|
||||
~Bdd() override;
|
||||
DdNode *funcBdd(const FuncExpr *expr);
|
||||
DdNode *findNode(const LibertyPort *port);
|
||||
const LibertyPort *nodePort(DdNode *node);
|
||||
@@ -58,4 +58,4 @@ private:
|
||||
BddVarIdxPortMap bdd_var_idx_port_map_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+5
-5
@@ -50,10 +50,10 @@ using LevelQueue = std::vector<VertexSeq>;
|
||||
// Vertices are marked as being in the queue by using a flag on
|
||||
// the vertex indexed by bfs_index. A unique flag is only needed
|
||||
// if the BFS in in use when other BFS's are simultaneously in use.
|
||||
class BfsIterator : public StaState, Iterator<Vertex*>
|
||||
class BfsIterator : public StaState,
|
||||
public Iterator<Vertex*>
|
||||
{
|
||||
public:
|
||||
virtual ~BfsIterator();
|
||||
// Make sure that the BFS queue is deep enough for the max logic level.
|
||||
void ensureSize();
|
||||
// Reset to virgin state.
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
BfsFwdIterator(BfsIndex bfs_index,
|
||||
SearchPred *search_pred,
|
||||
StaState *sta);
|
||||
virtual ~BfsFwdIterator();
|
||||
~BfsFwdIterator() override;
|
||||
void enqueueAdjacentVertices(Vertex *vertex,
|
||||
SearchPred *search_pred) override;
|
||||
void enqueueAdjacentVertices(Vertex *vertex,
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
BfsBkwdIterator(BfsIndex bfs_index,
|
||||
SearchPred *search_pred,
|
||||
StaState *sta);
|
||||
virtual ~BfsBkwdIterator();
|
||||
~BfsBkwdIterator() override;
|
||||
void enqueueAdjacentVertices(Vertex *vertex,
|
||||
SearchPred *search_pred) override;
|
||||
void enqueueAdjacentVertices(Vertex *vertex,
|
||||
@@ -168,4 +168,4 @@ protected:
|
||||
void incrLevel(Level &level) const override;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -28,4 +28,4 @@ namespace sta {
|
||||
|
||||
enum class CircuitSim { hspice, ngspice, xyce };
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -44,7 +44,7 @@ class ClkNetwork : public StaState
|
||||
public:
|
||||
ClkNetwork(Mode *mode,
|
||||
StaState *sta);
|
||||
~ClkNetwork();
|
||||
~ClkNetwork() override;
|
||||
void ensureClkNetwork();
|
||||
void clear();
|
||||
bool isClock(const Pin *pin) const;
|
||||
@@ -73,9 +73,9 @@ private:
|
||||
|
||||
void findClkPins();
|
||||
void findClkPins(bool ideal_only,
|
||||
PinClksMap &clk_pin_map);
|
||||
PinClksMap &pin_clks_map);
|
||||
|
||||
bool clk_pins_valid_;
|
||||
bool clk_pins_valid_{false};
|
||||
// pin -> clks
|
||||
PinClksMap pin_clks_map_;
|
||||
// pin -> ideal clks
|
||||
@@ -84,4 +84,4 @@ private:
|
||||
ClkPinsMap clk_pins_map_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -82,11 +82,11 @@ public:
|
||||
void removeSlew();
|
||||
const RiseFallMinMax &slews() const { return slews_; }
|
||||
void setSlewLimit(const RiseFallBoth *rf,
|
||||
const PathClkOrData clk_data,
|
||||
PathClkOrData clk_data,
|
||||
const MinMax *min_max,
|
||||
float slew);
|
||||
void slewLimit(const RiseFall *rf,
|
||||
const PathClkOrData clk_data,
|
||||
PathClkOrData clk_data,
|
||||
const MinMax *min_max,
|
||||
// Return values.
|
||||
float &slew,
|
||||
@@ -291,4 +291,4 @@ int
|
||||
compare(const ClockSet *set1,
|
||||
const ClockSet *set2);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -42,4 +42,4 @@ private:
|
||||
LogicValue active_value_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -34,12 +34,12 @@ namespace sta {
|
||||
class ClockGroups : public SdcCmdComment
|
||||
{
|
||||
public:
|
||||
ClockGroups(const std::string &name,
|
||||
ClockGroups(std::string_view name,
|
||||
bool logically_exclusive,
|
||||
bool physically_exclusive,
|
||||
bool asynchronous,
|
||||
bool allow_paths,
|
||||
std::string comment);
|
||||
std::string_view comment);
|
||||
~ClockGroups();
|
||||
void makeClockGroup(ClockSet *clks);
|
||||
const std::string &name() const { return name_; }
|
||||
@@ -59,4 +59,4 @@ private:
|
||||
ClockGroupSet groups_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -57,4 +57,4 @@ private:
|
||||
RiseFallMinMax delays_[EarlyLate::index_count];
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -61,4 +61,4 @@ private:
|
||||
RiseFallMinMax delays_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -127,12 +127,12 @@ public:
|
||||
ConcretePort *makeBundlePort(std::string_view name,
|
||||
ConcretePortSeq *members);
|
||||
// Group previously defined bus bit ports together.
|
||||
void groupBusPorts(const char bus_brkt_left,
|
||||
const char bus_brkt_right,
|
||||
void groupBusPorts(char bus_brkt_left,
|
||||
char bus_brkt_right,
|
||||
std::function<bool(std::string_view)> port_msb_first);
|
||||
size_t portCount() const;
|
||||
void setName(std::string_view name);
|
||||
void addPort(ConcretePort *port);
|
||||
virtual void addPort(ConcretePort *port);
|
||||
void addPortBit(ConcretePort *port);
|
||||
|
||||
protected:
|
||||
@@ -275,4 +275,4 @@ private:
|
||||
ConcretePort *next_;
|
||||
};
|
||||
|
||||
} // Namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -62,7 +62,7 @@ class ConcreteNetwork : public NetworkReader
|
||||
{
|
||||
public:
|
||||
ConcreteNetwork();
|
||||
~ConcreteNetwork();
|
||||
~ConcreteNetwork() override;
|
||||
void clear() override;
|
||||
bool linkNetwork(std::string_view top_cell_name,
|
||||
bool make_black_boxes,
|
||||
@@ -354,7 +354,7 @@ public:
|
||||
void setVertexId(VertexId id);
|
||||
|
||||
protected:
|
||||
~ConcretePin() {}
|
||||
~ConcretePin() = default;
|
||||
ConcretePin(ConcreteInstance *instance,
|
||||
ConcretePort *port,
|
||||
ConcreteNet *net);
|
||||
@@ -384,7 +384,7 @@ public:
|
||||
ConcretePin *pin() const { return pin_; }
|
||||
|
||||
protected:
|
||||
~ConcreteTerm() {}
|
||||
~ConcreteTerm() = default;
|
||||
ConcreteTerm(ConcretePin *pin,
|
||||
ConcreteNet *net);
|
||||
|
||||
@@ -432,4 +432,4 @@ protected:
|
||||
friend class ConcreteNetPinIterator;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -42,7 +42,8 @@ namespace sta {
|
||||
// 1. Sequence containers (vector<T*>, list<T*>, deque<T*>, …)
|
||||
// ------------------------------------------------------------
|
||||
template <typename Container>
|
||||
std::enable_if_t<std::is_pointer_v<typename Container::value_type>>
|
||||
requires std::is_pointer_v<typename Container::value_type>
|
||||
void
|
||||
deleteContents(Container& c)
|
||||
{
|
||||
for (auto ptr : c)
|
||||
@@ -51,7 +52,8 @@ deleteContents(Container& c)
|
||||
}
|
||||
|
||||
template <typename Container>
|
||||
std::enable_if_t<std::is_pointer_v<typename Container::value_type>>
|
||||
requires std::is_pointer_v<typename Container::value_type>
|
||||
void
|
||||
deleteContents(Container *c)
|
||||
{
|
||||
for (auto ptr : *c)
|
||||
@@ -63,8 +65,8 @@ deleteContents(Container *c)
|
||||
// 2. Maps (map<K, T*>, unordered_map<K, T*>)
|
||||
// ------------------------------------------------------------
|
||||
template <typename Map>
|
||||
std::enable_if_t<std::is_pointer_v<typename Map::mapped_type>
|
||||
>
|
||||
requires std::is_pointer_v<typename Map::mapped_type>
|
||||
void
|
||||
deleteContents(Map& m)
|
||||
{
|
||||
for (auto& kv : m)
|
||||
@@ -73,8 +75,8 @@ deleteContents(Map& m)
|
||||
}
|
||||
|
||||
template <typename Map>
|
||||
std::enable_if_t<std::is_pointer_v<typename Map::mapped_type>
|
||||
>
|
||||
requires std::is_pointer_v<typename Map::mapped_type>
|
||||
void
|
||||
deleteContents(Map *m)
|
||||
{
|
||||
for (auto& kv : *m)
|
||||
@@ -86,10 +88,10 @@ deleteContents(Map *m)
|
||||
// 3. Sets (set<T*>, unordered_set<T*>)
|
||||
// ------------------------------------------------------------
|
||||
template <typename Set>
|
||||
std::enable_if_t<
|
||||
std::is_pointer_v<typename Set::value_type> &&
|
||||
!std::is_same_v<typename Set::value_type, typename Set::mapped_type>
|
||||
>
|
||||
requires (std::is_pointer_v<typename Set::value_type> &&
|
||||
requires { typename Set::mapped_type; } &&
|
||||
!std::is_same_v<typename Set::value_type, typename Set::mapped_type>)
|
||||
void
|
||||
deleteContents(Set& s)
|
||||
{
|
||||
for (auto ptr : s)
|
||||
@@ -119,28 +121,28 @@ struct find_return;
|
||||
template<typename C>
|
||||
struct find_return<C*, true>
|
||||
{
|
||||
using type = typename C::mapped_type;
|
||||
using type = C::mapped_type;
|
||||
};
|
||||
|
||||
// pointer to set
|
||||
template<typename C>
|
||||
struct find_return<C*, false>
|
||||
{
|
||||
using type = typename C::key_type;
|
||||
using type = C::key_type;
|
||||
};
|
||||
|
||||
// map ref
|
||||
template<typename C>
|
||||
struct find_return<C, true>
|
||||
{
|
||||
using type = typename C::mapped_type;
|
||||
using type = C::mapped_type;
|
||||
};
|
||||
|
||||
// set ref
|
||||
template<typename C>
|
||||
struct find_return<C, false>
|
||||
{
|
||||
using type = typename C::key_type;
|
||||
using type = C::key_type;
|
||||
};
|
||||
|
||||
|
||||
@@ -149,10 +151,10 @@ struct find_return<C, false>
|
||||
template<typename AssocContainer>
|
||||
auto
|
||||
findKey(const AssocContainer& c,
|
||||
typename AssocContainer::key_type key)
|
||||
-> typename find_return<AssocContainer>::type
|
||||
const typename AssocContainer::key_type& key)
|
||||
-> find_return<AssocContainer>::type
|
||||
{
|
||||
using ReturnType = typename find_return<AssocContainer>::type;
|
||||
using ReturnType = find_return<AssocContainer>::type;
|
||||
|
||||
static_assert(std::is_pointer_v<ReturnType>,
|
||||
"findKey requires pointer types");
|
||||
@@ -173,9 +175,9 @@ template<typename AssocContainer>
|
||||
auto
|
||||
findStringKey(const AssocContainer& c,
|
||||
std::string_view key)
|
||||
-> typename find_return<AssocContainer>::type
|
||||
-> find_return<AssocContainer>::type
|
||||
{
|
||||
using ReturnType = typename find_return<AssocContainer>::type;
|
||||
using ReturnType = find_return<AssocContainer>::type;
|
||||
|
||||
static_assert(std::is_pointer_v<ReturnType>,
|
||||
"findStringKey requires pointer types");
|
||||
@@ -194,8 +196,8 @@ findStringKey(const AssocContainer& c,
|
||||
template<typename AssocContainer>
|
||||
auto
|
||||
findKeyValue(const AssocContainer& c,
|
||||
typename AssocContainer::key_type key)
|
||||
-> const typename find_return<AssocContainer>::type &
|
||||
const typename AssocContainer::key_type& key)
|
||||
-> const find_return<AssocContainer>::type &
|
||||
{
|
||||
auto it = c.find(key);
|
||||
if (it != c.end()) {
|
||||
@@ -213,7 +215,7 @@ findKeyValue(const AssocContainer& c,
|
||||
template<typename AssocContainer>
|
||||
void
|
||||
findKeyValue(const AssocContainer& c,
|
||||
typename AssocContainer::key_type key,
|
||||
const typename AssocContainer::key_type& key,
|
||||
typename find_return<AssocContainer>::type &value,
|
||||
bool &exists)
|
||||
{
|
||||
@@ -240,7 +242,7 @@ findKeyValue(const AssocContainer& c,
|
||||
template<typename AssocContainer>
|
||||
void
|
||||
findKeyValue(const AssocContainer *c,
|
||||
typename AssocContainer::key_type key,
|
||||
const typename AssocContainer::key_type& key,
|
||||
typename find_return<AssocContainer>::type &value,
|
||||
bool &exists)
|
||||
{
|
||||
@@ -269,8 +271,8 @@ findKeyValue(const AssocContainer *c,
|
||||
template<typename AssocContainer>
|
||||
auto
|
||||
findKeyValuePtr(AssocContainer& c,
|
||||
typename AssocContainer::key_type key)
|
||||
-> typename find_return<AssocContainer>::type*
|
||||
const typename AssocContainer::key_type& key)
|
||||
-> find_return<AssocContainer>::type*
|
||||
{
|
||||
auto it = c.find(key);
|
||||
if (it == c.end())
|
||||
@@ -289,8 +291,8 @@ findKeyValuePtr(AssocContainer& c,
|
||||
template<typename AssocContainer>
|
||||
auto
|
||||
findKeyValuePtr(const AssocContainer& c,
|
||||
typename AssocContainer::key_type key)
|
||||
-> typename find_return<AssocContainer>::type const*
|
||||
const typename AssocContainer::key_type& key)
|
||||
-> find_return<AssocContainer>::type const*
|
||||
{
|
||||
auto it = c.find(key);
|
||||
if (it == c.end())
|
||||
@@ -310,8 +312,8 @@ findKeyValuePtr(const AssocContainer& c,
|
||||
template<typename AssocContainer>
|
||||
auto
|
||||
findStringValuePtr(AssocContainer& c,
|
||||
std::string_view key)
|
||||
-> typename find_return<AssocContainer>::type*
|
||||
std::string_view key)
|
||||
-> find_return<AssocContainer>::type*
|
||||
{
|
||||
auto it = c.find(key);
|
||||
if (it == c.end())
|
||||
@@ -326,8 +328,8 @@ findStringValuePtr(AssocContainer& c,
|
||||
template<typename AssocContainer>
|
||||
auto
|
||||
findStringValuePtr(const AssocContainer& c,
|
||||
std::string_view key)
|
||||
-> typename find_return<AssocContainer>::type const*
|
||||
std::string_view key)
|
||||
-> find_return<AssocContainer>::type const*
|
||||
{
|
||||
auto it = c.find(key);
|
||||
if (it == c.end())
|
||||
@@ -435,7 +437,7 @@ requires std::predicate<Comp&,
|
||||
std::ranges::range_reference_t<Range>>
|
||||
void
|
||||
sort(Range& r,
|
||||
Comp comp = Comp{})
|
||||
const Comp &comp = Comp{})
|
||||
{
|
||||
std::sort(std::ranges::begin(r), std::ranges::end(r), comp);
|
||||
}
|
||||
@@ -450,9 +452,9 @@ requires std::ranges::random_access_range<Range> &&
|
||||
std::ranges::range_reference_t<Range>>
|
||||
void
|
||||
sort(Range* r,
|
||||
Comp comp = Comp{})
|
||||
const Comp &comp = Comp{})
|
||||
{
|
||||
std::sort(std::ranges::begin(*r), std::ranges::end(*r), comp);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -130,4 +130,4 @@ private:
|
||||
bool max_cycles_exceeded_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -79,4 +79,4 @@ private:
|
||||
const Network *network_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -64,9 +64,9 @@ public:
|
||||
protected:
|
||||
Report *report_;
|
||||
std::mutex buffer_lock_;
|
||||
bool debug_on_;
|
||||
bool debug_on_{false};
|
||||
DebugMap debug_map_;
|
||||
int stats_level_;
|
||||
int stats_level_{0};
|
||||
};
|
||||
|
||||
// Inlining a varargs function would eval the args, which can
|
||||
@@ -76,4 +76,4 @@ protected:
|
||||
debug->report(what, fmt __VA_OPT__(,) __VA_ARGS__); \
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+10
-10
@@ -37,16 +37,16 @@ class StaState;
|
||||
class Delay
|
||||
{
|
||||
public:
|
||||
Delay();
|
||||
Delay(float mean);
|
||||
Delay() noexcept;
|
||||
Delay(float mean) noexcept;
|
||||
Delay(float mean,
|
||||
// std_dev^2
|
||||
float std_dev2);
|
||||
float std_dev2) noexcept;
|
||||
Delay(float mean,
|
||||
float mean_shift,
|
||||
// std_dev^2
|
||||
float std_dev2,
|
||||
float skewness);
|
||||
float skewness) noexcept;
|
||||
void setValues(float mean,
|
||||
float mean_shift,
|
||||
float std_dev2,
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
float skewness() const { return values_[3]; }
|
||||
void setSkewness(float skewness);
|
||||
|
||||
void operator=(float delay);
|
||||
Delay &operator=(float delay);
|
||||
// This allows applications that do not support statistical timing
|
||||
// to treat Delays as floats without explicitly converting with
|
||||
// delayAsFloat.
|
||||
@@ -77,8 +77,8 @@ private:
|
||||
class DelayDbl
|
||||
{
|
||||
public:
|
||||
DelayDbl();
|
||||
DelayDbl(double value);
|
||||
DelayDbl() noexcept;
|
||||
DelayDbl(double value) noexcept;
|
||||
double mean() const { return values_[0]; }
|
||||
void setMean(double mean);
|
||||
double meanShift() const { return values_[1]; }
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
double std_dev2,
|
||||
double skewnes);
|
||||
|
||||
void operator=(double delay);
|
||||
DelayDbl &operator=(double delay);
|
||||
|
||||
private:
|
||||
std::array<double, 4> values_;
|
||||
@@ -108,7 +108,7 @@ const Delay delay_zero(0.0);
|
||||
class DelayOps
|
||||
{
|
||||
public:
|
||||
virtual ~DelayOps() {}
|
||||
virtual ~DelayOps() = default;
|
||||
virtual float stdDev2(const Delay &delay,
|
||||
const EarlyLate *early_late) const = 0;
|
||||
virtual float asFloat(const Delay &delay,
|
||||
@@ -356,4 +356,4 @@ Delay
|
||||
delayRemove(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -55,4 +55,4 @@ ArcDelayCalc *
|
||||
makeDelayCalc(std::string_view name,
|
||||
StaState *sta);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// OpenSTA, Static Timing Analyzer
|
||||
// Copyright (c) 2025, Parallax Software, Inc.
|
||||
// Copyright (c) 2026, Parallax Software, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -87,4 +87,4 @@ public:
|
||||
const StaState *sta) const override;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// OpenSTA, Static Timing Analyzer
|
||||
// Copyright (c) 2025, Parallax Software, Inc.
|
||||
// Copyright (c) 2026, Parallax Software, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -87,4 +87,4 @@ public:
|
||||
const StaState *sta) const override;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// OpenSTA, Static Timing Analyzer
|
||||
// Copyright (c) 2025, Parallax Software, Inc.
|
||||
// Copyright (c) 2026, Parallax Software, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -95,4 +95,4 @@ private:
|
||||
double skewness2) const;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -117,4 +117,4 @@ public:
|
||||
DeratingFactorsNet();
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -111,4 +111,4 @@ sortByPathName(const DisabledInstancePortsMap *inst_map,
|
||||
LibertyPortPairSeq
|
||||
sortByName(const LibertyPortPairSet *set);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -18,10 +18,10 @@ namespace sta {
|
||||
|
||||
class DispatchQueue
|
||||
{
|
||||
typedef std::function<void(int thread)> fp_t;
|
||||
using fp_t = std::function<void(int thread)>;
|
||||
|
||||
public:
|
||||
DispatchQueue(size_t thread_cnt);
|
||||
DispatchQueue(size_t thread_count);
|
||||
~DispatchQueue();
|
||||
void setThreadCount(size_t thread_count);
|
||||
size_t getThreadCount() const;
|
||||
@@ -49,4 +49,4 @@ private:
|
||||
bool quit_ = false;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -34,7 +34,8 @@ template <class ENUM>
|
||||
class EnumNameMap
|
||||
{
|
||||
public:
|
||||
EnumNameMap(std::initializer_list<std::pair<const ENUM, std::string>> enum_names);
|
||||
EnumNameMap(std::initializer_list<std::pair<const ENUM,
|
||||
std::string>> enum_names) noexcept;
|
||||
const std::string &find(ENUM key) const;
|
||||
ENUM find(std::string_view name,
|
||||
ENUM unknown_key) const;
|
||||
@@ -49,7 +50,7 @@ private:
|
||||
};
|
||||
|
||||
template <class ENUM>
|
||||
EnumNameMap<ENUM>::EnumNameMap(std::initializer_list<std::pair<const ENUM,std::string>> enum_names) :
|
||||
EnumNameMap<ENUM>::EnumNameMap(std::initializer_list<std::pair<const ENUM,std::string>> enum_names) noexcept :
|
||||
enum_map_(enum_names)
|
||||
{
|
||||
for (const auto& [key, name] : enum_map_)
|
||||
@@ -97,4 +98,4 @@ EnumNameMap<ENUM>::find(std::string_view name,
|
||||
return unknown_key;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -87,4 +87,4 @@ bool
|
||||
equivCellSequentials(const LibertyCell *cell1,
|
||||
const LibertyCell *cell2);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -36,7 +36,6 @@ class Exception : public std::exception
|
||||
{
|
||||
public:
|
||||
Exception();
|
||||
virtual ~Exception() {}
|
||||
const char *what() const noexcept override = 0;
|
||||
};
|
||||
|
||||
@@ -44,7 +43,7 @@ class ExceptionMsg : public Exception
|
||||
{
|
||||
public:
|
||||
ExceptionMsg(const std::string &msg,
|
||||
const bool suppressed);
|
||||
bool suppressed);
|
||||
const char *what() const noexcept override;
|
||||
bool suppressed() const { return suppressed_; }
|
||||
|
||||
@@ -93,4 +92,4 @@ protected:
|
||||
#define criticalError(id, msg) \
|
||||
Report::defaultReport()->fileCritical(id, __FILE__, __LINE__, msg)
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -70,6 +70,7 @@ public:
|
||||
virtual bool isFilter() const { return false; }
|
||||
virtual ExceptionPathType type() const = 0;
|
||||
virtual std::string to_string(const Network *network) const;
|
||||
virtual std::string_view typeString() const = 0;
|
||||
ExceptionFrom *from() const { return from_; }
|
||||
ExceptionThruSeq *thrus() const { return thrus_; }
|
||||
ExceptionTo *to() const { return to_; }
|
||||
@@ -135,7 +136,6 @@ public:
|
||||
virtual bool breakPath() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual const char *typeString() const = 0;
|
||||
std::string fromThruToString(const Network *network) const;
|
||||
void makeStates();
|
||||
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
bool own_pts) override;
|
||||
bool isFalse() const override { return true; }
|
||||
ExceptionPathType type() const override { return ExceptionPathType::false_path; }
|
||||
const char *typeString() const override;
|
||||
std::string_view typeString() const override;
|
||||
bool mergeable(ExceptionPath *exception) const override;
|
||||
bool overrides(ExceptionPath *exception) const override;
|
||||
int typePriority() const override;
|
||||
@@ -188,7 +188,7 @@ public:
|
||||
bool own_pts);
|
||||
bool isLoop() const override { return true; }
|
||||
ExceptionPathType type() const override { return ExceptionPathType::loop; }
|
||||
const char *typeString() const override;
|
||||
std::string_view typeString() const override;
|
||||
bool mergeable(ExceptionPath *exception) const override;
|
||||
};
|
||||
|
||||
@@ -212,7 +212,7 @@ public:
|
||||
bool isPathDelay() const override { return true; }
|
||||
ExceptionPathType type() const override { return ExceptionPathType::path_delay; }
|
||||
std::string to_string(const Network *network) const override;
|
||||
const char *typeString() const override;
|
||||
std::string_view typeString() const override;
|
||||
bool mergeable(ExceptionPath *exception) const override;
|
||||
bool overrides(ExceptionPath *exception) const override;
|
||||
float delay() const override { return delay_; }
|
||||
@@ -248,7 +248,7 @@ public:
|
||||
bool matches(const MinMax *min_max,
|
||||
bool exactly) const override;
|
||||
std::string to_string(const Network *network) const override;
|
||||
const char *typeString() const override;
|
||||
std::string_view typeString() const override;
|
||||
bool mergeable(ExceptionPath *exception) const override;
|
||||
bool overrides(ExceptionPath *exception) const override;
|
||||
bool useEndClk() const override { return use_end_clk_; }
|
||||
@@ -279,7 +279,7 @@ public:
|
||||
bool own_pts) override;
|
||||
bool isFilter() const override { return true; }
|
||||
ExceptionPathType type() const override { return ExceptionPathType::filter; }
|
||||
const char *typeString() const override;
|
||||
std::string_view typeString() const override;
|
||||
bool mergeable(ExceptionPath *exception) const override;
|
||||
bool overrides(ExceptionPath *exception) const override;
|
||||
bool resetMatch(ExceptionFrom *from,
|
||||
@@ -308,7 +308,7 @@ public:
|
||||
bool own_pts) override;
|
||||
bool isGroupPath() const override { return true; }
|
||||
ExceptionPathType type() const override { return ExceptionPathType::group_path; }
|
||||
const char *typeString() const override;
|
||||
std::string_view typeString() const override;
|
||||
bool mergeable(ExceptionPath *exception) const override;
|
||||
bool overrides(ExceptionPath *exception) const override;
|
||||
int typePriority() const override;
|
||||
@@ -327,7 +327,7 @@ class ExceptionPt
|
||||
public:
|
||||
ExceptionPt(const RiseFallBoth *rf,
|
||||
bool own_pts);
|
||||
virtual ~ExceptionPt() {};
|
||||
virtual ~ExceptionPt() = default;
|
||||
virtual bool isFrom() const { return false; }
|
||||
virtual bool isThru() const { return false; }
|
||||
virtual bool isTo() const { return false; }
|
||||
@@ -386,7 +386,7 @@ public:
|
||||
const RiseFallBoth *rf,
|
||||
bool own_pts,
|
||||
const Network *network);
|
||||
~ExceptionFromTo();
|
||||
~ExceptionFromTo() override;
|
||||
PinSet *pins() override { return pins_; }
|
||||
bool hasPins() const;
|
||||
ClockSet *clks() override { return clks_; }
|
||||
@@ -512,7 +512,7 @@ public:
|
||||
const RiseFallBoth *rf,
|
||||
bool own_pts,
|
||||
const Network *network);
|
||||
~ExceptionThru();
|
||||
~ExceptionThru() override;
|
||||
ExceptionThru *clone(const Network *network);
|
||||
std::string to_string(const Network *network) const override;
|
||||
bool isThru() const override { return true; }
|
||||
@@ -538,15 +538,6 @@ public:
|
||||
const Network *network) const;
|
||||
int typePriority() const override { return 2; }
|
||||
size_t objectCount() const override;
|
||||
void connectPinAfter(PinSet *drvrs,
|
||||
Network *network) override;
|
||||
void deletePinBefore(const Pin *pin,
|
||||
Network *network) override;
|
||||
void deleteInstance(const Instance *inst,
|
||||
const Network *network);
|
||||
|
||||
protected:
|
||||
void findHash(const Network *network);
|
||||
void addPin(const Pin *pin,
|
||||
const Network *network) override;
|
||||
void addEdge(const EdgePins &edge,
|
||||
@@ -556,6 +547,15 @@ protected:
|
||||
void addInstance(const Instance *inst,
|
||||
const Network *network) override;
|
||||
void addClock(Clock *) override {}
|
||||
void connectPinAfter(PinSet *drvrs,
|
||||
Network *network) override;
|
||||
void deletePinBefore(const Pin *pin,
|
||||
Network *network) override;
|
||||
void deleteInstance(const Instance *inst,
|
||||
const Network *network);
|
||||
|
||||
protected:
|
||||
void findHash(const Network *network);
|
||||
void deletePin(const Pin *pin,
|
||||
const Network *network);
|
||||
void deleteEdge(const EdgePins &edge);
|
||||
@@ -620,7 +620,6 @@ class ExpandedExceptionVisitor
|
||||
public:
|
||||
ExpandedExceptionVisitor(ExceptionPath *exception,
|
||||
const Network *network);
|
||||
virtual ~ExpandedExceptionVisitor() {}
|
||||
void visitExpansions();
|
||||
// From/thrus/to have a single exception point (pin/instance/net/clock).
|
||||
virtual void visit(ExceptionFrom *from,
|
||||
@@ -678,7 +677,7 @@ exceptionStateCmp(const ExceptionState *state1,
|
||||
class EmptyExpceptionPt : public Exception
|
||||
{
|
||||
public:
|
||||
virtual const char *what() const noexcept;
|
||||
const char *what() const noexcept override;
|
||||
};
|
||||
|
||||
class ExceptionPathLess
|
||||
@@ -698,4 +697,4 @@ checkFromThrusTo(ExceptionFrom *from,
|
||||
ExceptionThruSeq *thrus,
|
||||
ExceptionTo *to);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// OpenSTA, Static Timing Analyzer
|
||||
// Copyright (c) 2025, Parallax Software, Inc.
|
||||
// Copyright (c) 2026, Parallax Software, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include "GraphClass.hh"
|
||||
#include "NetworkClass.hh"
|
||||
#include "SdcClass.hh"
|
||||
#include "SearchClass.hh"
|
||||
@@ -93,4 +94,4 @@ StringSeq
|
||||
filterExprToPostfix(std::string_view expr,
|
||||
Report *report);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -105,4 +105,4 @@ private:
|
||||
FuncExpr *
|
||||
funcExprNot(FuncExpr *expr);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -48,4 +48,4 @@ fuzzyGreaterEqual(float v1,
|
||||
bool
|
||||
fuzzyInf(float value);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
Graph(StaState *sta,
|
||||
DcalcAPIndex ap_count);
|
||||
void makeGraph();
|
||||
~Graph();
|
||||
~Graph() override;
|
||||
|
||||
// Number of arc delays and slews from sdf or delay calculation.
|
||||
void setDelayCount(DcalcAPIndex ap_count);
|
||||
@@ -291,8 +291,8 @@ protected:
|
||||
bool is_bidirect_drvr,
|
||||
bool is_reg_clk);
|
||||
void clear();
|
||||
Slew *slews() { return std::bit_cast<Slew*>(slews_); }
|
||||
const Slew *slews() const { return std::bit_cast<const Slew*>(slews_); }
|
||||
Slew *slews() { return reinterpret_cast<Slew*>(slews_); }
|
||||
const Slew *slews() const { return reinterpret_cast<const Slew*>(slews_); }
|
||||
float *slewsFloat() { return slews_; }
|
||||
const float *slewsFloat() const { return slews_; }
|
||||
void setSlews(float *slews);
|
||||
@@ -491,4 +491,4 @@ makeVertexSet(StaState *sta)
|
||||
return VertexSet(VertexIdLess(sta->graphRef()));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -76,4 +76,4 @@ static constexpr int slew_annotated_bits = MinMax::index_count * RiseFall::index
|
||||
// Bit shifts used to mark vertices in a Bfs queue.
|
||||
enum class BfsIndex { dcalc, arrival, required, other, bits };
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -59,4 +59,4 @@ sortEdges(EdgeSeq *edges,
|
||||
Network *network,
|
||||
Graph *graph);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -53,8 +53,8 @@ class GraphDelayCalc : public StaState
|
||||
{
|
||||
public:
|
||||
GraphDelayCalc(StaState *sta);
|
||||
virtual ~GraphDelayCalc();
|
||||
virtual void copyState(const StaState *sta);
|
||||
~GraphDelayCalc() override;
|
||||
void copyState(const StaState *sta) override;
|
||||
// Set the observer for edge delay changes.
|
||||
virtual void setObserver(DelayCalcObserver *observer);
|
||||
// Invalidate all delays/slews.
|
||||
@@ -323,8 +323,7 @@ protected:
|
||||
class DelayCalcObserver
|
||||
{
|
||||
public:
|
||||
DelayCalcObserver() {}
|
||||
virtual ~DelayCalcObserver() {}
|
||||
virtual ~DelayCalcObserver() = default;
|
||||
virtual void delayChangedFrom(Vertex *vertex) = 0;
|
||||
virtual void delayChangedTo(Vertex *vertex) = 0;
|
||||
virtual void checkDelayChangedTo(Vertex *vertex) = 0;
|
||||
@@ -359,4 +358,4 @@ private:
|
||||
std::vector<NetCaps> net_caps_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+1
-1
@@ -67,4 +67,4 @@ hashString(std::string_view str);
|
||||
#define hashPtr(ptr) (reinterpret_cast<intptr_t>(ptr) >> 2)
|
||||
#endif
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -47,8 +47,7 @@ public:
|
||||
class HpinDrvrLoadVisitor
|
||||
{
|
||||
public:
|
||||
HpinDrvrLoadVisitor() {}
|
||||
virtual ~HpinDrvrLoadVisitor() {}
|
||||
virtual ~HpinDrvrLoadVisitor() = default;
|
||||
virtual void visit(HpinDrvrLoad *drvr_load) = 0;
|
||||
};
|
||||
|
||||
@@ -76,4 +75,4 @@ private:
|
||||
PinSet *hpins_to_load_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -116,4 +116,4 @@ private:
|
||||
const LibertyPort *to_port_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -94,4 +94,4 @@ protected:
|
||||
InternalPowerModels models_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -35,7 +35,7 @@ template <class OBJ>
|
||||
class Iterator
|
||||
{
|
||||
public:
|
||||
virtual ~Iterator() {}
|
||||
virtual ~Iterator() = default;
|
||||
virtual bool hasNext() = 0;
|
||||
virtual OBJ next() = 0;
|
||||
};
|
||||
@@ -116,4 +116,4 @@ protected:
|
||||
SET_TYPE::const_iterator itr_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -50,4 +50,4 @@ protected:
|
||||
float power_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+134
-136
@@ -80,7 +80,7 @@ public:
|
||||
|
||||
private:
|
||||
std::string value_;
|
||||
FuncExpr *cond_;
|
||||
FuncExpr *cond_{nullptr};
|
||||
std::string sdf_cond_;
|
||||
};
|
||||
|
||||
@@ -159,10 +159,10 @@ enum class PwrGndType { none,
|
||||
deepnwell, deeppwell};
|
||||
|
||||
enum class ScaleFactorPvt { process, volt, temp, unknown };
|
||||
constexpr int scale_factor_pvt_count = int(ScaleFactorPvt::unknown) + 1;
|
||||
constexpr int scale_factor_pvt_count = static_cast<int>(ScaleFactorPvt::unknown) + 1;
|
||||
|
||||
enum class TableTemplateType { delay, power, output_current, capacitance, ocv };
|
||||
constexpr int table_template_type_count = int(TableTemplateType::ocv) + 1;
|
||||
constexpr int table_template_type_count = static_cast<int>(TableTemplateType::ocv) + 1;
|
||||
|
||||
enum class LevelShifterType { HL, LH, HL_LH };
|
||||
|
||||
@@ -206,7 +206,7 @@ class LibertyLibrary : public ConcreteLibrary
|
||||
public:
|
||||
LibertyLibrary(std::string_view name,
|
||||
std::string_view filename);
|
||||
virtual ~LibertyLibrary();
|
||||
~LibertyLibrary() override;
|
||||
LibertyCell *findLibertyCell(std::string_view name) const;
|
||||
LibertyCellSeq findLibertyCellsMatching(PatternMatch *pattern);
|
||||
// Liberty cells that are buffers.
|
||||
@@ -269,7 +269,7 @@ public:
|
||||
|
||||
void defaultIntrinsic(const RiseFall *rf,
|
||||
// Return values.
|
||||
float &intrisic,
|
||||
float &intrinsic,
|
||||
bool &exists) const;
|
||||
void setDefaultIntrinsic(const RiseFall *rf,
|
||||
float value);
|
||||
@@ -360,7 +360,7 @@ public:
|
||||
void setDefaultOcvDerate(OcvDerate *derate);
|
||||
OcvDerate *makeOcvDerate(std::string_view name);
|
||||
OcvDerate *findOcvDerate(std::string_view derate_name);
|
||||
void addSupplyVoltage(std::string_view suppy_name,
|
||||
void addSupplyVoltage(std::string_view supply_name,
|
||||
float voltage);
|
||||
bool supplyExists(std::string_view supply_name) const;
|
||||
void supplyVoltage(std::string_view supply_name,
|
||||
@@ -374,19 +374,19 @@ public:
|
||||
|
||||
static void
|
||||
makeSceneMap(LibertyLibrary *lib,
|
||||
int ap_index,
|
||||
size_t lib_ap_index,
|
||||
Network *network,
|
||||
Report *report);
|
||||
static void
|
||||
makeSceneMap(LibertyCell *link_cell,
|
||||
LibertyCell *map_cell,
|
||||
int ap_index,
|
||||
LibertyCell *scene_cell,
|
||||
size_t lib_ap_index,
|
||||
Report *report);
|
||||
static void
|
||||
makeSceneMap(LibertyCell *cell1,
|
||||
LibertyCell *cell2,
|
||||
bool link,
|
||||
int ap_index,
|
||||
size_t lib_ap_index,
|
||||
Report *report);
|
||||
static void
|
||||
checkScenes(LibertyCell *cell,
|
||||
@@ -396,62 +396,66 @@ public:
|
||||
DriverWaveform *findDriverWaveform(std::string_view name);
|
||||
DriverWaveform *driverWaveformDefault() { return findDriverWaveform(""); }
|
||||
DriverWaveform *makeDriverWaveform(std::string_view name,
|
||||
TablePtr waveforms);
|
||||
const TablePtr &waveforms);
|
||||
|
||||
protected:
|
||||
float degradeWireSlew(const TableModel *model,
|
||||
float in_slew,
|
||||
float wire_delay) const;
|
||||
|
||||
Units *units_;
|
||||
DelayModelType delay_model_type_;
|
||||
BusDclMap bus_dcls_;
|
||||
TableTemplateMap template_maps_[table_template_type_count];
|
||||
float nominal_process_;
|
||||
float nominal_voltage_;
|
||||
float nominal_temperature_;
|
||||
ScaleFactors *scale_factors_;
|
||||
ScaleFactorsMap scale_factors_map_;
|
||||
TableModel *wire_slew_degradation_tbls_[RiseFall::index_count];
|
||||
float default_input_pin_cap_;
|
||||
float default_output_pin_cap_;
|
||||
float default_bidirect_pin_cap_;
|
||||
RiseFallValues default_intrinsic_;
|
||||
RiseFallValues default_inout_pin_res_;
|
||||
RiseFallValues default_output_pin_res_;
|
||||
float default_fanout_load_;
|
||||
bool default_fanout_load_exists_;
|
||||
float default_max_cap_;
|
||||
bool default_max_cap_exists_;
|
||||
float default_max_fanout_;
|
||||
bool default_max_fanout_exists_;
|
||||
float default_max_slew_;
|
||||
bool default_max_slew_exists_;
|
||||
float input_threshold_[RiseFall::index_count];
|
||||
float output_threshold_[RiseFall::index_count];
|
||||
float slew_lower_threshold_[RiseFall::index_count];
|
||||
float slew_upper_threshold_[RiseFall::index_count];
|
||||
float slew_derate_from_library_;
|
||||
WireloadMap wireloads_;
|
||||
const Wireload *default_wire_load_;
|
||||
WireloadMode default_wire_load_mode_;
|
||||
const WireloadSelection *default_wire_load_selection_;
|
||||
WireloadSelectionMap wire_load_selections_;
|
||||
OperatingConditionsMap operating_conditions_;
|
||||
OperatingConditions *default_operating_conditions_;
|
||||
float ocv_arc_depth_;
|
||||
OcvDerate *default_ocv_derate_;
|
||||
OcvDerateMap ocv_derate_map_;
|
||||
SupplyVoltageMap supply_voltage_map_;
|
||||
LibertyCellSeq *buffers_;
|
||||
LibertyCellSeq *inverters_;
|
||||
DriverWaveformMap driver_waveform_map_;
|
||||
|
||||
static constexpr float input_threshold_default_ = .5;
|
||||
static constexpr float output_threshold_default_ = .5;
|
||||
static constexpr float slew_lower_threshold_default_ = .2;
|
||||
static constexpr float slew_upper_threshold_default_ = .8;
|
||||
|
||||
Units *units_{nullptr};
|
||||
DelayModelType delay_model_type_{DelayModelType::table};
|
||||
BusDclMap bus_dcls_;
|
||||
TableTemplateMap template_maps_[table_template_type_count];
|
||||
float nominal_process_{0.0F};
|
||||
float nominal_voltage_{0.0F};
|
||||
float nominal_temperature_{0.0F};
|
||||
ScaleFactors *scale_factors_{nullptr};
|
||||
ScaleFactorsMap scale_factors_map_;
|
||||
TableModel *wire_slew_degradation_tbls_[RiseFall::index_count]{nullptr, nullptr};
|
||||
float default_input_pin_cap_{0.0F};
|
||||
float default_output_pin_cap_{0.0F};
|
||||
float default_bidirect_pin_cap_{0.0F};
|
||||
RiseFallValues default_intrinsic_;
|
||||
RiseFallValues default_inout_pin_res_;
|
||||
RiseFallValues default_output_pin_res_;
|
||||
float default_fanout_load_{0.0F};
|
||||
bool default_fanout_load_exists_{false};
|
||||
float default_max_cap_{0.0F};
|
||||
bool default_max_cap_exists_{false};
|
||||
float default_max_fanout_{0.0F};
|
||||
bool default_max_fanout_exists_{false};
|
||||
float default_max_slew_{0.0F};
|
||||
bool default_max_slew_exists_{false};
|
||||
float input_threshold_[RiseFall::index_count]{input_threshold_default_,
|
||||
input_threshold_default_};
|
||||
float output_threshold_[RiseFall::index_count]{output_threshold_default_,
|
||||
output_threshold_default_};
|
||||
float slew_lower_threshold_[RiseFall::index_count]{slew_lower_threshold_default_,
|
||||
slew_lower_threshold_default_};
|
||||
float slew_upper_threshold_[RiseFall::index_count]{slew_upper_threshold_default_,
|
||||
slew_upper_threshold_default_};
|
||||
float slew_derate_from_library_{1.0F};
|
||||
WireloadMap wireloads_;
|
||||
const Wireload *default_wire_load_{nullptr};
|
||||
WireloadMode default_wire_load_mode_{WireloadMode::unknown};
|
||||
const WireloadSelection *default_wire_load_selection_{nullptr};
|
||||
WireloadSelectionMap wire_load_selections_;
|
||||
OperatingConditionsMap operating_conditions_;
|
||||
OperatingConditions *default_operating_conditions_{nullptr};
|
||||
float ocv_arc_depth_{0.0F};
|
||||
OcvDerate *default_ocv_derate_{nullptr};
|
||||
OcvDerateMap ocv_derate_map_;
|
||||
SupplyVoltageMap supply_voltage_map_;
|
||||
LibertyCellSeq *buffers_{nullptr};
|
||||
LibertyCellSeq *inverters_{nullptr};
|
||||
DriverWaveformMap driver_waveform_map_;
|
||||
|
||||
private:
|
||||
friend class LibertyCell;
|
||||
friend class LibertyCellIterator;
|
||||
@@ -476,12 +480,11 @@ public:
|
||||
LibertyCell(LibertyLibrary *library,
|
||||
std::string_view name,
|
||||
std::string_view filename);
|
||||
virtual ~LibertyCell();
|
||||
~LibertyCell() override;
|
||||
LibertyLibrary *libertyLibrary() const { return liberty_library_; }
|
||||
LibertyLibrary *libertyLibrary() { return liberty_library_; }
|
||||
LibertyPort *findLibertyPort(std::string_view name) const;
|
||||
LibertyPortSeq findLibertyPortsMatching(PatternMatch *pattern) const;
|
||||
bool hasInternalPorts() const { return has_internal_ports_; }
|
||||
ScaleFactors *scaleFactors() const { return scale_factors_; }
|
||||
void setScaleFactors(ScaleFactors *scale_factors);
|
||||
ModeDef *makeModeDef(std::string_view name);
|
||||
@@ -524,7 +527,7 @@ public:
|
||||
const LibertyPort *to) const;
|
||||
size_t timingArcSetCount() const;
|
||||
// Find a timing arc set equivalent to key.
|
||||
TimingArcSet *findTimingArcSet(TimingArcSet *key) const;
|
||||
TimingArcSet *findTimingArcSet(TimingArcSet *arc_set) const;
|
||||
TimingArcSet *findTimingArcSet(size_t index) const;
|
||||
bool hasTimingArcs(LibertyPort *port) const;
|
||||
|
||||
@@ -552,7 +555,7 @@ public:
|
||||
// timing arcs.
|
||||
bool hasInferedRegTimingArcs() const { return has_infered_reg_timing_arcs_; }
|
||||
TestCell *testCell() const { return test_cell_; }
|
||||
void latchEnable(const TimingArcSet *arc_set,
|
||||
void latchEnable(const TimingArcSet *d_to_q_set,
|
||||
// Return values.
|
||||
const LibertyPort *&enable_port,
|
||||
const FuncExpr *&enable_func,
|
||||
@@ -560,7 +563,7 @@ public:
|
||||
const RiseFall *latchCheckEnableEdge(TimingArcSet *check_set);
|
||||
LibertyCell *sceneCell(const Scene *scene,
|
||||
const MinMax *min_max);
|
||||
LibertyCell *sceneCell(int ap_index);
|
||||
LibertyCell *sceneCell(size_t lib_ap_index);
|
||||
|
||||
// AOCV
|
||||
float ocvArcDepth() const;
|
||||
@@ -604,7 +607,7 @@ public:
|
||||
void setTestCell(TestCell *test);
|
||||
void setHasInferedRegTimingArcs(bool infered);
|
||||
void setSceneCell(LibertyCell *scene_cell,
|
||||
int ap_index);
|
||||
size_t lib_ap_index);
|
||||
// Call after cell is finished being constructed.
|
||||
void finish(bool infer_latches,
|
||||
Report *report,
|
||||
@@ -623,9 +626,9 @@ public:
|
||||
void setFootprint(std::string_view footprint);
|
||||
const std::string &userFunctionClass() const { return user_function_class_; }
|
||||
void setUserFunctionClass(std::string_view user_function_class);
|
||||
void addPort(ConcretePort *port) override;
|
||||
|
||||
protected:
|
||||
void addPort(ConcretePort *port);
|
||||
void setHasInternalPorts(bool has_internal);
|
||||
void setLibertyLibrary(LibertyLibrary *library);
|
||||
void makeLatchEnables(Report *report,
|
||||
@@ -661,35 +664,35 @@ protected:
|
||||
bool checkSceneCell(const Scene *scene,
|
||||
const MinMax *min_max) const;
|
||||
|
||||
LibertyLibrary *liberty_library_;
|
||||
float area_;
|
||||
bool dont_use_;
|
||||
bool is_macro_;
|
||||
bool is_memory_;
|
||||
bool is_pad_;
|
||||
bool is_clock_cell_;
|
||||
bool is_level_shifter_;
|
||||
LevelShifterType level_shifter_type_;
|
||||
bool is_isolation_cell_;
|
||||
bool always_on_;
|
||||
SwitchCellType switch_cell_type_;
|
||||
bool interface_timing_;
|
||||
ClockGateType clock_gate_type_;
|
||||
LibertyLibrary *liberty_library_{nullptr};
|
||||
float area_{0.0F};
|
||||
bool dont_use_{false};
|
||||
bool is_macro_{false};
|
||||
bool is_memory_{false};
|
||||
bool is_pad_{false};
|
||||
bool is_clock_cell_{false};
|
||||
bool is_level_shifter_{false};
|
||||
LevelShifterType level_shifter_type_{LevelShifterType::HL_LH};
|
||||
bool is_isolation_cell_{false};
|
||||
bool always_on_{false};
|
||||
SwitchCellType switch_cell_type_{SwitchCellType::fine_grain};
|
||||
bool interface_timing_{false};
|
||||
ClockGateType clock_gate_type_{ClockGateType::none};
|
||||
TimingArcSetSeq timing_arc_sets_;
|
||||
TimingArcSetSet timing_arc_set_set_;
|
||||
LibertyPortPairTimingArcMap port_timing_arc_set_map_;
|
||||
bool has_infered_reg_timing_arcs_;
|
||||
bool has_infered_reg_timing_arcs_{false};
|
||||
InternalPowerSeq internal_powers_;
|
||||
PortInternalPowerMap port_internal_powers_;
|
||||
LeakagePowerSeq leakage_powers_;
|
||||
SequentialSeq sequentials_;
|
||||
PortToSequentialMap port_to_seq_map_;
|
||||
Statetable *statetable_;
|
||||
Statetable *statetable_{nullptr};
|
||||
BusDclMap bus_dcls_;
|
||||
ModeDefMap mode_defs_;
|
||||
ScaleFactors *scale_factors_;
|
||||
ScaleFactors *scale_factors_{nullptr};
|
||||
ScaledCellMap scaled_cells_;
|
||||
TestCell *test_cell_;
|
||||
TestCell *test_cell_{nullptr};
|
||||
// Latch D->Q to LatchEnable index.
|
||||
LatchEnableIndexMap latch_d_to_q_map_;
|
||||
// Latch EN->D setup to LatchEnable index.
|
||||
@@ -697,14 +700,14 @@ protected:
|
||||
LatchEnableSeq latch_enables_;
|
||||
// Ports that have latch D->Q timing arc sets from them.
|
||||
LibertyPortSet latch_data_ports_;
|
||||
float ocv_arc_depth_;
|
||||
OcvDerate *ocv_derate_;
|
||||
float ocv_arc_depth_{0.0F};
|
||||
OcvDerate *ocv_derate_{nullptr};
|
||||
OcvDerateMap ocv_derate_map_;
|
||||
std::vector<LibertyCell*> scene_cells_;
|
||||
float leakage_power_;
|
||||
bool leakage_power_exists_;
|
||||
bool has_internal_ports_;
|
||||
std::atomic<bool> have_voltage_waveforms_;
|
||||
float leakage_power_{0.0F};
|
||||
bool leakage_power_exists_{false};
|
||||
bool has_internal_ports_{false};
|
||||
std::atomic<bool> have_voltage_waveforms_{false};
|
||||
std::mutex waveform_lock_;
|
||||
std::string footprint_;
|
||||
std::string user_function_class_;
|
||||
@@ -731,7 +734,7 @@ class LibertyCellPortBitIterator : public Iterator<LibertyPort*>
|
||||
{
|
||||
public:
|
||||
LibertyCellPortBitIterator(const LibertyCell *cell);
|
||||
virtual ~LibertyCellPortBitIterator();
|
||||
~LibertyCellPortBitIterator() override;
|
||||
bool hasNext() override;
|
||||
LibertyPort *next() override;
|
||||
|
||||
@@ -748,9 +751,7 @@ public:
|
||||
LibertyLibrary *libertyLibrary() const { return liberty_cell_->libertyLibrary(); }
|
||||
LibertyPort *findLibertyMember(int index) const;
|
||||
LibertyPort *findLibertyBusBit(int index) const;
|
||||
LibertyPort *bundlePort() const;
|
||||
BusDcl *busDcl() const { return bus_dcl_; }
|
||||
void setDirection(PortDirection *dir);
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// pg_pin functions
|
||||
@@ -872,15 +873,15 @@ public:
|
||||
const RiseFall *pulseClkTrigger() const { return pulse_clk_trigger_; }
|
||||
// Rise for high, fall for low.
|
||||
const RiseFall *pulseClkSense() const { return pulse_clk_sense_; }
|
||||
void setPulseClk(const RiseFall *rfigger,
|
||||
void setPulseClk(const RiseFall *trigger,
|
||||
const RiseFall *sense);
|
||||
LibertyPort *scenePort(const Scene *scene,
|
||||
const MinMax *min_max);
|
||||
const LibertyPort *scenePort(const Scene *scene,
|
||||
const MinMax *min_max) const;
|
||||
const LibertyPort *scenePort(int ap_index) const;
|
||||
const LibertyPort *scenePort(size_t lib_ap_index) const;
|
||||
void setScenePort(LibertyPort *scene_port,
|
||||
int ap_index);
|
||||
size_t lib_ap_index);
|
||||
LibertyPort *relatedGroundPort() const { return related_ground_port_; }
|
||||
void setRelatedGroundPort(LibertyPort *related_ground_port);
|
||||
LibertyPort *relatedPowerPort() const { return related_power_port_; }
|
||||
@@ -913,7 +914,7 @@ protected:
|
||||
int to_index,
|
||||
bool is_bundle,
|
||||
ConcretePortSeq *members);
|
||||
virtual ~LibertyPort();
|
||||
~LibertyPort() override;
|
||||
void setMinPort(LibertyPort *min);
|
||||
void addScaledPort(OperatingConditions *op_cond,
|
||||
LibertyPort *scaled_port);
|
||||
@@ -927,48 +928,48 @@ protected:
|
||||
float,
|
||||
const MinMax *)> &setter);
|
||||
|
||||
LibertyPort *scenePort(int ap_index);
|
||||
LibertyPort *scenePort(size_t lib_ap_index);
|
||||
|
||||
LibertyCell *liberty_cell_;
|
||||
BusDcl *bus_dcl_;
|
||||
PwrGndType pwr_gnd_type_;
|
||||
LibertyCell *liberty_cell_{nullptr};
|
||||
BusDcl *bus_dcl_{nullptr};
|
||||
PwrGndType pwr_gnd_type_{PwrGndType::none};
|
||||
std::string voltage_name_;
|
||||
ScanSignalType scan_signal_type_;
|
||||
FuncExpr *function_;
|
||||
FuncExpr *tristate_enable_;
|
||||
ScaledPortMap *scaled_ports_;
|
||||
ScanSignalType scan_signal_type_{ScanSignalType::none};
|
||||
FuncExpr *function_{nullptr};
|
||||
FuncExpr *tristate_enable_{nullptr};
|
||||
ScaledPortMap *scaled_ports_{nullptr};
|
||||
RiseFallMinMax capacitance_;
|
||||
MinMaxFloatValues slew_limit_; // inputs and outputs
|
||||
MinMaxFloatValues cap_limit_; // outputs
|
||||
float fanout_load_; // inputs
|
||||
bool fanout_load_exists_;
|
||||
float fanout_load_{0.0F}; // inputs
|
||||
bool fanout_load_exists_{false};
|
||||
MinMaxFloatValues fanout_limit_; // outputs
|
||||
float min_period_;
|
||||
float min_pulse_width_[RiseFall::index_count];
|
||||
const RiseFall *pulse_clk_trigger_;
|
||||
const RiseFall *pulse_clk_sense_;
|
||||
LibertyPort *related_ground_port_;
|
||||
LibertyPort *related_power_port_;
|
||||
float min_period_{0.0F};
|
||||
float min_pulse_width_[RiseFall::index_count]{0.0F, 0.0F};
|
||||
const RiseFall *pulse_clk_trigger_{nullptr};
|
||||
const RiseFall *pulse_clk_sense_{nullptr};
|
||||
LibertyPort *related_ground_port_{nullptr};
|
||||
LibertyPort *related_power_port_{nullptr};
|
||||
std::vector<LibertyPort*> scene_ports_;
|
||||
ReceiverModelPtr receiver_model_;
|
||||
DriverWaveform *driver_waveform_[RiseFall::index_count];
|
||||
ReceiverModelPtr receiver_model_{nullptr};
|
||||
DriverWaveform *driver_waveform_[RiseFall::index_count]{nullptr, nullptr};
|
||||
|
||||
unsigned int min_pulse_width_exists_:RiseFall::index_count;
|
||||
bool min_period_exists_:1;
|
||||
bool is_clk_:1;
|
||||
bool is_reg_clk_:1;
|
||||
bool is_reg_output_:1;
|
||||
bool is_latch_data_: 1;
|
||||
bool is_check_clk_:1;
|
||||
bool is_clk_gate_clk_:1;
|
||||
bool is_clk_gate_enable_:1;
|
||||
bool is_clk_gate_out_:1;
|
||||
bool is_pll_feedback_:1;
|
||||
bool isolation_cell_data_:1;
|
||||
bool isolation_cell_enable_:1;
|
||||
bool level_shifter_data_:1;
|
||||
bool is_switch_:1;
|
||||
bool is_pad_:1;
|
||||
bool min_pulse_width_exists_:RiseFall::index_count {false};
|
||||
bool min_period_exists_:1 {false};
|
||||
bool is_clk_:1 {false};
|
||||
bool is_reg_clk_:1 {false};
|
||||
bool is_reg_output_:1 {false};
|
||||
bool is_latch_data_: 1 {false};
|
||||
bool is_check_clk_:1 {false};
|
||||
bool is_clk_gate_clk_:1 {false};
|
||||
bool is_clk_gate_enable_:1 {false};
|
||||
bool is_clk_gate_out_:1 {false};
|
||||
bool is_pll_feedback_:1 {false};
|
||||
bool isolation_cell_data_:1 {false};
|
||||
bool isolation_cell_enable_:1 {false};
|
||||
bool level_shifter_data_:1 {false};
|
||||
bool is_switch_:1 {false};
|
||||
bool is_pad_:1 {false};
|
||||
|
||||
private:
|
||||
friend class LibertyLibrary;
|
||||
@@ -984,7 +985,7 @@ class LibertyPortMemberIterator : public Iterator<LibertyPort*>
|
||||
{
|
||||
public:
|
||||
LibertyPortMemberIterator(const LibertyPort *port);
|
||||
virtual ~LibertyPortMemberIterator();
|
||||
~LibertyPortMemberIterator() override;
|
||||
bool hasNext() override;
|
||||
LibertyPort *next() override;
|
||||
|
||||
@@ -999,7 +1000,7 @@ public:
|
||||
Pvt(float process,
|
||||
float voltage,
|
||||
float temperature);
|
||||
virtual ~Pvt() {}
|
||||
virtual ~Pvt() = default;
|
||||
float process() const { return process_; }
|
||||
void setProcess(float process);
|
||||
float voltage() const { return voltage_; }
|
||||
@@ -1023,7 +1024,7 @@ public:
|
||||
|
||||
protected:
|
||||
std::string name_;
|
||||
WireloadTree wire_load_tree_;
|
||||
WireloadTree wire_load_tree_{WireloadTree::unknown};
|
||||
};
|
||||
|
||||
class ScaleFactors
|
||||
@@ -1112,7 +1113,7 @@ public:
|
||||
|
||||
protected:
|
||||
std::string name_;
|
||||
TableTemplateType type_;
|
||||
TableTemplateType type_{TableTemplateType::delay};
|
||||
TableAxisPtr axis1_;
|
||||
TableAxisPtr axis2_;
|
||||
TableAxisPtr axis3_;
|
||||
@@ -1124,15 +1125,12 @@ public:
|
||||
TestCell(LibertyLibrary *library,
|
||||
std::string_view name,
|
||||
std::string_view filename);
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
class OcvDerate
|
||||
{
|
||||
public:
|
||||
OcvDerate(std::string_view name);
|
||||
~OcvDerate();
|
||||
const std::string &name() const { return name_; }
|
||||
const Table *derateTable(const RiseFall *rf,
|
||||
const EarlyLate *early_late,
|
||||
@@ -1153,8 +1151,8 @@ portLibertyToSta(std::string_view port_name);
|
||||
const std::string &
|
||||
scanSignalTypeName(ScanSignalType scan_type);
|
||||
const std::string &
|
||||
pwrGndTypeName(PwrGndType pwr_gnd_type);
|
||||
pwrGndTypeName(PwrGndType pg_type);
|
||||
PwrGndType
|
||||
findPwrGndType(std::string_view pg_name);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -85,7 +85,7 @@ enum class ScaleFactorType : unsigned {
|
||||
wire_cap,
|
||||
wire_res,
|
||||
min_period,
|
||||
// Liberty attributes have rise/fall suffix.
|
||||
// Liberty attributes with rise/fall suffix.
|
||||
cell,
|
||||
hold,
|
||||
setup,
|
||||
@@ -95,13 +95,13 @@ enum class ScaleFactorType : unsigned {
|
||||
skew,
|
||||
leakage_power,
|
||||
internal_power,
|
||||
// Liberty attributes have rise/fall prefix.
|
||||
// Liberty attributes with rise/fall prefix.
|
||||
transition,
|
||||
// Liberty attributes have low/high suffix (indexed as rise/fall).
|
||||
// Liberty attributes with low/high suffix (indexed as rise/fall).
|
||||
min_pulse_width,
|
||||
unknown,
|
||||
};
|
||||
const int scale_factor_type_count = int(ScaleFactorType::unknown) + 1;
|
||||
const int scale_factor_type_count = static_cast<int>(ScaleFactorType::unknown) + 1;
|
||||
// Enough bits to hold a ScaleFactorType enum.
|
||||
const int scale_factor_bits = 4;
|
||||
|
||||
@@ -116,7 +116,7 @@ enum class TimingSense {
|
||||
none,
|
||||
unknown
|
||||
};
|
||||
const int timing_sense_count = int(TimingSense::unknown) + 1;
|
||||
const int timing_sense_count = static_cast<int>(TimingSense::unknown) + 1;
|
||||
const int timing_sense_bit_count = 3;
|
||||
|
||||
enum class TableAxisVariable {
|
||||
@@ -178,4 +178,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -35,4 +35,4 @@ writeLiberty(LibertyLibrary *lib,
|
||||
const char *filename,
|
||||
StaState *sta);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -55,10 +55,9 @@ public:
|
||||
PocvMode pocv_mode,
|
||||
int digits) const override;
|
||||
float driveResistance(const Pvt *pvt) const override;
|
||||
|
||||
protected:
|
||||
void setIsScaled(bool is_scaled) override;
|
||||
|
||||
protected:
|
||||
float intrinsic_;
|
||||
float resistance_;
|
||||
};
|
||||
@@ -82,11 +81,10 @@ public:
|
||||
const MinMax *min_max,
|
||||
PocvMode pocv_mode,
|
||||
int digits) const override;
|
||||
|
||||
protected:
|
||||
void setIsScaled(bool is_scaled) override;
|
||||
|
||||
protected:
|
||||
float intrinsic_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -26,11 +26,6 @@
|
||||
|
||||
// This header contains global os/port specific definitions.
|
||||
|
||||
// Pragma placeholder for non-gcc compilers.
|
||||
#ifndef __GNUC__
|
||||
#define __attribute__(x)
|
||||
#endif // __GNUC__
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Microcruft Visual C++
|
||||
// Obtuse warning codes enabled by pragma.
|
||||
@@ -48,6 +43,7 @@
|
||||
// 4611 = setjmp used in C++ function
|
||||
// 4701 = variable used but not initialized
|
||||
#pragma warning( 3 : 4018 4032 4132 4189 4201 4222 4234 4505 4611 4701 )
|
||||
|
||||
// Disable security warnings for posix functions.
|
||||
// _CRT_SECURE_NO_WARNINGS does not seem to work
|
||||
#pragma warning( disable : 4996 )
|
||||
@@ -65,7 +61,7 @@
|
||||
// Flex doesn't check for unistd.h.
|
||||
#define YY_NO_UNISTD_H
|
||||
namespace sta {
|
||||
int vsnprint(char *str, size_t size, const char *fmt, va_list args);
|
||||
int vsnprint(char *str, size_t size, const char *fmt, const va_list args);
|
||||
int vasprintf(char **str, const char *fmt, va_list args);
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -31,4 +31,4 @@ class NetworkReader;
|
||||
NetworkReader *
|
||||
makeConcreteNetwork();
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+23
-23
@@ -52,12 +52,12 @@ public:
|
||||
static const MinMax *max() { return &max_; }
|
||||
static const EarlyLate *early() { return &min_; }
|
||||
static const EarlyLate *late() { return &max_; }
|
||||
static int minIndex() { return min_.index_; }
|
||||
static int earlyIndex() { return min_.index_; }
|
||||
static int maxIndex() { return max_.index_; }
|
||||
static int lateIndex() { return max_.index_; }
|
||||
static size_t minIndex() { return min_.index_; }
|
||||
static size_t earlyIndex() { return min_.index_; }
|
||||
static size_t maxIndex() { return max_.index_; }
|
||||
static size_t lateIndex() { return max_.index_; }
|
||||
const std::string &to_string() const { return name_; }
|
||||
int index() const { return index_; }
|
||||
size_t index() const { return index_; }
|
||||
float initValue() const { return init_value_; }
|
||||
int initValueInt() const { return init_value_int_; }
|
||||
// Max value1 > value2, Min value1 < value2.
|
||||
@@ -72,18 +72,18 @@ public:
|
||||
// for (auto min_max : MinMax::range()) {}
|
||||
static const std::array<const MinMax*, 2> &range() { return range_; }
|
||||
// for (auto mm_index : MinMax::rangeIndex()) {}
|
||||
static const std::array<int, 2> &rangeIndex() { return range_index_; }
|
||||
static const std::array<size_t, 2> &rangeIndex() { return range_index_; }
|
||||
// Find MinMax from name.
|
||||
static const MinMax *find(const char *min_max);
|
||||
static const MinMax *find(std::string_view min_max);
|
||||
// Find MinMax from index.
|
||||
static const MinMax *find(int index);
|
||||
static const int index_max = 1;
|
||||
static const int index_count = 2;
|
||||
static const int index_bit_count = 1;
|
||||
static const MinMax *find(size_t index);
|
||||
static const size_t index_max = 1;
|
||||
static const size_t index_count = 2;
|
||||
static const size_t index_bit_count = 1;
|
||||
|
||||
private:
|
||||
MinMax(const char *name,
|
||||
int index,
|
||||
MinMax(std::string_view name,
|
||||
size_t index,
|
||||
float init_value,
|
||||
int init_value_int,
|
||||
bool (*compare)(float value1,
|
||||
@@ -99,7 +99,7 @@ private:
|
||||
static const MinMax min_;
|
||||
static const MinMax max_;
|
||||
static const std::array<const MinMax*, 2> range_;
|
||||
static const std::array<int, 2> range_index_;
|
||||
static const std::array<size_t, 2> range_index_;
|
||||
};
|
||||
|
||||
// Min/Max/All, where "All" means use both min and max.
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
static const MinMaxAll *all() { return &all_; }
|
||||
static const MinMaxAll *minMax() { return &all_; }
|
||||
const std::string &to_string() const { return name_; }
|
||||
int index() const { return index_; }
|
||||
size_t index() const { return index_; }
|
||||
const MinMax *asMinMax() const;
|
||||
bool matches(const MinMax *min_max) const;
|
||||
bool matches(const MinMaxAll *min_max) const;
|
||||
@@ -122,22 +122,22 @@ public:
|
||||
// for (const auto min_max : min_max->range()) {}
|
||||
const std::vector<const MinMax*> &range() const { return range_; }
|
||||
// for (const auto mm_index : min_max->rangeIndex()) {}
|
||||
const std::vector<int> &rangeIndex() const { return range_index_; }
|
||||
const std::vector<size_t> &rangeIndex() const { return range_index_; }
|
||||
|
||||
private:
|
||||
MinMaxAll(const char *name,
|
||||
int index,
|
||||
std::vector<const MinMax*> range,
|
||||
std::vector<int> range_index);
|
||||
MinMaxAll(std::string_view name,
|
||||
size_t index,
|
||||
const std::vector<const MinMax*> &range,
|
||||
const std::vector<size_t> &range_index);
|
||||
|
||||
const std::string name_;
|
||||
int index_;
|
||||
size_t index_;
|
||||
const std::vector<const MinMax*> range_;
|
||||
const std::vector<int> range_index_;
|
||||
const std::vector<size_t> range_index_;
|
||||
|
||||
static const MinMaxAll min_;
|
||||
static const MinMaxAll max_;
|
||||
static const MinMaxAll all_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -200,4 +200,4 @@ private:
|
||||
using MinMaxFloatValues = MinMaxValues<float>;
|
||||
using MinMaxIntValues = MinMaxValues<int>;
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+10
-8
@@ -39,21 +39,22 @@ class PathGroups;
|
||||
using PathGroupSeq = std::vector<PathGroup*>;
|
||||
|
||||
// Sdc and dependent state.
|
||||
class Mode : public StaState
|
||||
class Mode
|
||||
{
|
||||
public:
|
||||
Mode(std::string_view name,
|
||||
size_t mode_index,
|
||||
StaState *sta);
|
||||
virtual ~Mode();
|
||||
virtual void copyState(const StaState *sta);
|
||||
~Mode();
|
||||
void copyState(const StaState *sta);
|
||||
void clear();
|
||||
const std::string &name() const { return name_; }
|
||||
size_t modeIndex() const { return mode_index_; }
|
||||
const SceneSeq &scenes() const { return scenes_; }
|
||||
const SceneSet sceneSet() const;
|
||||
SceneSet sceneSet() const;
|
||||
void addScene(Scene *scene);
|
||||
void removeScene(Scene *scene);
|
||||
StaState *sta() const { return sta_; }
|
||||
Sdc *sdc() { return sdc_; }
|
||||
Sdc *sdc() const { return sdc_; }
|
||||
Sim *sim() { return sim_; }
|
||||
@@ -69,8 +70,8 @@ public:
|
||||
int endpoint_path_count,
|
||||
bool unique_pins,
|
||||
bool unique_edges,
|
||||
float min_slack,
|
||||
float max_slack,
|
||||
float slack_min,
|
||||
float slack_max,
|
||||
StringSeq &group_names,
|
||||
bool setup,
|
||||
bool hold,
|
||||
@@ -89,7 +90,8 @@ private:
|
||||
Sim *sim_;
|
||||
ClkNetwork *clk_network_;
|
||||
Genclks *genclks_;
|
||||
PathGroups *path_groups_;
|
||||
PathGroups *path_groups_{nullptr};
|
||||
StaState *sta_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -29,6 +29,6 @@
|
||||
namespace sta {
|
||||
|
||||
// Hide a bit of the std verbosity.
|
||||
using LockGuard = std::lock_guard<std::mutex>;
|
||||
using LockGuard = std::scoped_lock<std::mutex>;
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+9
-13
@@ -94,7 +94,7 @@ class Network : public StaState
|
||||
{
|
||||
public:
|
||||
Network();
|
||||
virtual ~Network();
|
||||
~Network() override;
|
||||
virtual void clear();
|
||||
|
||||
// Linking the hierarchy creates the instance/pin/net network hierarchy.
|
||||
@@ -501,7 +501,7 @@ class NetworkEdit : public Network
|
||||
{
|
||||
public:
|
||||
NetworkEdit();
|
||||
virtual bool isEditable() const { return true; }
|
||||
bool isEditable() const override { return true; }
|
||||
virtual Instance *makeInstance(LibertyCell *cell,
|
||||
std::string_view name,
|
||||
Instance *parent) = 0;
|
||||
@@ -533,7 +533,6 @@ public:
|
||||
class NetworkReader : public NetworkEdit
|
||||
{
|
||||
public:
|
||||
NetworkReader() {}
|
||||
// Called before reading a netlist to delete any previously linked network.
|
||||
virtual void readNetlistBefore() = 0;
|
||||
virtual void setLinkFunc(LinkNetworkFunc link) = 0;
|
||||
@@ -599,8 +598,7 @@ linkReaderNetwork(Cell *top_cell,
|
||||
class ConstantPinIterator
|
||||
{
|
||||
public:
|
||||
ConstantPinIterator() {}
|
||||
virtual ~ConstantPinIterator() {}
|
||||
virtual ~ConstantPinIterator() = default;
|
||||
virtual bool hasNext() = 0;
|
||||
virtual void next(const Pin *&pin,
|
||||
LogicValue &value) = 0;
|
||||
@@ -613,9 +611,8 @@ public:
|
||||
NetworkConstantPinIterator(const Network *network,
|
||||
NetSet &zero_nets,
|
||||
NetSet &one_nets);
|
||||
virtual ~NetworkConstantPinIterator() {}
|
||||
virtual bool hasNext();
|
||||
virtual void next(const Pin *&pin, LogicValue &value);
|
||||
bool hasNext() override;
|
||||
void next(const Pin *&pin, LogicValue &value) override;
|
||||
|
||||
private:
|
||||
void findConstantPins(NetSet &nets,
|
||||
@@ -631,8 +628,7 @@ private:
|
||||
class HierPinThruVisitor
|
||||
{
|
||||
public:
|
||||
HierPinThruVisitor() {}
|
||||
virtual ~HierPinThruVisitor() {}
|
||||
virtual ~HierPinThruVisitor() = default;
|
||||
virtual void visit(const Pin *drvr,
|
||||
const Pin *load) = 0;
|
||||
};
|
||||
@@ -640,7 +636,7 @@ public:
|
||||
class PinVisitor
|
||||
{
|
||||
public:
|
||||
virtual ~PinVisitor() {}
|
||||
virtual ~PinVisitor() = default;
|
||||
virtual void operator()(const Pin *pin) = 0;
|
||||
};
|
||||
|
||||
@@ -652,7 +648,7 @@ public:
|
||||
PinSeq &loads,
|
||||
PinSeq &drvrs,
|
||||
const Network *network);
|
||||
virtual void operator()(const Pin *pin);
|
||||
void operator()(const Pin *pin) override;
|
||||
|
||||
protected:
|
||||
const Pin *drvr_pin_;
|
||||
@@ -675,4 +671,4 @@ visitDrvrLoadsThruNet(const Net *net,
|
||||
char
|
||||
logicValueString(LogicValue value);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -173,4 +173,4 @@ public:
|
||||
NetSet(const Network *network);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -91,4 +91,4 @@ NetSeq
|
||||
sortByPathName(NetSet *set,
|
||||
const Network *network);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -40,4 +40,4 @@ static constexpr BlockIdx block_idx_null = 0;
|
||||
static constexpr ObjectId object_id_null = 0;
|
||||
static constexpr ObjectIdx object_idx_null = 0;
|
||||
|
||||
} // Namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -50,7 +50,6 @@ template <class TYPE>
|
||||
class ObjectTable
|
||||
{
|
||||
public:
|
||||
ObjectTable();
|
||||
~ObjectTable();
|
||||
TYPE *make();
|
||||
void destroy(TYPE *object);
|
||||
@@ -70,20 +69,13 @@ private:
|
||||
void freePush(TYPE *object,
|
||||
ObjectId id);
|
||||
|
||||
size_t size_;
|
||||
size_t size_{0};
|
||||
// Object ID of next free object.
|
||||
ObjectId free_;
|
||||
ObjectId free_{object_id_null};
|
||||
std::vector<TableBlock<TYPE>*> blocks_;
|
||||
static constexpr ObjectId idx_mask_ = block_object_count - 1;
|
||||
};
|
||||
|
||||
template <class TYPE>
|
||||
ObjectTable<TYPE>::ObjectTable() :
|
||||
size_(0),
|
||||
free_(object_id_null)
|
||||
{
|
||||
}
|
||||
|
||||
template <class TYPE>
|
||||
ObjectTable<TYPE>::~ObjectTable()
|
||||
{
|
||||
@@ -213,4 +205,4 @@ TableBlock<TYPE>::TableBlock(BlockIdx block_idx,
|
||||
{
|
||||
}
|
||||
|
||||
} // Namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -52,7 +52,6 @@ class Parasitics : public StaState
|
||||
{
|
||||
public:
|
||||
Parasitics(StaState *sta);
|
||||
virtual ~Parasitics() {}
|
||||
virtual const std::string &name() const = 0;
|
||||
virtual const std::string &filename() const = 0;
|
||||
virtual bool haveParasitics() = 0;
|
||||
@@ -304,4 +303,4 @@ private:
|
||||
const Network *network_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -32,4 +32,4 @@ class ParasiticNode;
|
||||
class ParasiticResistor;
|
||||
class ParasiticCapacitor;
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+11
-11
@@ -32,8 +32,8 @@ namespace sta {
|
||||
// Return true if name is a bus.
|
||||
bool
|
||||
isBusName(std::string_view name,
|
||||
const char brkt_left,
|
||||
const char brkt_right,
|
||||
char brkt_left,
|
||||
char brkt_right,
|
||||
char escape);
|
||||
|
||||
// Parse name as a bus.
|
||||
@@ -45,8 +45,8 @@ isBusName(std::string_view name,
|
||||
// Caller must delete returned bus_name string.
|
||||
void
|
||||
parseBusName(std::string_view name,
|
||||
const char brkt_left,
|
||||
const char brkt_right,
|
||||
char brkt_left,
|
||||
char brkt_right,
|
||||
char escape,
|
||||
// Return values.
|
||||
bool &is_bus,
|
||||
@@ -68,8 +68,8 @@ parseBusName(std::string_view name,
|
||||
// Caller must delete returned bus_name string.
|
||||
void
|
||||
parseBusName(std::string_view name,
|
||||
const char brkt_left,
|
||||
const char brkt_right,
|
||||
char brkt_left,
|
||||
char brkt_right,
|
||||
char escape,
|
||||
// Return values.
|
||||
bool &is_bus,
|
||||
@@ -85,7 +85,7 @@ void
|
||||
parseBusName(std::string_view name,
|
||||
std::string_view brkts_left,
|
||||
std::string_view brkts_right,
|
||||
const char escape,
|
||||
char escape,
|
||||
// Return values.
|
||||
bool &is_bus,
|
||||
bool &is_range,
|
||||
@@ -97,8 +97,8 @@ parseBusName(std::string_view name,
|
||||
// Insert escapes before ch1 and ch2 in token.
|
||||
std::string
|
||||
escapeChars(std::string_view token,
|
||||
const char ch1,
|
||||
const char ch2,
|
||||
const char escape);
|
||||
char ch1,
|
||||
char ch2,
|
||||
char escape);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+2
-3
@@ -103,7 +103,7 @@ public:
|
||||
const Required &required() const {return required_; }
|
||||
void setRequired(const Required &required);
|
||||
Slack slack(const StaState *sta) const;
|
||||
const Slew slew(const StaState *sta) const;
|
||||
Slew slew(const StaState *sta) const;
|
||||
// This takes the same time as prevPath and prevArc combined.
|
||||
Path *prevPath() const;
|
||||
void setPrevPath(Path *prev_path);
|
||||
@@ -201,7 +201,6 @@ public:
|
||||
const RiseFall *rf,
|
||||
const MinMax *min_max,
|
||||
const StaState *sta);
|
||||
virtual ~VertexPathIterator();
|
||||
bool hasNext() override;
|
||||
Path *next() override;
|
||||
|
||||
@@ -219,4 +218,4 @@ private:
|
||||
Path *next_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+136
-135
@@ -69,7 +69,7 @@ public:
|
||||
};
|
||||
|
||||
virtual PathEnd *copy() const = 0;
|
||||
virtual ~PathEnd() {}
|
||||
virtual ~PathEnd() = default;
|
||||
void deletePath();
|
||||
Path *path() { return path_; }
|
||||
const Path *path() const { return path_; }
|
||||
@@ -147,9 +147,8 @@ public:
|
||||
virtual TimingArc *checkArc() const { return nullptr; }
|
||||
// PathEndDataCheck data clock path.
|
||||
virtual const Path *dataClkPath() const { return nullptr; }
|
||||
virtual int setupDefaultCycles() const { return 1; }
|
||||
virtual Delay clkSkew(const StaState *sta);
|
||||
virtual bool ignoreClkLatency(const StaState * /* sta */) const { return false; }
|
||||
[[nodiscard]] virtual bool ignoreClkLatency(const StaState *) const { return false; }
|
||||
|
||||
static bool less(const PathEnd *path_end1,
|
||||
const PathEnd *path_end2,
|
||||
@@ -219,53 +218,55 @@ protected:
|
||||
static bool ignoreClkLatency(const Path *path,
|
||||
PathDelay *path_delay,
|
||||
const StaState *sta);
|
||||
virtual int setupDefaultCycles() const { return 1; }
|
||||
|
||||
Path *path_;
|
||||
PathGroup *path_group_;
|
||||
PathGroup *path_group_{nullptr};
|
||||
};
|
||||
|
||||
class PathEndUnconstrained : public PathEnd
|
||||
{
|
||||
public:
|
||||
PathEndUnconstrained(Path *path);
|
||||
virtual Type type() const;
|
||||
virtual const char *typeName() const;
|
||||
virtual PathEnd *copy() 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;
|
||||
virtual ArcDelay margin(const StaState *sta) const;
|
||||
virtual Slack slack(const StaState *sta) const;
|
||||
virtual Slack slackNoCrpr(const StaState *sta) const;
|
||||
virtual float sourceClkOffset(const StaState *sta) const;
|
||||
Type type() const override;
|
||||
const char *typeName() const override;
|
||||
PathEnd *copy() const override;
|
||||
void reportShort(const ReportPath *report) const override;
|
||||
void reportFull(const ReportPath *report) const override;
|
||||
bool isUnconstrained() const override;
|
||||
Required requiredTime(const StaState *sta) const override;
|
||||
Required requiredTimeOffset(const StaState *sta) const override;
|
||||
ArcDelay margin(const StaState *sta) const override;
|
||||
Slack slack(const StaState *sta) const override;
|
||||
Slack slackNoCrpr(const StaState *sta) const override;
|
||||
float sourceClkOffset(const StaState *sta) const override;
|
||||
};
|
||||
|
||||
class PathEndClkConstrained : public PathEnd
|
||||
{
|
||||
public:
|
||||
virtual float sourceClkOffset(const StaState *sta) const;
|
||||
virtual Delay sourceClkLatency(const StaState *sta) const;
|
||||
virtual Delay sourceClkInsertionDelay(const StaState *sta) const;
|
||||
virtual const Clock *targetClk(const StaState *sta) const;
|
||||
virtual const ClockEdge *targetClkEdge(const StaState *sta) const;
|
||||
virtual Path *targetClkPath();
|
||||
virtual const Path *targetClkPath() const;
|
||||
virtual float targetClkTime(const StaState *sta) const;
|
||||
virtual float targetClkOffset(const StaState *sta) const;
|
||||
virtual Arrival targetClkArrival(const StaState *sta) const;
|
||||
virtual Delay targetClkDelay(const StaState *sta) const;
|
||||
virtual Delay targetClkInsertionDelay(const StaState *sta) const;
|
||||
virtual float targetNonInterClkUncertainty(const StaState *sta) const;
|
||||
virtual float interClkUncertainty(const StaState *sta) const;
|
||||
virtual float targetClkUncertainty(const StaState *sta) const;
|
||||
virtual Crpr crpr(const StaState *sta) const;
|
||||
virtual Required requiredTime(const StaState *sta) const;
|
||||
virtual Slack slack(const StaState *sta) const;
|
||||
virtual Slack slackNoCrpr(const StaState *sta) const;
|
||||
virtual int exceptPathCmp(const PathEnd *path_end,
|
||||
const StaState *sta) const;
|
||||
virtual void setPath(Path *path);
|
||||
float sourceClkOffset(const StaState *sta) const override;
|
||||
Delay sourceClkLatency(const StaState *sta) const override;
|
||||
Delay sourceClkInsertionDelay(const StaState *sta) const override;
|
||||
const Clock *targetClk(const StaState *sta) const override;
|
||||
const ClockEdge *targetClkEdge(const StaState *sta) const override;
|
||||
Path *targetClkPath() override;
|
||||
const Path *targetClkPath() const override;
|
||||
float targetClkTime(const StaState *sta) const override;
|
||||
float targetClkOffset(const StaState *sta) const override;
|
||||
Arrival targetClkArrival(const StaState *sta) const override;
|
||||
Delay targetClkDelay(const StaState *sta) const override;
|
||||
Delay targetClkInsertionDelay(const StaState *sta) const override;
|
||||
float targetNonInterClkUncertainty(const StaState *sta) const override;
|
||||
float interClkUncertainty(const StaState *sta) const override;
|
||||
float targetClkUncertainty(const StaState *sta) const override;
|
||||
Crpr crpr(const StaState *sta) const override;
|
||||
Required requiredTime(const StaState *sta) const override;
|
||||
Slack slack(const StaState *sta) const override;
|
||||
Slack slackNoCrpr(const StaState *sta) const override;
|
||||
int exceptPathCmp(const PathEnd *path_end,
|
||||
const StaState *sta) const override;
|
||||
void setPath(Path *path) override;
|
||||
|
||||
protected:
|
||||
PathEndClkConstrained(Path *path,
|
||||
@@ -280,16 +281,16 @@ protected:
|
||||
|
||||
Path *clk_path_;
|
||||
mutable Crpr crpr_;
|
||||
mutable bool crpr_valid_;
|
||||
mutable bool crpr_valid_{false};
|
||||
};
|
||||
|
||||
class PathEndClkConstrainedMcp : public PathEndClkConstrained
|
||||
{
|
||||
public:
|
||||
virtual MultiCyclePath *multiCyclePath() const { return mcp_; }
|
||||
virtual float targetClkMcpAdjustment(const StaState *sta) const;
|
||||
virtual int exceptPathCmp(const PathEnd *path_end,
|
||||
const StaState *sta) const;
|
||||
MultiCyclePath *multiCyclePath() const override { return mcp_; }
|
||||
float targetClkMcpAdjustment(const StaState *sta) const override;
|
||||
int exceptPathCmp(const PathEnd *path_end,
|
||||
const StaState *sta) const override;
|
||||
|
||||
protected:
|
||||
PathEndClkConstrainedMcp(Path *path,
|
||||
@@ -316,23 +317,23 @@ public:
|
||||
Path *clk_path,
|
||||
MultiCyclePath *mcp,
|
||||
const StaState *sta);
|
||||
virtual PathEnd *copy() const;
|
||||
virtual Type type() const;
|
||||
virtual const char *typeName() 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;
|
||||
virtual const TimingRole *checkRole(const StaState *sta) const;
|
||||
virtual TimingArc *checkArc() const { return check_arc_; }
|
||||
virtual int exceptPathCmp(const PathEnd *path_end,
|
||||
const StaState *sta) const;
|
||||
virtual Delay clkSkew(const StaState *sta);
|
||||
PathEnd *copy() const override;
|
||||
Type type() const override;
|
||||
const char *typeName() const override;
|
||||
void reportShort(const ReportPath *report) const override;
|
||||
void reportFull(const ReportPath *report) const override;
|
||||
bool isCheck() const override { return true; }
|
||||
ArcDelay margin(const StaState *sta) const override;
|
||||
float macroClkTreeDelay(const StaState *sta) const override;
|
||||
const TimingRole *checkRole(const StaState *sta) const override;
|
||||
TimingArc *checkArc() const override { return check_arc_; }
|
||||
int exceptPathCmp(const PathEnd *path_end,
|
||||
const StaState *sta) const override;
|
||||
Delay clkSkew(const StaState *sta) override;
|
||||
|
||||
protected:
|
||||
Delay sourceClkDelay(const StaState *sta) const;
|
||||
virtual Required requiredTimeNoCrpr(const StaState *sta) const;
|
||||
Required requiredTimeNoCrpr(const StaState *sta) const override;
|
||||
|
||||
TimingArc *check_arc_;
|
||||
Edge *check_edge_;
|
||||
@@ -349,25 +350,25 @@ public:
|
||||
MultiCyclePath *mcp,
|
||||
PathDelay *path_delay,
|
||||
const StaState *sta);
|
||||
virtual Type type() const;
|
||||
virtual const char *typeName() const;
|
||||
virtual float sourceClkOffset(const StaState *sta) const;
|
||||
virtual bool isCheck() const { return false; }
|
||||
virtual bool isLatchCheck() const { return true; }
|
||||
virtual PathDelay *pathDelay() const { return path_delay_; }
|
||||
virtual PathEnd *copy() const;
|
||||
Type type() const override;
|
||||
const char *typeName() const override;
|
||||
float sourceClkOffset(const StaState *sta) const override;
|
||||
bool isCheck() const override { return false; }
|
||||
bool isLatchCheck() const override { return true; }
|
||||
PathDelay *pathDelay() const override { return path_delay_; }
|
||||
PathEnd *copy() const override;
|
||||
Path *latchDisable();
|
||||
const Path *latchDisable() const;
|
||||
virtual void reportShort(const ReportPath *report) const;
|
||||
virtual void reportFull(const ReportPath *report) const;
|
||||
virtual const TimingRole *checkRole(const StaState *sta) const;
|
||||
virtual Required requiredTime(const StaState *sta) const;
|
||||
virtual Arrival borrow(const StaState *sta) const;
|
||||
virtual float targetClkTime(const StaState *sta) const;
|
||||
virtual float targetClkOffset(const StaState *sta) const;
|
||||
void reportShort(const ReportPath *report) const override;
|
||||
void reportFull(const ReportPath *report) const override;
|
||||
const TimingRole *checkRole(const StaState *sta) const override;
|
||||
Required requiredTime(const StaState *sta) const override;
|
||||
Arrival borrow(const StaState *sta) const override;
|
||||
float targetClkTime(const StaState *sta) const override;
|
||||
float targetClkOffset(const StaState *sta) const override;
|
||||
Arrival targetClkWidth(const StaState *sta) const;
|
||||
virtual int exceptPathCmp(const PathEnd *path_end,
|
||||
const StaState *sta) const;
|
||||
int exceptPathCmp(const PathEnd *path_end,
|
||||
const StaState *sta) const override;
|
||||
void latchRequired(const StaState *sta,
|
||||
// Return values.
|
||||
Required &required,
|
||||
@@ -383,8 +384,8 @@ public:
|
||||
Crpr &open_crpr,
|
||||
Crpr &crpr_diff,
|
||||
Delay &max_borrow,
|
||||
bool &borrow_limit_exists) const;
|
||||
virtual bool ignoreClkLatency(const StaState *sta) const;
|
||||
bool &borrow_limit_exists) const;
|
||||
bool ignoreClkLatency(const StaState *sta) const override;
|
||||
|
||||
protected:
|
||||
Path *disable_path_;
|
||||
@@ -404,23 +405,23 @@ public:
|
||||
Path *clk_path,
|
||||
MultiCyclePath *mcp,
|
||||
const StaState *sta);
|
||||
virtual PathEnd *copy() const;
|
||||
virtual Type type() const;
|
||||
virtual const char *typeName() 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 const TimingRole *checkRole(const StaState *sta) const;
|
||||
virtual const ClockEdge *targetClkEdge(const StaState *sta) const;
|
||||
virtual Arrival targetClkArrivalNoCrpr(const StaState *sta) const;
|
||||
virtual Delay targetClkDelay(const StaState *sta) const;
|
||||
virtual Delay targetClkInsertionDelay(const StaState *sta) const;
|
||||
virtual Crpr crpr(const StaState *sta) const;
|
||||
virtual int exceptPathCmp(const PathEnd *path_end,
|
||||
const StaState *sta) const;
|
||||
PathEnd *copy() const override;
|
||||
Type type() const override;
|
||||
const char *typeName() const override;
|
||||
void reportShort(const ReportPath *report) const override;
|
||||
void reportFull(const ReportPath *report) const override;
|
||||
bool isOutputDelay() const override { return true; }
|
||||
ArcDelay margin(const StaState *sta) const override;
|
||||
const TimingRole *checkRole(const StaState *sta) const override;
|
||||
const ClockEdge *targetClkEdge(const StaState *sta) const override;
|
||||
Delay targetClkDelay(const StaState *sta) const override;
|
||||
Delay targetClkInsertionDelay(const StaState *sta) const override;
|
||||
Crpr crpr(const StaState *sta) const override;
|
||||
int exceptPathCmp(const PathEnd *path_end,
|
||||
const StaState *sta) const override;
|
||||
|
||||
protected:
|
||||
Arrival targetClkArrivalNoCrpr(const StaState *sta) const override;
|
||||
Arrival tgtClkDelay(const ClockEdge *tgt_clk_edge,
|
||||
const TimingRole *check_role,
|
||||
const StaState *sta) const;
|
||||
@@ -444,16 +445,16 @@ public:
|
||||
MultiCyclePath *mcp,
|
||||
ArcDelay margin,
|
||||
const StaState *sta);
|
||||
virtual PathEnd *copy() const;
|
||||
virtual Type type() const;
|
||||
virtual const char *typeName() 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 const TimingRole *checkRole(const StaState *sta) const;
|
||||
virtual int exceptPathCmp(const PathEnd *path_end,
|
||||
const StaState *sta) const;
|
||||
PathEnd *copy() const override;
|
||||
Type type() const override;
|
||||
const char *typeName() const override;
|
||||
void reportShort(const ReportPath *report) const override;
|
||||
void reportFull(const ReportPath *report) const override;
|
||||
bool isGatedClock() const override { return true; }
|
||||
ArcDelay margin(const StaState *) const override { return margin_; }
|
||||
const TimingRole *checkRole(const StaState *sta) const override;
|
||||
int exceptPathCmp(const PathEnd *path_end,
|
||||
const StaState *sta) const override;
|
||||
|
||||
protected:
|
||||
const TimingRole *check_role_;
|
||||
@@ -468,25 +469,25 @@ public:
|
||||
Path *data_clk_path,
|
||||
MultiCyclePath *mcp,
|
||||
const StaState *sta);
|
||||
virtual PathEnd *copy() const;
|
||||
virtual Type type() const;
|
||||
virtual const char *typeName() 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 const TimingRole *checkRole(const StaState *sta) const;
|
||||
virtual ArcDelay margin(const StaState *sta) const;
|
||||
virtual int exceptPathCmp(const PathEnd *path_end,
|
||||
const StaState *sta) const;
|
||||
virtual const Path *dataClkPath() const { return data_clk_path_; }
|
||||
PathEnd *copy() const override;
|
||||
Type type() const override;
|
||||
const char *typeName() const override;
|
||||
void reportShort(const ReportPath *report) const override;
|
||||
void reportFull(const ReportPath *report) const override;
|
||||
bool isDataCheck() const override { return true; }
|
||||
const ClockEdge *targetClkEdge(const StaState *sta) const override;
|
||||
const TimingRole *checkRole(const StaState *sta) const override;
|
||||
ArcDelay margin(const StaState *sta) const override;
|
||||
int exceptPathCmp(const PathEnd *path_end,
|
||||
const StaState *sta) const override;
|
||||
const Path *dataClkPath() const override { return data_clk_path_; }
|
||||
|
||||
protected:
|
||||
Path *clkPath(Path *path,
|
||||
const StaState *sta);
|
||||
Arrival requiredTimeNoCrpr(const StaState *sta) const;
|
||||
Arrival requiredTimeNoCrpr(const StaState *sta) const override;
|
||||
// setup uses zero cycle default
|
||||
virtual int setupDefaultCycles() const { return 0; }
|
||||
int setupDefaultCycles() const override { return 0; }
|
||||
|
||||
Path *data_clk_path_;
|
||||
DataCheck *check_;
|
||||
@@ -514,29 +515,29 @@ public:
|
||||
Path *path,
|
||||
OutputDelay *output_delay,
|
||||
const StaState *sta);
|
||||
virtual PathEnd *copy() const;
|
||||
virtual Type type() const;
|
||||
virtual const char *typeName() const;
|
||||
virtual void reportShort(const ReportPath *report) const;
|
||||
virtual void reportFull(const ReportPath *report) const;
|
||||
virtual bool isPathDelay() const { return true; }
|
||||
virtual const TimingRole *checkRole(const StaState *sta) const;
|
||||
virtual bool pathDelayMarginIsExternal() const;
|
||||
virtual PathDelay *pathDelay() const { return path_delay_; }
|
||||
virtual ArcDelay margin(const StaState *sta) const;
|
||||
virtual float sourceClkOffset(const StaState *sta) const;
|
||||
virtual const ClockEdge *targetClkEdge(const StaState *sta) const;
|
||||
virtual float targetClkTime(const StaState *sta) const;
|
||||
virtual Arrival targetClkArrivalNoCrpr(const StaState *sta) const;
|
||||
virtual float targetClkOffset(const StaState *sta) const;
|
||||
virtual TimingArc *checkArc() const { return check_arc_; }
|
||||
virtual Required requiredTime(const StaState *sta) const;
|
||||
virtual int exceptPathCmp(const PathEnd *path_end,
|
||||
const StaState *sta) const;
|
||||
PathEnd *copy() const override;
|
||||
Type type() const override;
|
||||
const char *typeName() const override;
|
||||
void reportShort(const ReportPath *report) const override;
|
||||
void reportFull(const ReportPath *report) const override;
|
||||
bool isPathDelay() const override { return true; }
|
||||
const TimingRole *checkRole(const StaState *sta) const override;
|
||||
bool pathDelayMarginIsExternal() const override;
|
||||
PathDelay *pathDelay() const override { return path_delay_; }
|
||||
ArcDelay margin(const StaState *sta) const override;
|
||||
float sourceClkOffset(const StaState *sta) const override;
|
||||
const ClockEdge *targetClkEdge(const StaState *sta) const override;
|
||||
float targetClkTime(const StaState *sta) const override;
|
||||
float targetClkOffset(const StaState *sta) const override;
|
||||
TimingArc *checkArc() const override { return check_arc_; }
|
||||
Required requiredTime(const StaState *sta) const override;
|
||||
int exceptPathCmp(const PathEnd *path_end,
|
||||
const StaState *sta) const override;
|
||||
[[nodiscard]] bool hasOutputDelay() const { return output_delay_ != nullptr; }
|
||||
virtual bool ignoreClkLatency(const StaState *sta) const;
|
||||
bool ignoreClkLatency(const StaState *sta) const override;
|
||||
|
||||
protected:
|
||||
Arrival targetClkArrivalNoCrpr(const StaState *sta) const override;
|
||||
void findSrcClkArrival(const StaState *sta);
|
||||
|
||||
PathDelay *path_delay_;
|
||||
@@ -590,4 +591,4 @@ protected:
|
||||
const StaState *sta_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -78,4 +78,4 @@ protected:
|
||||
const StaState *sta_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+26
-26
@@ -52,20 +52,20 @@ class PathGroup
|
||||
public:
|
||||
// Path group that compares compare slacks.
|
||||
static PathGroup *makePathGroupArrival(std::string_view name,
|
||||
int group_path_count,
|
||||
int endpoint_path_count,
|
||||
size_t group_path_count,
|
||||
size_t endpoint_path_count,
|
||||
bool unique_pins,
|
||||
bool unique_edges,
|
||||
const MinMax *min_max,
|
||||
const StaState *sta);
|
||||
// Path group that compares arrival time, sorted by min_max.
|
||||
static PathGroup *makePathGroupSlack(std::string_view name,
|
||||
int group_path_count,
|
||||
int endpoint_path_count,
|
||||
size_t group_path_count,
|
||||
size_t endpoint_path_count,
|
||||
bool unique_pins,
|
||||
bool unique_edges,
|
||||
float min_slack,
|
||||
float max_slack,
|
||||
float slack_min,
|
||||
float slack_max,
|
||||
const StaState *sta);
|
||||
~PathGroup();
|
||||
const std::string &name() const { return name_; }
|
||||
@@ -77,19 +77,19 @@ public:
|
||||
// Predicate to determine if a PathEnd is worth saving.
|
||||
bool saveable(PathEnd *path_end);
|
||||
bool enumMinSlackUnderMin(PathEnd *path_end);
|
||||
int maxPaths() const { return group_path_count_; }
|
||||
size_t maxPaths() const { return group_path_count_; }
|
||||
// This does NOT delete the path ends.
|
||||
void clear();
|
||||
static int group_path_count_max;
|
||||
static size_t group_path_count_max;
|
||||
|
||||
protected:
|
||||
PathGroup(std::string_view name,
|
||||
int group_path_count,
|
||||
int endpoint_path_count,
|
||||
size_t group_path_count,
|
||||
size_t endpoint_path_count,
|
||||
bool unique_pins,
|
||||
bool unique_edges,
|
||||
float min_slack,
|
||||
float max_slack,
|
||||
float slack_min,
|
||||
float slack_max,
|
||||
bool cmp_slack,
|
||||
const MinMax *min_max,
|
||||
const StaState *sta);
|
||||
@@ -98,8 +98,8 @@ protected:
|
||||
void sort();
|
||||
|
||||
std::string name_;
|
||||
int group_path_count_;
|
||||
int endpoint_path_count_;
|
||||
size_t group_path_count_;
|
||||
size_t endpoint_path_count_;
|
||||
bool unique_pins_;
|
||||
bool unique_edges_;
|
||||
float slack_min_;
|
||||
@@ -116,8 +116,8 @@ protected:
|
||||
class PathGroups : public StaState
|
||||
{
|
||||
public:
|
||||
PathGroups(int group_path_count,
|
||||
int endpoint_path_count,
|
||||
PathGroups(size_t group_path_count,
|
||||
size_t endpoint_path_count,
|
||||
bool unique_pins,
|
||||
bool unique_edges,
|
||||
float slack_min,
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
bool clk_gating_hold,
|
||||
bool unconstrained,
|
||||
const Mode *mode);
|
||||
~PathGroups();
|
||||
~PathGroups() override;
|
||||
// Use scene nullptr to make PathEnds for all scenes.
|
||||
// The PathEnds in the vector are owned by the PathGroups.
|
||||
void makePathEnds(ExceptionTo *to,
|
||||
@@ -155,8 +155,8 @@ public:
|
||||
|
||||
protected:
|
||||
void makeGroupPathEnds(ExceptionTo *to,
|
||||
int group_path_count,
|
||||
int endpoint_path_count,
|
||||
size_t group_path_count,
|
||||
size_t endpoint_path_count,
|
||||
bool unique_pins,
|
||||
bool unique_edges,
|
||||
const SceneSeq &scenes,
|
||||
@@ -170,8 +170,8 @@ protected:
|
||||
const MinMaxAll *min_max,
|
||||
PathEndVisitor *visitor);
|
||||
void enumPathEnds(PathGroup *group,
|
||||
int group_path_count,
|
||||
int endpoint_path_count,
|
||||
size_t group_path_count,
|
||||
size_t endpoint_path_count,
|
||||
bool unique_pins,
|
||||
bool unique_edges,
|
||||
bool cmp_slack);
|
||||
@@ -180,8 +180,8 @@ protected:
|
||||
void pushUnconstrainedPathEnds(PathEndSeq &path_ends,
|
||||
const MinMaxAll *min_max);
|
||||
|
||||
void makeGroups(int group_path_count,
|
||||
int endpoint_path_count,
|
||||
void makeGroups(size_t group_path_count,
|
||||
size_t endpoint_path_count,
|
||||
bool unique_pins,
|
||||
bool unique_edges,
|
||||
float slack_min,
|
||||
@@ -199,8 +199,8 @@ protected:
|
||||
StringSeq pathGroupNames();
|
||||
|
||||
const Mode *mode_;
|
||||
int group_path_count_;
|
||||
int endpoint_path_count_;
|
||||
size_t group_path_count_;
|
||||
size_t endpoint_path_count_;
|
||||
bool unique_pins_;
|
||||
bool unique_edges_;
|
||||
float slack_min_;
|
||||
@@ -226,4 +226,4 @@ protected:
|
||||
static constexpr std::string_view unconstrained_group_name_ = "unconstrained";
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -77,8 +77,8 @@ class RegexpCompileError : public Exception
|
||||
{
|
||||
public:
|
||||
RegexpCompileError(std::string_view pattern);
|
||||
virtual ~RegexpCompileError() noexcept {}
|
||||
virtual const char *what() const noexcept;
|
||||
~RegexpCompileError() noexcept override = default;
|
||||
const char *what() const noexcept override;
|
||||
|
||||
private:
|
||||
std::string error_;
|
||||
@@ -98,4 +98,4 @@ patternMatchNoCase(std::string_view pattern,
|
||||
bool
|
||||
patternWildcards(std::string_view pattern);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -68,4 +68,4 @@ public:
|
||||
const PinPair &pair2) const;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// OpenSTA, Static Timing Analyzer
|
||||
// Copyright (c) 2025, Parallax Software, Inc.
|
||||
// Copyright (c) 2026, Parallax Software, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -35,4 +35,4 @@ pocvModeName(PocvMode mode);
|
||||
PocvMode
|
||||
findPocvMode(std::string_view mode_name);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -108,4 +108,4 @@ private:
|
||||
const Network *network_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
static PortDirection *unknown() { return unknown_; }
|
||||
static PortDirection *find(const char *dir_name);
|
||||
std::string_view name() const { return name_; }
|
||||
int index() const { return index_; }
|
||||
size_t index() const { return index_; }
|
||||
bool isInput() const { return this == input_; }
|
||||
// Input or bidirect.
|
||||
bool isAnyInput() const;
|
||||
@@ -66,10 +66,10 @@ public:
|
||||
|
||||
private:
|
||||
PortDirection(const char *name,
|
||||
int index);
|
||||
size_t index);
|
||||
|
||||
const char *name_;
|
||||
int index_;
|
||||
size_t index_;
|
||||
|
||||
static PortDirection *input_;
|
||||
static PortDirection *output_;
|
||||
@@ -82,4 +82,4 @@ private:
|
||||
static PortDirection *unknown_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -76,4 +76,4 @@ private:
|
||||
FanoutValues fanout_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -47,7 +47,7 @@ enum class PwrActivityOrigin
|
||||
class PwrActivity
|
||||
{
|
||||
public:
|
||||
PwrActivity();
|
||||
PwrActivity() = default;
|
||||
PwrActivity(float density,
|
||||
float duty,
|
||||
PwrActivityOrigin origin);
|
||||
@@ -67,9 +67,9 @@ public:
|
||||
private:
|
||||
void check();
|
||||
|
||||
float density_; // transitions / second
|
||||
float duty_; // probability signal is high
|
||||
PwrActivityOrigin origin_;
|
||||
float density_{0.0}; // transitions / second
|
||||
float duty_{0.0}; // probability signal is high
|
||||
PwrActivityOrigin origin_{PwrActivityOrigin::unknown};
|
||||
|
||||
static constexpr float min_density = 1E-10;
|
||||
};
|
||||
@@ -77,7 +77,7 @@ private:
|
||||
class PowerResult
|
||||
{
|
||||
public:
|
||||
PowerResult();
|
||||
PowerResult() = default;
|
||||
void clear();
|
||||
float internal() const { return internal_; }
|
||||
float switching() const { return switching_; }
|
||||
@@ -89,12 +89,12 @@ public:
|
||||
void incrLeakage(float pwr);
|
||||
|
||||
private:
|
||||
float internal_;
|
||||
float switching_;
|
||||
float leakage_;
|
||||
float internal_{0.0};
|
||||
float switching_{0.0};
|
||||
float leakage_{0.0};
|
||||
};
|
||||
|
||||
using InstPower = std::pair<const Instance*, PowerResult>;
|
||||
using InstPowers = std::vector<InstPower>;
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+14
-15
@@ -47,7 +47,7 @@ template<class TYPE>
|
||||
class PropertyRegistry
|
||||
{
|
||||
public:
|
||||
typedef std::function<PropertyValue (TYPE object, Sta *sta)> PropertyHandler;
|
||||
using PropertyHandler = std::function<PropertyValue (TYPE object, Sta *sta)>;
|
||||
void defineProperty(std::string_view property,
|
||||
PropertyHandler handler);
|
||||
PropertyValue getProperty(TYPE object,
|
||||
@@ -63,7 +63,6 @@ class Properties
|
||||
{
|
||||
public:
|
||||
Properties(Sta *sta);
|
||||
virtual ~Properties() {}
|
||||
|
||||
PropertyValue getProperty(const Library *lib,
|
||||
std::string_view property);
|
||||
@@ -100,25 +99,25 @@ public:
|
||||
// return PropertyValue("bar");
|
||||
// });
|
||||
void defineProperty(std::string_view property,
|
||||
PropertyRegistry<const Library *>::PropertyHandler handler);
|
||||
PropertyRegistry<const Library *>::PropertyHandler &handler);
|
||||
void defineProperty(std::string_view property,
|
||||
PropertyRegistry<const LibertyLibrary *>::PropertyHandler handler);
|
||||
PropertyRegistry<const LibertyLibrary *>::PropertyHandler &handler);
|
||||
void defineProperty(std::string_view property,
|
||||
PropertyRegistry<const Cell *>::PropertyHandler handler);
|
||||
PropertyRegistry<const Cell *>::PropertyHandler &handler);
|
||||
void defineProperty(std::string_view property,
|
||||
PropertyRegistry<const LibertyCell *>::PropertyHandler handler);
|
||||
PropertyRegistry<const LibertyCell *>::PropertyHandler &handler);
|
||||
void defineProperty(std::string_view property,
|
||||
PropertyRegistry<const Port *>::PropertyHandler handler);
|
||||
PropertyRegistry<const Port *>::PropertyHandler &handler);
|
||||
void defineProperty(std::string_view property,
|
||||
PropertyRegistry<const LibertyPort *>::PropertyHandler handler);
|
||||
PropertyRegistry<const LibertyPort *>::PropertyHandler &handler);
|
||||
void defineProperty(std::string_view property,
|
||||
PropertyRegistry<const Instance *>::PropertyHandler handler);
|
||||
PropertyRegistry<const Instance *>::PropertyHandler &handler);
|
||||
void defineProperty(std::string_view property,
|
||||
PropertyRegistry<const Pin *>::PropertyHandler handler);
|
||||
PropertyRegistry<const Pin *>::PropertyHandler &handler);
|
||||
void defineProperty(std::string_view property,
|
||||
PropertyRegistry<const Net *>::PropertyHandler handler);
|
||||
PropertyRegistry<const Net *>::PropertyHandler &handler);
|
||||
void defineProperty(std::string_view property,
|
||||
PropertyRegistry<const Clock *>::PropertyHandler handler);
|
||||
PropertyRegistry<const Clock *>::PropertyHandler &handler);
|
||||
|
||||
protected:
|
||||
PropertyValue portSlew(const Port *port,
|
||||
@@ -201,9 +200,9 @@ public:
|
||||
PropertyValue(ConstPathSeq *value);
|
||||
PropertyValue(PwrActivity *value);
|
||||
// Copy constructor.
|
||||
PropertyValue(const PropertyValue &props);
|
||||
PropertyValue(const PropertyValue &value);
|
||||
// Move constructor.
|
||||
PropertyValue(PropertyValue &&props) noexcept;
|
||||
PropertyValue(PropertyValue &&value) noexcept;
|
||||
~PropertyValue();
|
||||
Type type() const { return type_; }
|
||||
const Unit *unit() const { return unit_; }
|
||||
@@ -259,4 +258,4 @@ private:
|
||||
const Unit *unit_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+5
-21
@@ -51,12 +51,11 @@ class Report
|
||||
{
|
||||
public:
|
||||
Report();
|
||||
virtual ~Report();
|
||||
|
||||
virtual ~Report() = default;
|
||||
virtual void reportLine(const std::string &line);
|
||||
virtual void reportBlankLine();
|
||||
|
||||
// Print formatted line using std::format (C++20).
|
||||
// Print formatted line using std::format.
|
||||
template <typename... Args>
|
||||
void report(std::string_view fmt,
|
||||
Args &&...args)
|
||||
@@ -210,28 +209,13 @@ protected:
|
||||
// Return the number of characters written.
|
||||
virtual size_t printConsole(const char *buffer,
|
||||
size_t length);
|
||||
void printToBuffer(const char *fmt, ...) __attribute__((format(printf, 2, 3)));
|
||||
|
||||
void printToBuffer(const char *fmt,
|
||||
va_list args);
|
||||
void printToBufferAppend(const char *fmt,
|
||||
...);
|
||||
void printToBufferAppend(const char *fmt,
|
||||
va_list args);
|
||||
void printBufferLine();
|
||||
void redirectStringPrint(const char *buffer,
|
||||
size_t length);
|
||||
|
||||
FILE *log_stream_;
|
||||
FILE *redirect_stream_;
|
||||
bool redirect_to_string_;
|
||||
FILE *log_stream_{nullptr};
|
||||
FILE *redirect_stream_{nullptr};
|
||||
bool redirect_to_string_{false};
|
||||
std::string redirect_string_;
|
||||
// Buffer to support printf style arguments.
|
||||
size_t buffer_size_;
|
||||
char *buffer_;
|
||||
// Length of string in buffer.
|
||||
size_t buffer_length_;
|
||||
std::mutex buffer_lock_;
|
||||
static Report *default_;
|
||||
std::set<int> suppressed_msg_ids_;
|
||||
|
||||
|
||||
@@ -33,4 +33,4 @@ class Report;
|
||||
Report *
|
||||
makeReportStd();
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -43,7 +43,7 @@ class ReportTcl : public Report
|
||||
{
|
||||
public:
|
||||
ReportTcl();
|
||||
virtual ~ReportTcl();
|
||||
~ReportTcl() override;
|
||||
void logBegin(std::string_view filename) override;
|
||||
void logEnd() override;
|
||||
void redirectFileBegin(std::string_view filename) override;
|
||||
@@ -68,13 +68,13 @@ private:
|
||||
const char *buffer,
|
||||
size_t length);
|
||||
|
||||
Tcl_Interp *interp_;
|
||||
Tcl_Interp *interp_{nullptr};
|
||||
// The original tcl channels.
|
||||
Tcl_Channel tcl_stdout_;
|
||||
Tcl_Channel tcl_stderr_;
|
||||
Tcl_Channel tcl_stdout_{nullptr};
|
||||
Tcl_Channel tcl_stderr_{nullptr};
|
||||
// Encapsulated channels that print on this object.
|
||||
Tcl_Channel tcl_encap_stdout_;
|
||||
Tcl_Channel tcl_encap_stderr_;
|
||||
Tcl_Channel tcl_encap_stdout_{nullptr};
|
||||
Tcl_Channel tcl_encap_stderr_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -85,4 +85,4 @@ private:
|
||||
bool exists_[RiseFall::index_count][MinMax::index_count];
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -49,4 +49,4 @@ private:
|
||||
bool exists_[RiseFall::index_count][MinMax::index_count];
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -49,4 +49,4 @@ private:
|
||||
bool exists_[RiseFall::index_count];
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
DcalcAPIndex checkClkSlewIndex(const MinMax *min_max) const;
|
||||
|
||||
const LibertySeq &libertyLibraries(const MinMax *min_max) const;
|
||||
int libertyIndex(const MinMax *min_max) const;
|
||||
size_t libertyIndex(const MinMax *min_max) const;
|
||||
void addLiberty(LibertyLibrary *lib,
|
||||
const MinMax *min_max);
|
||||
|
||||
@@ -95,4 +95,4 @@ protected:
|
||||
friend class Scenes;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+16
-17
@@ -123,13 +123,12 @@ private:
|
||||
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];
|
||||
bool subtract_pin_cap_[MinMax::index_count]{false, false};
|
||||
};
|
||||
|
||||
using ClockNameMap = std::map<std::string ,Clock*, std::less<>>;
|
||||
@@ -202,7 +201,7 @@ class Sdc : public StaState
|
||||
public:
|
||||
Sdc(Mode *mode,
|
||||
StaState *sta);
|
||||
~Sdc();
|
||||
~Sdc() override;
|
||||
Mode *mode() const { return mode_; }
|
||||
// Note that Search may reference a Filter exception removed by clear().
|
||||
void clear();
|
||||
@@ -317,13 +316,13 @@ public:
|
||||
bool &exists) const;
|
||||
void setSlewLimit(Clock *clk,
|
||||
const RiseFallBoth *rf,
|
||||
const PathClkOrData clk_data,
|
||||
PathClkOrData clk_data,
|
||||
const MinMax *min_max,
|
||||
float slew);
|
||||
bool haveClkSlewLimits() const;
|
||||
void slewLimit(const Clock *clk,
|
||||
const RiseFall *rf,
|
||||
const PathClkOrData clk_data,
|
||||
PathClkOrData clk_data,
|
||||
const MinMax *min_max,
|
||||
float &slew,
|
||||
bool &exists) const;
|
||||
@@ -500,12 +499,12 @@ public:
|
||||
Clock *to_clk,
|
||||
const RiseFallBoth *to_rf,
|
||||
const SetupHoldAll *setup_hold);
|
||||
ClockGroups *makeClockGroups(const std::string &name,
|
||||
ClockGroups *makeClockGroups(std::string_view name,
|
||||
bool logically_exclusive,
|
||||
bool physically_exclusive,
|
||||
bool asynchronous,
|
||||
bool allow_paths,
|
||||
std::string comment);
|
||||
std::string_view comment);
|
||||
void makeClockGroup(ClockGroups *clk_groups,
|
||||
ClockSet *clks);
|
||||
void removeClockGroups(const std::string &name);
|
||||
@@ -580,7 +579,7 @@ public:
|
||||
void setOutputDelay(const Pin *pin,
|
||||
const RiseFallBoth *rf,
|
||||
const Clock *clk,
|
||||
const RiseFall *clk_tr,
|
||||
const RiseFall *clk_rf,
|
||||
const Pin *ref_pin,
|
||||
bool source_latency_included,
|
||||
bool network_latency_included,
|
||||
@@ -1113,7 +1112,7 @@ protected:
|
||||
ExceptionPathSet &matches);
|
||||
void expandExceptionExcluding(ExceptionPath *exception,
|
||||
ExceptionPath *excluding,
|
||||
ExceptionPathSet &expanded_matches);
|
||||
ExceptionPathSet &expansions);
|
||||
void recordException1(ExceptionPath *exception);
|
||||
void recordExceptionFirstPts(ExceptionPath *exception);
|
||||
void recordExceptionFirstFrom(ExceptionPath *exception);
|
||||
@@ -1288,7 +1287,7 @@ protected:
|
||||
InstancePvtMap instance_pvt_maps_[MinMax::index_count];
|
||||
MinMaxFloatValues voltages_;
|
||||
NetVoltageMap net_voltage_map_;
|
||||
DeratingFactorsGlobal *derating_factors_;
|
||||
DeratingFactorsGlobal *derating_factors_{nullptr};
|
||||
NetDeratingFactorsMap net_derating_factors_;
|
||||
InstDeratingFactorsMap inst_derating_factors_;
|
||||
CellDeratingFactorsMap cell_derating_factors_;
|
||||
@@ -1297,7 +1296,7 @@ protected:
|
||||
// which iterating over the name map can't provide.
|
||||
ClockSeq clocks_;
|
||||
// Clocks are assigned an index.
|
||||
int clk_index_;
|
||||
int clk_index_{0};
|
||||
// Default clock used for unclocked input arrivals.
|
||||
Clock *default_arrival_clk_;
|
||||
ClockNameMap clock_name_map_;
|
||||
@@ -1320,7 +1319,7 @@ protected:
|
||||
// clks in the same set_clock_group set.
|
||||
ClockPairSet clk_group_same_;
|
||||
ClockSenseMap clk_sense_map_;
|
||||
ClockGatingCheck *clk_gating_check_;
|
||||
ClockGatingCheck *clk_gating_check_{nullptr};
|
||||
ClockGatingCheckMap clk_gating_check_map_;
|
||||
InstanceClockGatingCheckMap inst_clk_gating_check_map_;
|
||||
PinClockGatingCheckMap pin_clk_gating_check_map_;
|
||||
@@ -1335,7 +1334,7 @@ protected:
|
||||
// Input delays on hierarchical pins are indexed by the load pins.
|
||||
InputDelaysPinMap input_delay_leaf_pin_map_;
|
||||
InputDelaysPinMap input_delay_internal_pin_map_;
|
||||
int input_delay_index_;
|
||||
int input_delay_index_{0};
|
||||
|
||||
OutputDelaySet output_delays_;
|
||||
OutputDelaysPinMap output_delay_pin_map_;
|
||||
@@ -1369,9 +1368,9 @@ protected:
|
||||
InstanceSet disabled_clk_gating_checks_inst_;
|
||||
PinSet disabled_clk_gating_checks_pin_;
|
||||
ExceptionPathSet exceptions_;
|
||||
size_t exception_id_; // Unique ID for exceptions.
|
||||
size_t exception_id_{0}; // Unique ID for exceptions.
|
||||
|
||||
bool have_thru_hpin_exceptions_;
|
||||
bool have_thru_hpin_exceptions_{false};
|
||||
// First pin/clock/instance/net/edge exception point to exception set map.
|
||||
PinExceptionsMap first_from_pin_exceptions_;
|
||||
ClockExceptionsMap first_from_clk_exceptions_;
|
||||
@@ -1404,7 +1403,7 @@ protected:
|
||||
// Filter exception to tag arrivals for
|
||||
// report_timing -from pin|inst -through.
|
||||
// -to is always nullptr.
|
||||
FilterPath *filter_;
|
||||
FilterPath *filter_{nullptr};
|
||||
|
||||
InputDriveMap input_drive_map_;
|
||||
// set_LogicValue::one/zero/dc
|
||||
@@ -1429,4 +1428,4 @@ private:
|
||||
friend class GroupPathIterator;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -133,4 +133,4 @@ constexpr int timing_derate_type_count = 3;
|
||||
enum class TimingDerateCellType { cell_delay, cell_check };
|
||||
constexpr int timing_derate_cell_type_count = 2;
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -32,20 +32,18 @@ namespace sta {
|
||||
class SdcCmdComment
|
||||
{
|
||||
public:
|
||||
SdcCmdComment();
|
||||
SdcCmdComment(std::string comment);
|
||||
SdcCmdComment() = default;
|
||||
SdcCmdComment(std::string_view comment);
|
||||
const std::string &comment() { return comment_; }
|
||||
const std::string &comment() const { return comment_; }
|
||||
void setComment(std::string comment);
|
||||
void setComment(std::string_view comment);
|
||||
|
||||
protected:
|
||||
// Destructor is protected to prevent deletion of a derived
|
||||
// class with a pointer to this base class.
|
||||
~SdcCmdComment();
|
||||
~SdcCmdComment() = default;
|
||||
|
||||
std::string comment_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -290,4 +290,4 @@ std::string
|
||||
escapeBrackets(std::string_view name,
|
||||
const Network *network);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+83
-82
@@ -76,8 +76,8 @@ class Search : public StaState
|
||||
{
|
||||
public:
|
||||
Search(StaState *sta);
|
||||
virtual ~Search();
|
||||
virtual void copyState(const StaState *sta);
|
||||
~Search() override;
|
||||
void copyState(const StaState *sta) override;
|
||||
// Reset to virgin state.
|
||||
void clear();
|
||||
// When enabled, non-critical path arrivals are pruned to improve
|
||||
@@ -265,7 +265,7 @@ public:
|
||||
const Mode *mode,
|
||||
TagGroupBldr *tag_bldr);
|
||||
void setVertexArrivals(Vertex *vertex,
|
||||
TagGroupBldr *group_bldr);
|
||||
TagGroupBldr *tag_bldr);
|
||||
void tnsInvalid(Vertex *vertex);
|
||||
[[nodiscard]] bool arrivalsChanged(Vertex *vertex,
|
||||
TagGroupBldr *tag_bldr);
|
||||
@@ -314,7 +314,7 @@ public:
|
||||
Tag *findTag(Scene *scene,
|
||||
const RiseFall *rf,
|
||||
const MinMax *min_max,
|
||||
const ClkInfo *tag_clk,
|
||||
const ClkInfo *clk_info,
|
||||
bool is_clk,
|
||||
InputDelay *input_delay,
|
||||
bool is_segment_start,
|
||||
@@ -541,7 +541,7 @@ protected:
|
||||
void deletePaths();
|
||||
// Delete with incremental tns/wns update.
|
||||
void deletePathsIncr(Vertex *vertex);
|
||||
TagGroup *findTagGroup(TagGroupBldr *group_bldr);
|
||||
TagGroup *findTagGroup(TagGroupBldr *tag_bldr);
|
||||
void deleteFilterTags();
|
||||
void deleteFilterTagGroups();
|
||||
void deleteFilterClkInfos();
|
||||
@@ -582,9 +582,9 @@ protected:
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
// findPathEnds arg.
|
||||
bool unconstrained_paths_;
|
||||
bool crpr_path_pruning_enabled_;
|
||||
bool crpr_approx_missing_requireds_;
|
||||
bool unconstrained_paths_{false};
|
||||
bool crpr_path_pruning_enabled_{true};
|
||||
bool crpr_approx_missing_requireds_{true};
|
||||
|
||||
// Search predicates.
|
||||
SearchPred *search_thru_;
|
||||
@@ -592,9 +592,9 @@ protected:
|
||||
EvalPred *eval_pred_;
|
||||
|
||||
// Some arrivals exist.
|
||||
bool arrivals_exist_;
|
||||
bool arrivals_exist_{false};
|
||||
// Arrivals at start points have been initialized.
|
||||
bool arrivals_seeded_;
|
||||
bool arrivals_seeded_{false};
|
||||
// Vertices with invalid arrival times to update and search from.
|
||||
VertexSet invalid_arrivals_;
|
||||
std::mutex invalid_arrivals_lock_;
|
||||
@@ -602,14 +602,14 @@ protected:
|
||||
ArrivalVisitor *arrival_visitor_;
|
||||
|
||||
// Some requireds exist.
|
||||
bool requireds_exist_;
|
||||
bool requireds_exist_{false};
|
||||
// Requireds have been seeded by searching arrivals to all endpoints.
|
||||
bool requireds_seeded_;
|
||||
bool requireds_seeded_{false};
|
||||
// Vertices with invalid required times to update and search from.
|
||||
VertexSet invalid_requireds_;
|
||||
BfsBkwdIterator *required_iter_;
|
||||
|
||||
bool tns_exists_;
|
||||
bool tns_exists_{false};
|
||||
// Endpoint vertices with slacks that have changed since tns was found.
|
||||
VertexSet invalid_tns_;
|
||||
// Indexed by path_ap->index().
|
||||
@@ -619,19 +619,19 @@ protected:
|
||||
std::mutex tns_lock_;
|
||||
|
||||
// Indexed by path_ap->index().
|
||||
WorstSlacks *worst_slacks_;
|
||||
WorstSlacks *worst_slacks_{nullptr};
|
||||
|
||||
// Use pointer to clk_info set so Tag.hh does not need to be included.
|
||||
ClkInfoSet *clk_info_set_;
|
||||
std::mutex clk_info_lock_;
|
||||
|
||||
// Entries in tags_ may be missing where previous filter tags were deleted.
|
||||
TagIndex tag_capacity_;
|
||||
TagIndex tag_capacity_{128};
|
||||
std::atomic<Tag **> tags_;
|
||||
// Use pointer to tag set so Tag.hh does not need to be included.
|
||||
TagSet *tag_set_;
|
||||
std::vector<Tag **> tags_prev_;
|
||||
TagIndex tag_next_;
|
||||
TagIndex tag_next_{0};
|
||||
std::mutex tag_lock_;
|
||||
|
||||
// Capacity of tag_groups_.
|
||||
@@ -639,7 +639,7 @@ protected:
|
||||
std::atomic<TagGroup **> tag_groups_;
|
||||
TagGroupSet *tag_group_set_;
|
||||
std::vector<TagGroup **> tag_groups_prev_;
|
||||
TagGroupIndex tag_group_next_;
|
||||
TagGroupIndex tag_group_next_{0};
|
||||
// Holes in tag_groups_ left by deleting filter tag groups.
|
||||
std::vector<TagIndex> tag_group_free_indices_;
|
||||
std::mutex tag_group_lock_;
|
||||
@@ -652,18 +652,18 @@ protected:
|
||||
std::mutex pending_clk_endpoints_lock_;
|
||||
|
||||
VertexSet endpoints_;
|
||||
bool endpoints_initialized_;
|
||||
bool endpoints_initialized_{false};
|
||||
VertexSet invalid_endpoints_;
|
||||
|
||||
bool have_filter_;
|
||||
ExceptionFrom *filter_from_;
|
||||
ExceptionThruSeq *filter_thrus_;
|
||||
ExceptionTo *filter_to_;
|
||||
bool have_filter_{false};
|
||||
ExceptionFrom *filter_from_{nullptr};
|
||||
ExceptionThruSeq *filter_thrus_{nullptr};
|
||||
ExceptionTo *filter_to_{nullptr};
|
||||
VertexSet filtered_arrivals_;
|
||||
std::mutex filtered_arrivals_lock_;
|
||||
|
||||
bool found_downstream_clk_pins_;
|
||||
bool postpone_latch_outputs_;
|
||||
bool found_downstream_clk_pins_{false};
|
||||
bool postpone_latch_outputs_{false};
|
||||
std::vector<Path*> enum_paths_;
|
||||
|
||||
VisitPathEnds *visit_path_ends_;
|
||||
@@ -691,12 +691,14 @@ public:
|
||||
using SearchPred::searchTo;
|
||||
|
||||
protected:
|
||||
bool search_thru_latches_;
|
||||
bool search_thru_latches_{true};
|
||||
};
|
||||
|
||||
// Class for visiting fanin/fanout paths of a vertex.
|
||||
// This used by forward/backward search to find arrival/required path times.
|
||||
class PathVisitor : public VertexVisitor, public StaState
|
||||
// NOLINTNEXTLINE(misc-multiple-inheritance)
|
||||
class PathVisitor : public VertexVisitor,
|
||||
public StaState
|
||||
{
|
||||
public:
|
||||
// Uses search->evalPred() for search predicate.
|
||||
@@ -704,9 +706,24 @@ public:
|
||||
PathVisitor(SearchPred *pred,
|
||||
bool make_tag_cache,
|
||||
const StaState *sta);
|
||||
virtual ~PathVisitor();
|
||||
~PathVisitor() override;
|
||||
virtual void visitFaninPaths(Vertex *to_vertex);
|
||||
virtual void visitFanoutPaths(Vertex *from_vertex);
|
||||
// Return false to stop visiting.
|
||||
virtual bool visitFromToPath(const Pin *from_pin,
|
||||
Vertex *from_vertex,
|
||||
const RiseFall *from_rf,
|
||||
Tag *from_tag,
|
||||
Path *from_path,
|
||||
const Arrival &from_arrival,
|
||||
Edge *edge,
|
||||
TimingArc *arc,
|
||||
ArcDelay arc_delay,
|
||||
Vertex *to_vertex,
|
||||
const RiseFall *to_rf,
|
||||
Tag *to_tag,
|
||||
Arrival &to_arrival,
|
||||
const MinMax *min_max) = 0;
|
||||
|
||||
protected:
|
||||
// Return false to stop visiting.
|
||||
@@ -738,21 +755,6 @@ protected:
|
||||
Vertex *to_vertex,
|
||||
const RiseFall *to_rf,
|
||||
const MinMax *min_max);
|
||||
// Return false to stop visiting.
|
||||
virtual bool visitFromToPath(const Pin *from_pin,
|
||||
Vertex *from_vertex,
|
||||
const RiseFall *from_rf,
|
||||
Tag *from_tag,
|
||||
Path *from_path,
|
||||
const Arrival &from_arrival,
|
||||
Edge *edge,
|
||||
TimingArc *arc,
|
||||
ArcDelay arc_delay,
|
||||
Vertex *to_vertex,
|
||||
const RiseFall *to_rf,
|
||||
Tag *to_tag,
|
||||
Arrival &to_arrival,
|
||||
const MinMax *min_max) = 0;
|
||||
|
||||
SearchPred *pred_;
|
||||
TagSet *tag_cache_;
|
||||
@@ -764,29 +766,29 @@ class ArrivalVisitor : public PathVisitor
|
||||
{
|
||||
public:
|
||||
ArrivalVisitor(const StaState *sta);
|
||||
virtual ~ArrivalVisitor();
|
||||
~ArrivalVisitor() override;
|
||||
// Initialize the visitor.
|
||||
void init(bool always_to_endpoints,
|
||||
bool clks_only,
|
||||
SearchPred *pred);
|
||||
void copyState(const StaState *sta);
|
||||
virtual void visit(Vertex *vertex);
|
||||
virtual VertexVisitor *copy() const;
|
||||
void copyState(const StaState *sta) override;
|
||||
void visit(Vertex *vertex) override;
|
||||
VertexVisitor *copy() const override;
|
||||
// Return false to stop visiting.
|
||||
virtual bool visitFromToPath(const Pin *from_pin,
|
||||
Vertex *from_vertex,
|
||||
const RiseFall *from_rf,
|
||||
Tag *from_tag,
|
||||
Path *from_path,
|
||||
const Arrival &from_arrival,
|
||||
Edge *edge,
|
||||
TimingArc *arc,
|
||||
ArcDelay arc_delay,
|
||||
Vertex *to_vertex,
|
||||
const RiseFall *to_rf,
|
||||
Tag *to_tag,
|
||||
Arrival &to_arrival,
|
||||
const MinMax *min_max);
|
||||
bool visitFromToPath(const Pin *from_pin,
|
||||
Vertex *from_vertex,
|
||||
const RiseFall *from_rf,
|
||||
Tag *from_tag,
|
||||
Path *from_path,
|
||||
const Arrival &from_arrival,
|
||||
Edge *edge,
|
||||
TimingArc *arc,
|
||||
ArcDelay arc_delay,
|
||||
Vertex *to_vertex,
|
||||
const RiseFall *to_rf,
|
||||
Tag *to_tag,
|
||||
Arrival &to_arrival,
|
||||
const MinMax *min_max) override;
|
||||
void setAlwaysToEndpoints(bool to_endpoints);
|
||||
TagGroupBldr *tagBldr() const { return tag_bldr_; }
|
||||
|
||||
@@ -814,7 +816,6 @@ protected:
|
||||
class RequiredCmp
|
||||
{
|
||||
public:
|
||||
RequiredCmp();
|
||||
void requiredsInit(Vertex *vertex,
|
||||
const StaState *sta);
|
||||
void requiredSet(size_t path_index,
|
||||
@@ -827,8 +828,8 @@ public:
|
||||
Required required(size_t path_index);
|
||||
|
||||
protected:
|
||||
ArrivalSeq requireds_;
|
||||
bool have_requireds_;
|
||||
ArrivalSeq requireds_{10};
|
||||
bool have_requireds_{false};
|
||||
};
|
||||
|
||||
// Visitor called during backward search to record a
|
||||
@@ -837,31 +838,31 @@ class RequiredVisitor : public PathVisitor
|
||||
{
|
||||
public:
|
||||
RequiredVisitor(const StaState *sta);
|
||||
virtual ~RequiredVisitor();
|
||||
virtual VertexVisitor *copy() const;
|
||||
virtual void visit(Vertex *vertex);
|
||||
~RequiredVisitor() override;
|
||||
VertexVisitor *copy() const override;
|
||||
void visit(Vertex *vertex) override;
|
||||
// Return false to stop visiting.
|
||||
bool visitFromToPath(const Pin *from_pin,
|
||||
Vertex *from_vertex,
|
||||
const RiseFall *from_rf,
|
||||
Tag *from_tag,
|
||||
Path *from_path,
|
||||
const Arrival &from_arrival,
|
||||
Edge *edge,
|
||||
TimingArc *arc,
|
||||
ArcDelay arc_delay,
|
||||
Vertex *to_vertex,
|
||||
const RiseFall *to_rf,
|
||||
Tag *to_tag,
|
||||
Arrival &to_arrival,
|
||||
const MinMax *min_max) override;
|
||||
|
||||
protected:
|
||||
RequiredVisitor(bool make_tag_cache,
|
||||
const StaState *sta);
|
||||
// Return false to stop visiting.
|
||||
virtual bool visitFromToPath(const Pin *from_pin,
|
||||
Vertex *from_vertex,
|
||||
const RiseFall *from_rf,
|
||||
Tag *from_tag,
|
||||
Path *from_path,
|
||||
const Arrival &from_arrival,
|
||||
Edge *edge,
|
||||
TimingArc *arc,
|
||||
ArcDelay arc_delay,
|
||||
Vertex *to_vertex,
|
||||
const RiseFall *to_rf,
|
||||
Tag *to_tag,
|
||||
Arrival &to_arrival,
|
||||
const MinMax *min_max);
|
||||
|
||||
RequiredCmp *required_cmp_;
|
||||
VisitPathEnds *visit_path_ends_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -129,4 +129,4 @@ static const int path_ap_index_bit_count = 8;
|
||||
// One path analysis point per scene min/max.
|
||||
static const int scene_count_max = (1 << path_ap_index_bit_count) / 2;
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -47,7 +47,7 @@ class SearchPred
|
||||
{
|
||||
public:
|
||||
SearchPred(const StaState *sta);
|
||||
virtual ~SearchPred() {}
|
||||
virtual ~SearchPred() = default;
|
||||
// Search is allowed from from_vertex.
|
||||
virtual bool searchFrom(const Vertex *from_vertex,
|
||||
const Mode *mode) const = 0;
|
||||
@@ -158,4 +158,4 @@ hasFanout(Vertex *vertex,
|
||||
const Graph *graph,
|
||||
const Mode *mode);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -141,4 +141,4 @@ private:
|
||||
StateInternalValues next_values_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+37
-38
@@ -81,7 +81,7 @@ using SlowDrvrIterator = Iterator<Instance*>;
|
||||
using CheckError = StringSeq;
|
||||
using CheckErrorSeq = std::vector<CheckError*>;
|
||||
enum class CmdNamespace { sta, sdc };
|
||||
using ParasiticsNameMap = std::map<std::string, Parasitics*>;
|
||||
using ParasiticsNameMap = std::map<std::string, Parasitics*, std::less<>>;
|
||||
// Path::slack/arrival/required function.
|
||||
using PathDelayFunc = std::function<Delay (const Path *path)>;
|
||||
using GraphLoopSeq = std::vector<GraphLoop*>;
|
||||
@@ -103,7 +103,6 @@ deleteAllMemory();
|
||||
class Sta : public StaState
|
||||
{
|
||||
public:
|
||||
Sta();
|
||||
// The Sta is a FACTORY for the components.
|
||||
// makeComponents calls the make{Component} virtual functions.
|
||||
// Ideally this would be called by the Sta constructor, but a
|
||||
@@ -114,7 +113,7 @@ public:
|
||||
// pointers to some components have changed.
|
||||
// This must be called after changing any of the StaState components.
|
||||
virtual void updateComponentsState();
|
||||
virtual ~Sta();
|
||||
~Sta() override;
|
||||
|
||||
// Singleton accessor used by tcl command interpreter.
|
||||
static Sta *sta();
|
||||
@@ -232,7 +231,7 @@ public:
|
||||
Sdc *sdc);
|
||||
// Set net wire capacitance (set_load -wire net).
|
||||
void setNetWireCap(const Net *net,
|
||||
bool subtract_pin_load,
|
||||
bool subtract_pin_cap,
|
||||
const MinMaxAll *min_max,
|
||||
float cap,
|
||||
Sdc *sdc);
|
||||
@@ -312,7 +311,7 @@ public:
|
||||
Sdc *sdc);
|
||||
void setSlewLimit(Clock *clk,
|
||||
const RiseFallBoth *rf,
|
||||
const PathClkOrData clk_data,
|
||||
PathClkOrData clk_data,
|
||||
const MinMax *min_max,
|
||||
float slew,
|
||||
Sdc *sdc);
|
||||
@@ -385,7 +384,7 @@ public:
|
||||
const Mode *mode);
|
||||
void removePropagatedClock(Pin *pin,
|
||||
const Mode *mode);
|
||||
void setClockSlew(Clock *clock,
|
||||
void setClockSlew(Clock *clk,
|
||||
const RiseFallBoth *rf,
|
||||
const MinMaxAll *min_max,
|
||||
float slew,
|
||||
@@ -441,12 +440,12 @@ public:
|
||||
const RiseFallBoth *to_rf,
|
||||
const SetupHoldAll *setup_hold,
|
||||
Sdc *sdc);
|
||||
ClockGroups *makeClockGroups(const std::string &name,
|
||||
ClockGroups *makeClockGroups(std::string_view name,
|
||||
bool logically_exclusive,
|
||||
bool physically_exclusive,
|
||||
bool asynchronous,
|
||||
bool allow_paths,
|
||||
std::string comment,
|
||||
std::string_view comment,
|
||||
Sdc *sdc);
|
||||
void removeClockGroupsLogicallyExclusive(Sdc *sdc);
|
||||
void removeClockGroupsLogicallyExclusive(const std::string &name,
|
||||
@@ -700,7 +699,7 @@ public:
|
||||
|
||||
InstanceSet findRegisterInstances(ClockSet *clks,
|
||||
const RiseFallBoth *clk_rf,
|
||||
bool edge_triggered,
|
||||
bool registers,
|
||||
bool latches,
|
||||
const Mode *mode);
|
||||
PinSet findRegisterDataPins(ClockSet *clks,
|
||||
@@ -1151,9 +1150,9 @@ public:
|
||||
const SceneSeq &scenes,
|
||||
const MinMax *min_max);
|
||||
|
||||
const ArcDelay arcDelay(Edge *edge,
|
||||
TimingArc *arc,
|
||||
DcalcAPIndex ap_index);
|
||||
ArcDelay arcDelay(Edge *edge,
|
||||
TimingArc *arc,
|
||||
DcalcAPIndex ap_index);
|
||||
// True if the timing arc has been back-annotated.
|
||||
bool arcDelayAnnotated(Edge *edge,
|
||||
TimingArc *arc,
|
||||
@@ -1187,8 +1186,8 @@ public:
|
||||
// Instances sorted by max driver pin slew.
|
||||
InstanceSeq slowDrivers(int count);
|
||||
|
||||
Parasitics *makeConcreteParasitics(std::string name,
|
||||
std::string filename);
|
||||
Parasitics *makeConcreteParasitics(std::string_view name,
|
||||
std::string_view filename);
|
||||
// Annotate hierarchical "instance" with parasitics.
|
||||
// The parasitic analysis point is ap_name.
|
||||
// The parasitic memory footprint is much smaller if parasitic
|
||||
@@ -1518,23 +1517,23 @@ protected:
|
||||
bool report_variance,
|
||||
int digits,
|
||||
bool find_required,
|
||||
PathDelayFunc get_path_delay);
|
||||
const PathDelayFunc &get_path_delay);
|
||||
void reportDelaysWrtClks(Vertex *vertex,
|
||||
const Scene *scene,
|
||||
bool report_variance,
|
||||
int digits,
|
||||
bool find_required,
|
||||
PathDelayFunc get_path_delay);
|
||||
const PathDelayFunc &get_path_delay);
|
||||
void reportDelaysWrtClks(Vertex *vertex,
|
||||
const ClockEdge *clk_edge,
|
||||
const Scene *scene,
|
||||
bool report_variance,
|
||||
int digits,
|
||||
PathDelayFunc get_path_delay);
|
||||
const PathDelayFunc &get_path_delay);
|
||||
RiseFallMinMaxDelay findDelaysWrtClks(Vertex *vertex,
|
||||
const ClockEdge *clk_edge,
|
||||
const Scene *scene,
|
||||
PathDelayFunc get_path_delay);
|
||||
const PathDelayFunc &get_path_delay);
|
||||
std::string formatDelay(const RiseFall *rf,
|
||||
const MinMax *min_max,
|
||||
const RiseFallMinMaxDelay &delays,
|
||||
@@ -1608,30 +1607,30 @@ protected:
|
||||
Parasitics *parasitics);
|
||||
void deleteScenes();
|
||||
|
||||
Scene *cmd_scene_;
|
||||
CmdNamespace cmd_namespace_;
|
||||
Instance *current_instance_;
|
||||
Scene *cmd_scene_{nullptr};
|
||||
CmdNamespace cmd_namespace_{CmdNamespace::sdc};
|
||||
Instance *current_instance_{nullptr};
|
||||
SceneNameMap scene_name_map_;
|
||||
ModeNameMap mode_name_map_;
|
||||
ParasiticsNameMap parasitics_name_map_;
|
||||
VerilogReader *verilog_reader_;
|
||||
CheckTiming *check_timing_;
|
||||
CheckSlews *check_slews_;
|
||||
CheckFanouts *check_fanouts_;
|
||||
CheckCapacitances *check_capacitances_;
|
||||
CheckMinPulseWidths *check_min_pulse_widths_;
|
||||
CheckMinPeriods *check_min_periods_;
|
||||
CheckMaxSkews *check_max_skews_;
|
||||
ClkSkews *clk_skews_;
|
||||
ReportPath *report_path_;
|
||||
Power *power_;
|
||||
Tcl_Interp *tcl_interp_;
|
||||
bool update_genclks_;
|
||||
EquivCells *equiv_cells_;
|
||||
Properties properties_;
|
||||
VerilogReader *verilog_reader_{nullptr};
|
||||
CheckTiming *check_timing_{nullptr};
|
||||
CheckSlews *check_slews_{nullptr};
|
||||
CheckFanouts *check_fanouts_{nullptr};
|
||||
CheckCapacitances *check_capacitances_{nullptr};
|
||||
CheckMinPulseWidths *check_min_pulse_widths_{nullptr};
|
||||
CheckMinPeriods *check_min_periods_{nullptr};
|
||||
CheckMaxSkews *check_max_skews_{nullptr};
|
||||
ClkSkews *clk_skews_{nullptr};
|
||||
ReportPath *report_path_{nullptr};
|
||||
Power *power_{nullptr};
|
||||
Tcl_Interp *tcl_interp_{nullptr};
|
||||
bool update_genclks_{false};
|
||||
EquivCells *equiv_cells_{nullptr};
|
||||
Properties properties_{this};
|
||||
|
||||
// Singleton sta used by tcl command interpreter.
|
||||
static Sta *sta_;
|
||||
inline static Sta *sta_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -75,4 +75,4 @@ sourceTclFile(const char *filename,
|
||||
bool verbose,
|
||||
Tcl_Interp *interp);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
// Copy the state from sta. This is virtual so that a component
|
||||
// can notify sub-components.
|
||||
virtual void copyState(const StaState *sta);
|
||||
virtual ~StaState() {}
|
||||
virtual ~StaState() = default;
|
||||
Report *report() { return report_; }
|
||||
Report *report() const { return report_; }
|
||||
void setReport(Report *report);
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
size_t scenePathCount() const;
|
||||
DcalcAPIndex dcalcAnalysisPtCount() const;
|
||||
|
||||
const SceneSet scenesSet();
|
||||
SceneSet scenesSet();
|
||||
|
||||
ModeSeq &modes() { return modes_; }
|
||||
const ModeSeq &modes() const { return modes_; }
|
||||
@@ -141,4 +141,4 @@ protected:
|
||||
DispatchQueue *dispatch_queue_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -40,12 +40,12 @@ public:
|
||||
void report(const char *step);
|
||||
|
||||
private:
|
||||
double elapsed_begin_;
|
||||
double user_begin_;
|
||||
double system_begin_;
|
||||
size_t memory_begin_;
|
||||
double elapsed_begin_{0.0};
|
||||
double user_begin_{0.0};
|
||||
double system_begin_{0.0};
|
||||
size_t memory_begin_{0};
|
||||
Debug *debug_;
|
||||
Report *report_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+12
-17
@@ -1,5 +1,5 @@
|
||||
// OpenSTA, Static Timing Analyzer
|
||||
// Copyright (c) 2025, Parallax Software, Inc.
|
||||
// Copyright (c) 2026, Parallax Software, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -25,11 +25,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <cstdarg>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <strings.h> // for strncasecmp
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
||||
@@ -64,6 +64,13 @@ stringBeginEq(const char *str1,
|
||||
return strncmp(str1, str2, strlen(str2)) == 0;
|
||||
}
|
||||
|
||||
inline bool
|
||||
charEqual(unsigned char c1,
|
||||
unsigned char c2)
|
||||
{
|
||||
return std::tolower(c1) == std::tolower(c2);
|
||||
}
|
||||
|
||||
// Case insensitive compare the beginning of str1 to str2.
|
||||
inline bool
|
||||
stringBeginEqual(std::string_view str,
|
||||
@@ -71,7 +78,7 @@ stringBeginEqual(std::string_view str,
|
||||
{
|
||||
if (str.size() < prefix.size())
|
||||
return false;
|
||||
return strncasecmp(str.data(), prefix.data(), prefix.size()) == 0;
|
||||
return std::ranges::equal(str.substr(0, prefix.size()), prefix, charEqual);
|
||||
}
|
||||
|
||||
// Case insensitive compare.
|
||||
@@ -79,19 +86,7 @@ inline bool
|
||||
stringEqual(std::string_view s1,
|
||||
std::string_view s2)
|
||||
{
|
||||
return std::ranges::equal(s1, s2, [](unsigned char c1, unsigned char c2) {
|
||||
return std::tolower(c1) == std::tolower(c2);
|
||||
});
|
||||
}
|
||||
|
||||
void
|
||||
stringDeleteCheck(const char *str);
|
||||
|
||||
// Delete for strings allocated with new char[].
|
||||
inline void
|
||||
stringDelete(const char *str)
|
||||
{
|
||||
delete [] str;
|
||||
return std::ranges::equal(s1, s2, charEqual);
|
||||
}
|
||||
|
||||
std::pair<float, bool>
|
||||
@@ -114,4 +109,4 @@ StringSeq
|
||||
parseTokens(const std::string &text,
|
||||
std::string_view delims = " \t");
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+13
-16
@@ -73,7 +73,6 @@ public:
|
||||
GateTableModel(LibertyCell *cell,
|
||||
TableModels *delay_models,
|
||||
TableModels *slew_models);
|
||||
~GateTableModel() override;
|
||||
void gateDelay(const Pvt *pvt,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
@@ -96,6 +95,7 @@ public:
|
||||
PocvMode pocv_mode,
|
||||
int digits) const override;
|
||||
float driveResistance(const Pvt *pvt) const override;
|
||||
void setIsScaled(bool is_scaled) override;
|
||||
|
||||
const TableModels *delayModels() const { return delay_models_.get(); }
|
||||
const TableModel *delayModel() const;
|
||||
@@ -112,10 +112,9 @@ protected:
|
||||
const Pvt *pvt,
|
||||
float &slew,
|
||||
float &cap) const;
|
||||
void setIsScaled(bool is_scaled) override;
|
||||
float axisValue(const TableAxis *axis,
|
||||
float load_cap,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
float related_out_cap) const;
|
||||
float findValue(const Pvt *pvt,
|
||||
const TableModel *model,
|
||||
@@ -150,7 +149,6 @@ class CheckTableModel : public CheckTimingModel
|
||||
public:
|
||||
CheckTableModel(LibertyCell *cell,
|
||||
TableModels *check_models);
|
||||
~CheckTableModel() override;
|
||||
ArcDelay checkDelay(const Pvt *pvt,
|
||||
float from_slew,
|
||||
float to_slew,
|
||||
@@ -167,13 +165,13 @@ public:
|
||||
int digits) const override;
|
||||
const TableModels *checkModels() const { return check_models_.get(); }
|
||||
const TableModel *checkModel() const;
|
||||
void setIsScaled(bool is_scaled) override;
|
||||
|
||||
// Check the axes before making the model.
|
||||
// Return true if the model axes are supported.
|
||||
static bool checkAxes(const TableModel *table);
|
||||
|
||||
protected:
|
||||
void setIsScaled(bool is_scaled) override;
|
||||
float findValue(const Pvt *pvt,
|
||||
const TableModel *model,
|
||||
float from_slew,
|
||||
@@ -187,8 +185,8 @@ protected:
|
||||
float &axis_value2,
|
||||
float &axis_value3) const;
|
||||
float axisValue(const TableAxis *axis,
|
||||
float load_cap,
|
||||
float in_slew,
|
||||
float from_slew,
|
||||
float to_slew,
|
||||
float related_out_cap) const;
|
||||
std::string reportTableDelay(std::string_view result_name,
|
||||
const Pvt *pvt,
|
||||
@@ -247,19 +245,19 @@ public:
|
||||
TableAxisPtr axis1,
|
||||
TableAxisPtr axis2,
|
||||
TableAxisPtr axis3);
|
||||
Table(Table &&table);
|
||||
Table(Table &&table) noexcept;
|
||||
Table(const Table &table);
|
||||
Table &operator=(Table &&table);
|
||||
Table &operator=(Table &&table) noexcept;
|
||||
|
||||
void setIsScaled(bool is_scaled);
|
||||
void setScaleFactorType(ScaleFactorType type);
|
||||
int order() const { return order_; }
|
||||
const TableAxis *axis1() const { return axis1_.get(); }
|
||||
const TableAxis *axis2() const { return axis2_.get(); }
|
||||
const TableAxis *axis3() const { return axis3_.get(); }
|
||||
const TableAxisPtr axis1ptr() const { return axis1_; }
|
||||
const TableAxisPtr axis2ptr() const { return axis2_; }
|
||||
const TableAxisPtr axis3ptr() const { return axis3_; }
|
||||
void setIsScaled(bool is_scaled);
|
||||
TableAxisPtr axis1ptr() const { return axis1_; }
|
||||
TableAxisPtr axis2ptr() const { return axis2_; }
|
||||
TableAxisPtr axis3ptr() const { return axis3_; }
|
||||
|
||||
float value(size_t axis_idx1,
|
||||
size_t axis_idx2,
|
||||
@@ -440,7 +438,6 @@ protected:
|
||||
class ReceiverModel
|
||||
{
|
||||
public:
|
||||
~ReceiverModel();
|
||||
void setCapacitanceModel(TableModel table_model,
|
||||
size_t segment,
|
||||
const RiseFall *rf);
|
||||
@@ -529,7 +526,7 @@ private:
|
||||
Table1Seq voltage_waveforms_;
|
||||
Table1Seq voltage_currents_;
|
||||
Table ref_times_;
|
||||
float vdd_;
|
||||
float vdd_{0.0F};
|
||||
static constexpr size_t voltage_waveform_step_count_ = 100;
|
||||
};
|
||||
|
||||
@@ -546,4 +543,4 @@ private:
|
||||
TablePtr waveforms_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -64,4 +64,4 @@ ArcDcalcArg
|
||||
arcDcalcArgTcl(Tcl_Obj *obj,
|
||||
Tcl_Interp *interp);
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+10
-10
@@ -86,7 +86,7 @@ enum class TimingType {
|
||||
std::string_view
|
||||
to_string(TimingType type);
|
||||
TimingType
|
||||
findTimingType(std::string_view string);
|
||||
findTimingType(std::string_view type_name);
|
||||
bool
|
||||
timingTypeIsCheck(TimingType type);
|
||||
ScaleFactorType
|
||||
@@ -107,15 +107,15 @@ public:
|
||||
FuncExpr *cond() const { return cond_; }
|
||||
void setCond(FuncExpr *cond);
|
||||
const std::string &sdfCond() const { return sdf_cond_; }
|
||||
void setSdfCond(std::string cond);
|
||||
void setSdfCond(std::string_view cond);
|
||||
const std::string &sdfCondStart() const { return sdf_cond_start_; }
|
||||
void setSdfCondStart(std::string cond);
|
||||
void setSdfCondStart(std::string_view cond);
|
||||
const std::string &sdfCondEnd() const { return sdf_cond_end_; }
|
||||
void setSdfCondEnd(std::string cond);
|
||||
void setSdfCondEnd(std::string_view cond);
|
||||
const std::string &modeName() const { return mode_name_; }
|
||||
void setModeName(std::string name);
|
||||
void setModeName(std::string_view name);
|
||||
const std::string &modeValue() const { return mode_value_; }
|
||||
void setModeValue(std::string value);
|
||||
void setModeValue(std::string_view value);
|
||||
TimingModel *model(const RiseFall *rf) const;
|
||||
void setModel(const RiseFall *rf,
|
||||
TimingModel *model);
|
||||
@@ -260,9 +260,9 @@ public:
|
||||
GateTableModel *gateTableModel() const;
|
||||
GateTableModel *gateTableModel(const Scene *scene,
|
||||
const MinMax *min_max) const;
|
||||
const TimingArc *sceneArc(int ap_index) const;
|
||||
const TimingArc *sceneArc(size_t lib_ap_index) const;
|
||||
void setSceneArc(TimingArc *scene_arc,
|
||||
int ap_index);
|
||||
size_t lib_ap_index);
|
||||
float driveResistance() const;
|
||||
ArcDelay intrinsicDelay() const;
|
||||
|
||||
@@ -281,7 +281,7 @@ protected:
|
||||
const Transition *to_rf_;
|
||||
unsigned index_;
|
||||
TimingModel *model_;
|
||||
ScaledTimingModelMap *scaled_models_;
|
||||
ScaledTimingModelMap *scaled_models_{nullptr};
|
||||
std::vector<TimingArc*> scene_arcs_;
|
||||
|
||||
private:
|
||||
@@ -290,4 +290,4 @@ private:
|
||||
friend class TimingArcSet;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -38,7 +38,7 @@ class TimingModel
|
||||
{
|
||||
public:
|
||||
TimingModel(LibertyCell *cell);
|
||||
virtual ~TimingModel() {}
|
||||
virtual ~TimingModel() = default;
|
||||
virtual void setIsScaled(bool is_scaled) = 0;
|
||||
|
||||
protected:
|
||||
@@ -97,4 +97,4 @@ public:
|
||||
int digits) const = 0;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -144,4 +144,4 @@ private:
|
||||
friend class TimingRoleLess;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
+34
-34
@@ -47,43 +47,43 @@ public:
|
||||
// Singleton accessors.
|
||||
static const RiseFall *rise() { return &rise_; }
|
||||
static const RiseFall *fall() { return &fall_; }
|
||||
static int riseIndex() { return rise_.sdf_triple_index_; }
|
||||
static int fallIndex() { return fall_.sdf_triple_index_; }
|
||||
static size_t riseIndex() { return rise_.sdf_triple_index_; }
|
||||
static size_t fallIndex() { return fall_.sdf_triple_index_; }
|
||||
const std::string &to_string(bool use_short = false) const;
|
||||
const std::string &name() const { return name_; }
|
||||
const std::string &shortName() const { return short_name_; }
|
||||
int index() const { return sdf_triple_index_; }
|
||||
size_t index() const { return sdf_triple_index_; }
|
||||
const RiseFallBoth *asRiseFallBoth();
|
||||
const RiseFallBoth *asRiseFallBoth() const;
|
||||
const Transition *asTransition() const;
|
||||
// Find transition corresponding to rf_str.
|
||||
static const RiseFall *find(std::string_view rf_str);
|
||||
static const RiseFall *find(std::string_view rf_name);
|
||||
// Find transition from index.
|
||||
static const RiseFall *find(int index);
|
||||
static const RiseFall *find(size_t index);
|
||||
const RiseFall *opposite() const;
|
||||
|
||||
// for range support.
|
||||
// for (auto rf : RiseFall::range()) {}
|
||||
static const std::array<const RiseFall*, 2> &range() { return range_; }
|
||||
// for (auto rf_index : RiseFall::rangeIndex()) {}
|
||||
static const std::array<int, 2> &rangeIndex() { return range_index_; }
|
||||
static const int index_count = 2;
|
||||
static const int index_max = (index_count - 1);
|
||||
static const int index_bit_count = 1;
|
||||
static const std::array<size_t, 2> &rangeIndex() { return range_index_; }
|
||||
static const size_t index_count = 2;
|
||||
static const size_t index_max = (index_count - 1);
|
||||
static const size_t index_bit_count = 1;
|
||||
|
||||
protected:
|
||||
RiseFall(std::string_view name,
|
||||
std::string_view short_name,
|
||||
int sdf_triple_index);
|
||||
size_t sdf_triple_index);
|
||||
|
||||
const std::string name_;
|
||||
const std::string short_name_;
|
||||
const int sdf_triple_index_;
|
||||
const size_t sdf_triple_index_;
|
||||
|
||||
static const RiseFall rise_;
|
||||
static const RiseFall fall_;
|
||||
static const std::array<const RiseFall*, 2> range_;
|
||||
static const std::array<int, 2> range_index_;
|
||||
static const std::array<size_t, 2> range_index_;
|
||||
};
|
||||
|
||||
// Rise/fall/risefall transition.
|
||||
@@ -97,35 +97,35 @@ public:
|
||||
const std::string &to_string(bool use_short = false) const;
|
||||
const std::string &name() const { return name_; }
|
||||
const std::string &shortName() const { return short_name_; }
|
||||
int index() const { return sdf_triple_index_; }
|
||||
size_t index() const { return sdf_triple_index_; }
|
||||
bool matches(const RiseFall *rf) const;
|
||||
bool matches(const Transition *tr) const;
|
||||
const RiseFall *asRiseFall() const { return as_rise_fall_; }
|
||||
// Find transition corresponding to string.
|
||||
static const RiseFallBoth *find(std::string_view tr_str);
|
||||
static const RiseFallBoth *find(std::string_view rf_name);
|
||||
// for (const auto rf : rf->range()) {}
|
||||
const std::vector<const RiseFall*> &range() const { return range_; }
|
||||
// for (const auto rf_index : rf->rangeIndex()) {}
|
||||
const std::vector<int> &rangeIndex() const { return range_index_; }
|
||||
const std::vector<size_t> &rangeIndex() const { return range_index_; }
|
||||
|
||||
static const int index_count = 3;
|
||||
static const int index_max = (index_count - 1);
|
||||
static const int index_bit_count = 2;
|
||||
static const size_t index_count = 3;
|
||||
static const size_t index_max = (index_count - 1);
|
||||
static const size_t index_bit_count = 2;
|
||||
|
||||
protected:
|
||||
RiseFallBoth(std::string_view name,
|
||||
std::string_view short_name,
|
||||
int sdf_triple_index,
|
||||
size_t sdf_triple_index,
|
||||
const RiseFall *as_rise_fall,
|
||||
std::vector<const RiseFall*> range,
|
||||
std::vector<int> range_index);
|
||||
const std::vector<const RiseFall*> &range,
|
||||
const std::vector<size_t> &range_index);
|
||||
|
||||
const std::string name_;
|
||||
const std::string short_name_;
|
||||
const int sdf_triple_index_;
|
||||
const size_t sdf_triple_index_;
|
||||
const RiseFall *as_rise_fall_;
|
||||
const std::vector<const RiseFall*> range_;
|
||||
const std::vector<int> range_index_;
|
||||
const std::vector<size_t> range_index_;
|
||||
|
||||
static const RiseFallBoth rise_;
|
||||
static const RiseFallBoth fall_;
|
||||
@@ -154,25 +154,25 @@ public:
|
||||
const std::string &to_string() const { return name_; }
|
||||
// As initial/final value pair.
|
||||
const std::string &asInitFinalString() const { return init_final_; }
|
||||
int sdfTripleIndex() const { return sdf_triple_index_; }
|
||||
int index() const { return sdf_triple_index_; }
|
||||
size_t sdfTripleIndex() const { return sdf_triple_index_; }
|
||||
size_t index() const { return sdf_triple_index_; }
|
||||
const RiseFall *asRiseFall() const { return as_rise_fall_; }
|
||||
const RiseFallBoth *asRiseFallBoth() const;
|
||||
bool matches(const Transition *tr) const;
|
||||
// Find transition corresponding to string.
|
||||
static const Transition *find(std::string_view tr_str);
|
||||
static int maxIndex() { return max_index_; }
|
||||
static const Transition *find(std::string_view tr_name);
|
||||
static size_t maxIndex() { return max_index_; }
|
||||
|
||||
private:
|
||||
Transition(std::string_view name,
|
||||
std::string_view init_final,
|
||||
const RiseFall *as_rise_fall,
|
||||
int sdf_triple_index);
|
||||
size_t sdf_triple_index);
|
||||
|
||||
const std::string name_;
|
||||
const std::string init_final_;
|
||||
const RiseFall *as_rise_fall_;
|
||||
const int sdf_triple_index_;
|
||||
const size_t sdf_triple_index_;
|
||||
|
||||
static const Transition rise_;
|
||||
static const Transition fall_;
|
||||
@@ -187,12 +187,12 @@ private:
|
||||
static const Transition tr_XZ_;
|
||||
static const Transition tr_ZX_;
|
||||
static const Transition rise_fall_;
|
||||
static const int index_count = 13;
|
||||
static const int index_max = (index_count - 1);
|
||||
static const int index_bit_count = 4;
|
||||
static const size_t index_count = 13;
|
||||
static const size_t index_max = (index_count - 1);
|
||||
static const size_t index_bit_count = 4;
|
||||
|
||||
static TransitionMap transition_map_;
|
||||
static int max_index_;
|
||||
static size_t max_index_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
double staToUser(double value);
|
||||
// Convert from user interface units to sta units.
|
||||
double userToSta(double value);
|
||||
void operator=(const Unit &unit);
|
||||
Unit &operator=(const Unit &unit) = default;
|
||||
float scale() const { return scale_; }
|
||||
void setScale(float scale);
|
||||
// Mkmunpf abbreviation for scale.
|
||||
@@ -76,7 +76,7 @@ class Units
|
||||
public:
|
||||
Units();
|
||||
Unit *find(std::string_view unit_name);
|
||||
void operator=(const Units &units);
|
||||
Units &operator=(const Units &units);
|
||||
Unit *timeUnit() { return &time_unit_; }
|
||||
const Unit *timeUnit() const { return &time_unit_; }
|
||||
Unit *capacitanceUnit() { return &capacitance_unit_; }
|
||||
@@ -105,4 +105,4 @@ private:
|
||||
Unit scalar_unit_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -97,4 +97,4 @@ private:
|
||||
float pocv_quantile_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace sta
|
||||
|
||||
@@ -99,14 +99,14 @@ private:
|
||||
Compare comp_;
|
||||
|
||||
// Helper to find insertion point using binary search
|
||||
typename storage_type::iterator findInsertPos(const Key& key) {
|
||||
storage_type::iterator findInsertPos(const Key& key) {
|
||||
return std::lower_bound(data_.begin(), data_.end(), key,
|
||||
[this](const auto& pair, const Key& k) {
|
||||
return comp_(pair.first, k);
|
||||
});
|
||||
}
|
||||
|
||||
typename storage_type::const_iterator findInsertPos(const Key& key) const {
|
||||
storage_type::const_iterator findInsertPos(const Key& key) const {
|
||||
return std::lower_bound(data_.begin(), data_.end(), key,
|
||||
[this](const auto& pair, const Key& k) {
|
||||
return comp_(pair.first, k);
|
||||
@@ -126,15 +126,12 @@ private:
|
||||
using reference = proxy_type;
|
||||
using pointer = proxy_type*;
|
||||
|
||||
IteratorAdapter() = default;
|
||||
explicit IteratorAdapter(BaseIter it) : it_(it) {}
|
||||
|
||||
// Conversion constructor: allow conversion from non-const to const iterator
|
||||
template <typename OtherIter>
|
||||
IteratorAdapter(const IteratorAdapter<OtherIter>& other,
|
||||
typename std::enable_if<
|
||||
std::is_convertible_v<OtherIter, BaseIter>
|
||||
>::type* = nullptr)
|
||||
requires std::is_convertible_v<OtherIter, BaseIter>
|
||||
IteratorAdapter(const IteratorAdapter<OtherIter>& other)
|
||||
: it_(other.base()) {}
|
||||
|
||||
reference operator*() {
|
||||
@@ -166,11 +163,8 @@ private:
|
||||
|
||||
// Assignment operator: allow assignment from non-const to const iterator
|
||||
template <typename OtherIter>
|
||||
typename std::enable_if<
|
||||
std::is_convertible_v<OtherIter, BaseIter>,
|
||||
IteratorAdapter&
|
||||
>::type
|
||||
operator=(const IteratorAdapter<OtherIter>& other) {
|
||||
requires std::is_convertible_v<OtherIter, BaseIter>
|
||||
IteratorAdapter& operator=(const IteratorAdapter<OtherIter>& other) {
|
||||
it_ = other.base();
|
||||
return *this;
|
||||
}
|
||||
@@ -263,7 +257,6 @@ public:
|
||||
using reverse_iterator = std::reverse_iterator<iterator>;
|
||||
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
|
||||
|
||||
VectorMap() = default;
|
||||
explicit VectorMap(const Compare& comp) : comp_(comp) {}
|
||||
|
||||
template <typename InputIt>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user