parent
21848bcdd2
commit
134cf2cab7
|
|
@ -24,27 +24,27 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <atomic>
|
|
||||||
#include <functional>
|
|
||||||
#include <map>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
#include <atomic>
|
||||||
|
#include <functional>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "ConcreteLibrary.hh"
|
|
||||||
#include "ContainerHelpers.hh"
|
#include "ContainerHelpers.hh"
|
||||||
|
#include "MinMax.hh"
|
||||||
|
#include "RiseFallMinMax.hh"
|
||||||
|
#include "ConcreteLibrary.hh"
|
||||||
|
#include "RiseFallValues.hh"
|
||||||
|
#include "MinMaxValues.hh"
|
||||||
|
#include "Transition.hh"
|
||||||
#include "Delay.hh"
|
#include "Delay.hh"
|
||||||
#include "InternalPower.hh"
|
#include "InternalPower.hh"
|
||||||
#include "LeakagePower.hh"
|
#include "LeakagePower.hh"
|
||||||
#include "LibertyClass.hh"
|
#include "LibertyClass.hh"
|
||||||
#include "MinMax.hh"
|
|
||||||
#include "MinMaxValues.hh"
|
|
||||||
#include "RiseFallMinMax.hh"
|
|
||||||
#include "RiseFallValues.hh"
|
|
||||||
#include "Transition.hh"
|
|
||||||
|
|
||||||
namespace sta {
|
namespace sta {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2978,11 +2978,10 @@ scaleFactorPvtName(ScaleFactorPvt pvt)
|
||||||
ScaleFactors::ScaleFactors(std::string_view name) :
|
ScaleFactors::ScaleFactors(std::string_view name) :
|
||||||
name_(name)
|
name_(name)
|
||||||
{
|
{
|
||||||
for (auto &scale : scales_) {
|
for (auto &type_factors : scales_) {
|
||||||
for (size_t pvt = 0; pvt < scale_factor_pvt_count; pvt++) {
|
for (auto pvt_factors : type_factors) {
|
||||||
for (size_t rf_index : RiseFall::rangeIndex()) {
|
for (size_t rf_index : RiseFall::rangeIndex())
|
||||||
scale[pvt][rf_index] = 0.0;
|
pvt_factors[rf_index] = 0.0;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,6 @@ namespace sta {
|
||||||
class VcdCount
|
class VcdCount
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VcdCount();
|
|
||||||
double transitionCount() const { return transition_count_; }
|
double transitionCount() const { return transition_count_; }
|
||||||
VcdTime highTime(VcdTime time_max) const;
|
VcdTime highTime(VcdTime time_max) const;
|
||||||
void incrCounts(VcdTime time,
|
void incrCounts(VcdTime time,
|
||||||
|
|
@ -66,10 +65,6 @@ private:
|
||||||
double transition_count_ = 0;
|
double transition_count_ = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
VcdCount::VcdCount()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
VcdCount::addPin(const Pin *pin)
|
VcdCount::addPin(const Pin *pin)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,8 @@ tclListStringSeq(Tcl_Obj *const source,
|
||||||
if (Tcl_ListObjGetElements(interp, source, &argc, &argv) == TCL_OK) {
|
if (Tcl_ListObjGetElements(interp, source, &argc, &argv) == TCL_OK) {
|
||||||
for (int i = 0; i < argc; i++) {
|
for (int i = 0; i < argc; i++) {
|
||||||
Tcl_Size length;
|
Tcl_Size length;
|
||||||
const char *str = Tcl_GetStringFromObj(argv[i], &length);
|
const char *arg = Tcl_GetStringFromObj(argv[i], &length);
|
||||||
seq.push_back(str);
|
seq.emplace_back(arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return seq;
|
return seq;
|
||||||
|
|
@ -59,8 +59,8 @@ tclListStringSeqPtr(Tcl_Obj *const source,
|
||||||
StringSeq *seq = new StringSeq;
|
StringSeq *seq = new StringSeq;
|
||||||
for (int i = 0; i < argc; i++) {
|
for (int i = 0; i < argc; i++) {
|
||||||
Tcl_Size length;
|
Tcl_Size length;
|
||||||
const char *str = Tcl_GetStringFromObj(argv[i], &length);
|
const char *arg = Tcl_GetStringFromObj(argv[i], &length);
|
||||||
seq->push_back(str);
|
seq->emplace_back(arg);
|
||||||
}
|
}
|
||||||
return seq;
|
return seq;
|
||||||
}
|
}
|
||||||
|
|
@ -79,8 +79,8 @@ tclListStringSet(Tcl_Obj *const source,
|
||||||
StringSet *set = new StringSet;
|
StringSet *set = new StringSet;
|
||||||
for (int i = 0; i < argc; i++) {
|
for (int i = 0; i < argc; i++) {
|
||||||
Tcl_Size length;
|
Tcl_Size length;
|
||||||
const char *str = Tcl_GetStringFromObj(argv[i], &length);
|
const char *arg = Tcl_GetStringFromObj(argv[i], &length);
|
||||||
set->insert(str);
|
set->insert(arg);
|
||||||
}
|
}
|
||||||
return set;
|
return set;
|
||||||
}
|
}
|
||||||
|
|
@ -102,42 +102,6 @@ tclArgError(Tcl_Interp *interp,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
objectListNext(const char *list,
|
|
||||||
const char *type,
|
|
||||||
// Return values.
|
|
||||||
bool &type_match,
|
|
||||||
const char *&next)
|
|
||||||
{
|
|
||||||
// Default return values (failure).
|
|
||||||
type_match = false;
|
|
||||||
next = nullptr;
|
|
||||||
// _hexaddress_p_type
|
|
||||||
const char *s = list;
|
|
||||||
char ch = *s++;
|
|
||||||
if (ch == '_') {
|
|
||||||
while (*s && isxdigit(*s))
|
|
||||||
s++;
|
|
||||||
if ((s - list - 1) == sizeof(void*) * 2
|
|
||||||
&& *s && *s++ == '_'
|
|
||||||
&& *s && *s++ == 'p'
|
|
||||||
&& *s && *s++ == '_') {
|
|
||||||
const char *t = type;
|
|
||||||
while (*s && *s != ' ') {
|
|
||||||
if (*s != *t)
|
|
||||||
return;
|
|
||||||
s++;
|
|
||||||
t++;
|
|
||||||
}
|
|
||||||
type_match = true;
|
|
||||||
if (*s)
|
|
||||||
next = s + 1;
|
|
||||||
else
|
|
||||||
next = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Tcl_Obj *
|
Tcl_Obj *
|
||||||
tclArcDcalcArg(ArcDcalcArg &gate,
|
tclArcDcalcArg(ArcDcalcArg &gate,
|
||||||
Tcl_Interp *interp)
|
Tcl_Interp *interp)
|
||||||
|
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
// OpenSTA, Static Timing Analyzer
|
|
||||||
// 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
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
//
|
|
||||||
// The origin of this software must not be misrepresented; you must not
|
|
||||||
// claim that you wrote the original software.
|
|
||||||
//
|
|
||||||
// Altered source versions must be plainly marked as such, and must not be
|
|
||||||
// misrepresented as being the original software.
|
|
||||||
//
|
|
||||||
// This notice may not be removed or altered from any source distribution.
|
|
||||||
|
|
||||||
#if defined(_WIN32)
|
|
||||||
#include "MachineWin32.cc"
|
|
||||||
#elif defined(__APPLE__)
|
|
||||||
#include "MachineApple.cc"
|
|
||||||
#elif defined(__linux__)
|
|
||||||
#include "MachineLinux.cc"
|
|
||||||
#else
|
|
||||||
#include "MachineUnknown.cc"
|
|
||||||
#endif
|
|
||||||
|
|
@ -34,10 +34,9 @@ RiseFallMinMax::RiseFallMinMax()
|
||||||
void
|
void
|
||||||
RiseFallMinMax::clear()
|
RiseFallMinMax::clear()
|
||||||
{
|
{
|
||||||
for (size_t rf_index = 0; rf_index<RiseFall::index_count; rf_index++) {
|
for (auto rf_exists : exists_) {
|
||||||
for (size_t mm_index = 0; mm_index < MinMax::index_count; mm_index++) {
|
for (size_t mm_index = 0; mm_index < MinMax::index_count; mm_index++)
|
||||||
exists_[rf_index][mm_index] = false;
|
rf_exists[mm_index] = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -219,9 +218,9 @@ RiseFallMinMax::maxValue(// Return values
|
||||||
bool
|
bool
|
||||||
RiseFallMinMax::empty() const
|
RiseFallMinMax::empty() const
|
||||||
{
|
{
|
||||||
for (size_t rf_index = 0 ; rf_index < RiseFall::index_count ; rf_index++) {
|
for (auto rf_exists : exists_) {
|
||||||
for (size_t mm_index = 0; mm_index < MinMax::index_count; mm_index++) {
|
for (size_t mm_index = 0; mm_index < MinMax::index_count; mm_index++) {
|
||||||
if (exists_[rf_index][mm_index])
|
if (rf_exists[mm_index])
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,21 +28,19 @@ namespace sta {
|
||||||
|
|
||||||
RiseFallMinMaxDelay::RiseFallMinMaxDelay()
|
RiseFallMinMaxDelay::RiseFallMinMaxDelay()
|
||||||
{
|
{
|
||||||
for (size_t rf_index = 0; rf_index<RiseFall::index_count; rf_index++) {
|
for (auto rf_exists : exists_) {
|
||||||
for (size_t mm_index = 0; mm_index < MinMax::index_count; mm_index++) {
|
for (size_t mm_index = 0; mm_index < MinMax::index_count; mm_index++)
|
||||||
exists_[rf_index][mm_index] = false;
|
rf_exists[mm_index] = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
RiseFallMinMaxDelay::empty() const
|
RiseFallMinMaxDelay::empty() const
|
||||||
{
|
{
|
||||||
for (size_t rf_index = 0 ; rf_index < RiseFall::index_count ; rf_index++) {
|
for (auto rf_exists : exists_) {
|
||||||
for (size_t mm_index = 0; mm_index < MinMax::index_count; mm_index++) {
|
for (size_t mm_index = 0; mm_index < MinMax::index_count; mm_index++)
|
||||||
if (exists_[rf_index][mm_index])
|
if (rf_exists[mm_index])
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
17
util/Util.i
17
util/Util.i
|
|
@ -263,23 +263,6 @@ object_type(const char *obj)
|
||||||
return &obj[1 + sizeof(void*) * 2 + 3];
|
return &obj[1 + sizeof(void*) * 2 + 3];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
is_object_list(const char *list,
|
|
||||||
const char *type)
|
|
||||||
{
|
|
||||||
const char *s = list;
|
|
||||||
while (s) {
|
|
||||||
bool type_match;
|
|
||||||
const char *next;
|
|
||||||
objectListNext(s, type, type_match, next);
|
|
||||||
if (type_match)
|
|
||||||
s = next;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Units
|
// Units
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue