Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2026-04-15 18:21:47 -07:00
parent 21848bcdd2
commit 134cf2cab7
8 changed files with 30 additions and 125 deletions

View File

@ -24,27 +24,27 @@
#pragma once
#include <atomic>
#include <functional>
#include <map>
#include <memory>
#include <mutex>
#include <atomic>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <string_view>
#include <vector>
#include "ConcreteLibrary.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 "InternalPower.hh"
#include "LeakagePower.hh"
#include "LibertyClass.hh"
#include "MinMax.hh"
#include "MinMaxValues.hh"
#include "RiseFallMinMax.hh"
#include "RiseFallValues.hh"
#include "Transition.hh"
namespace sta {

View File

@ -2978,11 +2978,10 @@ scaleFactorPvtName(ScaleFactorPvt pvt)
ScaleFactors::ScaleFactors(std::string_view name) :
name_(name)
{
for (auto &scale : scales_) {
for (size_t pvt = 0; pvt < scale_factor_pvt_count; pvt++) {
for (size_t rf_index : RiseFall::rangeIndex()) {
scale[pvt][rf_index] = 0.0;
}
for (auto &type_factors : scales_) {
for (auto pvt_factors : type_factors) {
for (size_t rf_index : RiseFall::rangeIndex())
pvt_factors[rf_index] = 0.0;
}
}
}

View File

@ -48,7 +48,6 @@ namespace sta {
class VcdCount
{
public:
VcdCount();
double transitionCount() const { return transition_count_; }
VcdTime highTime(VcdTime time_max) const;
void incrCounts(VcdTime time,
@ -66,10 +65,6 @@ private:
double transition_count_ = 0;
};
VcdCount::VcdCount()
{
}
void
VcdCount::addPin(const Pin *pin)
{

View File

@ -41,8 +41,8 @@ tclListStringSeq(Tcl_Obj *const source,
if (Tcl_ListObjGetElements(interp, source, &argc, &argv) == TCL_OK) {
for (int i = 0; i < argc; i++) {
Tcl_Size length;
const char *str = Tcl_GetStringFromObj(argv[i], &length);
seq.push_back(str);
const char *arg = Tcl_GetStringFromObj(argv[i], &length);
seq.emplace_back(arg);
}
}
return seq;
@ -59,8 +59,8 @@ tclListStringSeqPtr(Tcl_Obj *const source,
StringSeq *seq = new StringSeq;
for (int i = 0; i < argc; i++) {
Tcl_Size length;
const char *str = Tcl_GetStringFromObj(argv[i], &length);
seq->push_back(str);
const char *arg = Tcl_GetStringFromObj(argv[i], &length);
seq->emplace_back(arg);
}
return seq;
}
@ -79,8 +79,8 @@ tclListStringSet(Tcl_Obj *const source,
StringSet *set = new StringSet;
for (int i = 0; i < argc; i++) {
Tcl_Size length;
const char *str = Tcl_GetStringFromObj(argv[i], &length);
set->insert(str);
const char *arg = Tcl_GetStringFromObj(argv[i], &length);
set->insert(arg);
}
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 *
tclArcDcalcArg(ArcDcalcArg &gate,
Tcl_Interp *interp)

View File

@ -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

View File

@ -34,10 +34,9 @@ RiseFallMinMax::RiseFallMinMax()
void
RiseFallMinMax::clear()
{
for (size_t rf_index = 0; rf_index<RiseFall::index_count; rf_index++) {
for (size_t mm_index = 0; mm_index < MinMax::index_count; mm_index++) {
exists_[rf_index][mm_index] = false;
}
for (auto rf_exists : exists_) {
for (size_t mm_index = 0; mm_index < MinMax::index_count; mm_index++)
rf_exists[mm_index] = false;
}
}
@ -219,9 +218,9 @@ RiseFallMinMax::maxValue(// Return values
bool
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++) {
if (exists_[rf_index][mm_index])
if (rf_exists[mm_index])
return false;
}
}

View File

@ -28,21 +28,19 @@ namespace sta {
RiseFallMinMaxDelay::RiseFallMinMaxDelay()
{
for (size_t rf_index = 0; rf_index<RiseFall::index_count; rf_index++) {
for (size_t mm_index = 0; mm_index < MinMax::index_count; mm_index++) {
exists_[rf_index][mm_index] = false;
}
for (auto rf_exists : exists_) {
for (size_t mm_index = 0; mm_index < MinMax::index_count; mm_index++)
rf_exists[mm_index] = false;
}
}
bool
RiseFallMinMaxDelay::empty() const
{
for (size_t rf_index = 0 ; rf_index < RiseFall::index_count ; rf_index++) {
for (size_t mm_index = 0; mm_index < MinMax::index_count; mm_index++) {
if (exists_[rf_index][mm_index])
for (auto rf_exists : exists_) {
for (size_t mm_index = 0; mm_index < MinMax::index_count; mm_index++)
if (rf_exists[mm_index])
return false;
}
}
return true;
}

View File

@ -263,23 +263,6 @@ object_type(const char *obj)
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