diff --git a/CMakeLists.txt b/CMakeLists.txt index 961a6ab9..b38873ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,7 +98,6 @@ set(STA_SOURCE liberty/TableModel.cc liberty/TimingArc.cc liberty/TimingRole.cc - liberty/Transition.cc liberty/Units.cc liberty/Wireload.cc @@ -135,7 +134,6 @@ set(STA_SOURCE sdc/PinPair.cc sdc/PortDelay.cc sdc/PortExtCap.cc - sdc/RiseFallMinMax.cc sdc/RiseFallValues.cc sdc/Sdc.cc sdc/SdcGraph.cc @@ -202,11 +200,13 @@ set(STA_SOURCE util/Report.cc util/ReportStd.cc util/ReportTcl.cc + util/RiseFallMinMax.cc util/Stats.cc util/StringSeq.cc util/StringSet.cc util/StringUtil.cc util/TokenParser.cc + util/Transition.cc verilog/VerilogReader.cc verilog/VerilogWriter.cc diff --git a/include/sta/MinMax.hh b/include/sta/MinMax.hh index f4543f34..ae0ebb79 100644 --- a/include/sta/MinMax.hh +++ b/include/sta/MinMax.hh @@ -126,23 +126,4 @@ private: static MinMaxAll all_; }; -//////////////////////////////////////////////////////////////// - -// Obsolete. Use range iteration. -class MinMaxIterator : public Iterator -{ -public: - MinMaxIterator() : index_(0), index_max_(MinMax::index_max) {} - explicit MinMaxIterator(const MinMaxAll *min_max); - bool hasNext() { return index_ <= index_max_; } - MinMax *next() - { return (index_++ == 0) ? MinMax::min() : MinMax::max(); } - -private: - int index_; - int index_max_; -}; - -typedef MinMaxIterator EarlyLateIterator; - } // namespace diff --git a/include/sta/Transition.hh b/include/sta/Transition.hh index 164fe3b0..2df81d8e 100644 --- a/include/sta/Transition.hh +++ b/include/sta/Transition.hh @@ -191,20 +191,4 @@ private: static int max_index_; }; -// Obsolete. Use range iteration instead. -// for (RiseFall *rf : RiseFall::range()) {} -class RiseFallIterator : public Iterator -{ -public: - RiseFallIterator() : index_(0), index_max_(RiseFall::index_max) {} - explicit RiseFallIterator(const RiseFallBoth *rf); - void init(); - virtual bool hasNext(); - virtual RiseFall *next(); - -private: - int index_; - int index_max_; -}; - } // namespace diff --git a/util/MinMax.cc b/util/MinMax.cc index ecb297d3..b4b912d1 100644 --- a/util/MinMax.cc +++ b/util/MinMax.cc @@ -171,18 +171,4 @@ MinMaxAll::find(const char *min_max) return nullptr; } -//////////////////////////////////////////////////////////////// - -MinMaxIterator::MinMaxIterator(const MinMaxAll *min_max) -{ - if (min_max == MinMaxAll::all()) { - index_ = 0; - index_max_ = MinMax::index_max; - } - else { - index_ = min_max->asMinMax()->index(); - index_max_ = index_; - } -} - } // namespace diff --git a/sdc/RiseFallMinMax.cc b/util/RiseFallMinMax.cc similarity index 100% rename from sdc/RiseFallMinMax.cc rename to util/RiseFallMinMax.cc diff --git a/liberty/Transition.cc b/util/Transition.cc similarity index 83% rename from liberty/Transition.cc rename to util/Transition.cc index 5da7aa13..88fe4b73 100644 --- a/liberty/Transition.cc +++ b/util/Transition.cc @@ -105,26 +105,26 @@ RiseFall::asTransition() const //////////////////////////////////////////////////////////////// RiseFallBoth RiseFallBoth::rise_("rise", "^", 0, - RiseFall::rise(), - {RiseFall::rise()}, - {RiseFall::riseIndex()}); + RiseFall::rise(), + {RiseFall::rise()}, + {RiseFall::riseIndex()}); RiseFallBoth RiseFallBoth::fall_("fall", "v", 1, - RiseFall::fall(), - {RiseFall::fall()}, - {RiseFall::fallIndex()}); + RiseFall::fall(), + {RiseFall::fall()}, + {RiseFall::fallIndex()}); RiseFallBoth RiseFallBoth::rise_fall_("rise_fall", "rf", 2, - nullptr, - {RiseFall::rise(), - RiseFall::fall()}, - {RiseFall::riseIndex(), - RiseFall::fallIndex()}); + nullptr, + {RiseFall::rise(), + RiseFall::fall()}, + {RiseFall::riseIndex(), + RiseFall::fallIndex()}); RiseFallBoth::RiseFallBoth(const char *name, - const char *short_name, - int sdf_triple_index, - RiseFall *as_rise_fall, - std::vector range, - std::vector range_index) : + const char *short_name, + int sdf_triple_index, + RiseFall *as_rise_fall, + std::vector range, + std::vector range_index) : name_(name), short_name_(stringCopy(short_name)), sdf_triple_index_(sdf_triple_index), @@ -240,37 +240,4 @@ Transition::setName(const char *name) name_ = stringCopy(name); } -//////////////////////////////////////////////////////////////// - -RiseFallIterator::RiseFallIterator(const RiseFallBoth *rf) -{ - if (rf == RiseFallBoth::riseFall()) { - index_ = 0; - index_max_ = RiseFall::index_max; - } - else { - index_ = rf->asRiseFall()->index(); - index_max_ = index_; - } -} - -void -RiseFallIterator::init() -{ - index_ = 0; - index_max_ = RiseFall::index_max; -} - -bool -RiseFallIterator::hasNext() -{ - return index_ <= index_max_; -} - -RiseFall * -RiseFallIterator::next() -{ - return (index_++ == 0) ? RiseFall::rise() : RiseFall::fall(); -} - } // namespace