tidy round1
This commit is contained in:
parent
0a8a86d606
commit
63efee64bf
|
|
@ -0,0 +1,77 @@
|
||||||
|
Checks: >
|
||||||
|
clang-diagnostic-*,
|
||||||
|
clang-analyzer-*,
|
||||||
|
-clang-analyzer-core.NonNullParamChecker,
|
||||||
|
-clang-analyzer-core.CallAndMessage,
|
||||||
|
-clang-analyzer-core.uninitialized.UndefReturn,
|
||||||
|
-clang-analyzer-cplusplus.NewDeleteLeaks,
|
||||||
|
-clang-analyzer-optin.performance.Padding,
|
||||||
|
readability-*,
|
||||||
|
-readability-identifier-naming,
|
||||||
|
-readability-braces-around-statements,
|
||||||
|
-readability-convert-member-functions-to-static,
|
||||||
|
-readability-else-after-return,
|
||||||
|
-readability-function-cognitive-complexity,
|
||||||
|
-readability-inconsistent-ifelse-braces,
|
||||||
|
-readability-identifier-length,
|
||||||
|
-readability-implicit-bool-conversion,
|
||||||
|
-readability-isolate-declaration,
|
||||||
|
-readability-magic-numbers,
|
||||||
|
-readability-make-member-function-const,
|
||||||
|
-readability-math-missing-parentheses,
|
||||||
|
-readability-named-parameter,
|
||||||
|
-readability-qualified-auto,
|
||||||
|
-readability-redundant-access-specifiers,
|
||||||
|
-readability-simplify-boolean-expr,
|
||||||
|
-readability-static-definition-in-anonymous-namespace,
|
||||||
|
-readability-suspicious-call-argument,
|
||||||
|
-readability-uppercase-literal-suffix,
|
||||||
|
-readability-use-anyofallof,
|
||||||
|
google-*,
|
||||||
|
-google-readability-avoid-underscore-in-googletest-name,
|
||||||
|
-google-readability-braces-around-statements,
|
||||||
|
-google-readability-casting,
|
||||||
|
-google-readability-todo,
|
||||||
|
-google-runtime-references,
|
||||||
|
-google-explicit-constructor,
|
||||||
|
performance-*,
|
||||||
|
-performance-enum-size,
|
||||||
|
bugprone-*,
|
||||||
|
-bugprone-branch-clone,
|
||||||
|
-bugprone-easily-swappable-parameters,
|
||||||
|
-bugprone-exception-escape,
|
||||||
|
-bugprone-macro-parentheses,
|
||||||
|
-bugprone-move-forwarding-reference,
|
||||||
|
-bugprone-narrowing-conversions,
|
||||||
|
-bugprone-suspicious-missing-comma,
|
||||||
|
-bugprone-throwing-static-initialization,
|
||||||
|
modernize-*,
|
||||||
|
-modernize-avoid-bind,
|
||||||
|
-modernize-avoid-c-arrays,
|
||||||
|
-modernize-concat-nested-namespaces,
|
||||||
|
-modernize-macro-to-enum,
|
||||||
|
-modernize-pass-by-value,
|
||||||
|
-modernize-raw-string-literal,
|
||||||
|
-modernize-return-braced-init-list,
|
||||||
|
-modernize-use-auto,
|
||||||
|
-modernize-use-nodiscard,
|
||||||
|
-modernize-use-trailing-return-type,
|
||||||
|
-modernize-use-transparent-functors,
|
||||||
|
misc-*,
|
||||||
|
-misc-const-correctness,
|
||||||
|
-misc-no-recursion,
|
||||||
|
-misc-non-private-member-variables-in-classes,
|
||||||
|
-misc-redundant-expression,
|
||||||
|
-misc-unused-parameters,
|
||||||
|
-misc-use-anonymous-namespace,
|
||||||
|
-misc-use-internal-linkage,
|
||||||
|
-misc-include-cleaner
|
||||||
|
|
||||||
|
# Only report diagnostics in headers under this tree (app/, include/sta/, build-generated
|
||||||
|
# headers, etc.).
|
||||||
|
# Excludes system and third-party paths such as /opt/local/include.
|
||||||
|
HeaderFilterRegex: '.*/(app|cmake|dcalc|graph|liberty|network|parasitics|power|sdc|sdf|search|spice|tcl|util|verilog|include/sta|build/include/sta)/.*'
|
||||||
|
|
||||||
|
# Bison-generated parser headers (build/{Liberty,Verilog,...}Parse.hh); gzstream (e.g. util/gzstream.hh).
|
||||||
|
ExcludeHeaderFilterRegex: '.*/(gzstream\.h(?:h)?|(?:Liberty|Verilog|Sdf|Spef|Saif|LibExpr)Parse\.hh)$'
|
||||||
|
FormatStyle: none
|
||||||
|
|
@ -31,3 +31,29 @@ alwaysApply: false
|
||||||
|
|
||||||
- C++ source: `.cc`
|
- C++ source: `.cc`
|
||||||
- C++ headers: `.hh`
|
- C++ headers: `.hh`
|
||||||
|
|
||||||
|
## Include order
|
||||||
|
|
||||||
|
Sort `#include` lines **lexicographically by the path inside** `<>`
|
||||||
|
or `""` (case-sensitive). Separate **groups** with a single blank line.
|
||||||
|
|
||||||
|
### Translation units (`*.cc`)
|
||||||
|
|
||||||
|
1. **Primary header(s)** for this file only:
|
||||||
|
- `#include "Stem.hh"` where `Stem` matches the basename of the `.cc` file (e.g. `Foo.cc` → `Foo.hh`).
|
||||||
|
- If the file uses a paired private header, include `#include "StemPvt.hh"` **immediately after** `Stem.hh` (e.g. `MakeTimingModel.cc` → `MakeTimingModel.hh` then `MakeTimingModelPvt.hh`).
|
||||||
|
- Do **not** pull in other headers just because their names share a prefix with `Stem` (e.g. `SearchClass.hh` is not a “primary” include for `Search.cc`; it belongs in the project group below).
|
||||||
|
|
||||||
|
2. **System / standard library** headers: `#include <...>` lines, sorted alphabetically.
|
||||||
|
|
||||||
|
3. **All other project** headers: `#include "..."` lines, sorted alphabetically (including `search/Crpr.hh`-style paths and includes from `liberty/`, etc.).
|
||||||
|
|
||||||
|
If a **comment or special block** intentionally splits the include list (e.g. a third-party note before `#include "cudd.h"`), keep that structure; sort only within each contiguous run of `#include` lines unless merging groups is clearly safe.
|
||||||
|
|
||||||
|
### Headers (`*.hh`)
|
||||||
|
|
||||||
|
After `#pragma once` (and the file’s license block, if present):
|
||||||
|
|
||||||
|
1. **System** `#include <...>` lines, sorted alphabetically.
|
||||||
|
|
||||||
|
2. **Project** `#include "..."` lines, sorted alphabetically.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# OpenSTA, Static Timing Analyzer
|
# 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
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
|
|
@ -148,4 +148,4 @@ unencode(const char *inits[])
|
||||||
return unencoded;
|
return unencoded;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -83,4 +83,4 @@ ArcDcalcWaveforms::inputWaveform(ArcDcalcArg &dcalc_arg,
|
||||||
return Waveform();
|
return Waveform();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -51,5 +51,5 @@ protected:
|
||||||
const StaState *sta);
|
const StaState *sta);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ ArcDcalcArg::ArcDcalcArg(const Pin *in_pin,
|
||||||
const Pin *drvr_pin,
|
const Pin *drvr_pin,
|
||||||
Edge *edge,
|
Edge *edge,
|
||||||
const TimingArc *arc,
|
const TimingArc *arc,
|
||||||
const Slew in_slew,
|
Slew in_slew,
|
||||||
float load_cap,
|
float load_cap,
|
||||||
const Parasitic *parasitic) :
|
const Parasitic *parasitic) :
|
||||||
in_pin_(in_pin),
|
in_pin_(in_pin),
|
||||||
|
|
@ -305,4 +305,4 @@ ArcDcalcResult::setLoadSlew(size_t load_idx,
|
||||||
load_slews_[load_idx] = load_slew;
|
load_slews_[load_idx] = load_slew;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -86,4 +86,4 @@ struct timing_table
|
||||||
float in_slew;
|
float in_slew;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -1488,4 +1488,4 @@ ArnoldiDelayCalc::ar1_ceff_delay(delay_work *D,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -32,4 +32,4 @@ class StaState;
|
||||||
ArcDelayCalc *
|
ArcDelayCalc *
|
||||||
makeArnoldiDelayCalc(StaState *sta);
|
makeArnoldiDelayCalc(StaState *sta);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -120,4 +120,4 @@ protected:
|
||||||
int order;
|
int order;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -155,4 +155,4 @@ protected:
|
||||||
ArcDelayCalc *table_dcalc_;
|
ArcDelayCalc *table_dcalc_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// OpenSTA, Static Timing Analyzer
|
// 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
|
// 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
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -43,18 +43,18 @@ initDelayConstants()
|
||||||
delay_init_values[MinMax::maxIndex()] = MinMax::max()->initValue();
|
delay_init_values[MinMax::maxIndex()] = MinMax::max()->initValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
Delay::Delay() :
|
Delay::Delay() noexcept :
|
||||||
values_{0.0, 0.0, 0.0, 0.0}
|
values_{0.0, 0.0, 0.0, 0.0}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Delay::Delay(float mean) :
|
Delay::Delay(float mean) noexcept :
|
||||||
values_{mean, 0.0, 0.0, 0.0}
|
values_{mean, 0.0, 0.0, 0.0}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Delay::Delay(float mean,
|
Delay::Delay(float mean,
|
||||||
float std_dev2) :
|
float std_dev2) noexcept :
|
||||||
values_{mean, 0.0, std_dev2, 0.0}
|
values_{mean, 0.0, std_dev2, 0.0}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
@ -62,18 +62,19 @@ Delay::Delay(float mean,
|
||||||
Delay::Delay(float mean,
|
Delay::Delay(float mean,
|
||||||
float mean_shift,
|
float mean_shift,
|
||||||
float std_dev2,
|
float std_dev2,
|
||||||
float skewness) :
|
float skewness) noexcept :
|
||||||
values_{mean, mean_shift, std_dev2, skewness}
|
values_{mean, mean_shift, std_dev2, skewness}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
Delay &
|
||||||
Delay::operator=(float delay)
|
Delay::operator=(float delay)
|
||||||
{
|
{
|
||||||
values_[0] = delay;
|
values_[0] = delay;
|
||||||
values_[1] = 0.0;
|
values_[1] = 0.0;
|
||||||
values_[2] = 0.0;
|
values_[2] = 0.0;
|
||||||
values_[3] = 0.0;
|
values_[3] = 0.0;
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -126,12 +127,12 @@ Delay::setSkewness(float skewness)
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
DelayDbl::DelayDbl() :
|
DelayDbl::DelayDbl() noexcept :
|
||||||
values_{0.0, 0.0, 0.0, 0.0}
|
values_{0.0, 0.0, 0.0, 0.0}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
DelayDbl::DelayDbl(double mean) :
|
DelayDbl::DelayDbl(double mean) noexcept :
|
||||||
values_{mean, 0.0, 0.0, 0.0}
|
values_{mean, 0.0, 0.0, 0.0}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
@ -166,13 +167,14 @@ DelayDbl::setValues(double mean,
|
||||||
values_[3] = skewnes;
|
values_[3] = skewnes;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
DelayDbl &
|
||||||
DelayDbl::operator=(double delay)
|
DelayDbl::operator=(double delay)
|
||||||
{
|
{
|
||||||
values_[0] = delay;
|
values_[0] = delay;
|
||||||
values_[1] = 0.0;
|
values_[1] = 0.0;
|
||||||
values_[2] = 0.0;
|
values_[2] = 0.0;
|
||||||
values_[3] = 0.0;
|
values_[3] = 0.0;
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
@ -520,4 +522,4 @@ delayStdDev2(const Delay &delay,
|
||||||
return sta->delayOps()->stdDev2(delay, early_late);
|
return sta->delayOps()->stdDev2(delay, early_late);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -93,4 +93,4 @@ delayCalcNames()
|
||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -239,4 +239,4 @@ DelayCalcBase::setDcalcArgParasiticSlew(ArcDcalcArgSeq &gates,
|
||||||
setDcalcArgParasiticSlew(gate, scene, min_max);
|
setDcalcArgParasiticSlew(gate, scene, min_max);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -89,4 +89,4 @@ protected:
|
||||||
using ArcDelayCalc::reduceParasitic;
|
using ArcDelayCalc::reduceParasitic;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// OpenSTA, Static Timing Analyzer
|
// 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
|
// 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
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -229,4 +229,4 @@ DelayOpsNormal::asStringVariance(const Delay &delay,
|
||||||
unit->asString(delay.stdDev(), digits));
|
unit->asString(delay.stdDev(), digits));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// OpenSTA, Static Timing Analyzer
|
// 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
|
// 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
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -202,5 +202,5 @@ DelayOpsScalar::asStringVariance(const Delay &delay,
|
||||||
return unit->asString(delay.mean(), digits);
|
return unit->asString(delay.mean(), digits);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// OpenSTA, Static Timing Analyzer
|
// 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
|
// 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
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -290,4 +290,4 @@ DelayOpsSkewNormal::asStringVariance(const Delay &delay,
|
||||||
sta->units()->scalarUnit()->asString(delay.skewness(), digits));
|
sta->units()->scalarUnit()->asString(delay.skewness(), digits));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -101,4 +101,4 @@ private:
|
||||||
DmpAlg *dmp_alg_;
|
DmpAlg *dmp_alg_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -436,4 +436,4 @@ DmpCeffTwoPoleDelayCalc::loadDelay(double vth,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -34,4 +34,4 @@ makeDmpCeffElmoreDelayCalc(StaState *sta);
|
||||||
ArcDelayCalc *
|
ArcDelayCalc *
|
||||||
makeDmpCeffTwoPoleDelayCalc(StaState *sta);
|
makeDmpCeffTwoPoleDelayCalc(StaState *sta);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -98,4 +98,4 @@ findRoot(FindRootFunc func,
|
||||||
return {root, true};
|
return {root, true};
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -52,4 +52,4 @@ findRoot(FindRootFunc func,
|
||||||
double x_tol,
|
double x_tol,
|
||||||
int max_iter);
|
int max_iter);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -1828,4 +1828,4 @@ MultiDrvrNet::parallelGates(const Network *network) const
|
||||||
return network->direction(dcalc_drvr_->pin())->isOutput();
|
return network->direction(dcalc_drvr_->pin())->isOutput();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -203,4 +203,4 @@ LumpedCapDelayCalc::reportGateDelay(const Pin *check_pin,
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -84,4 +84,4 @@ protected:
|
||||||
ArcDelayCalc *
|
ArcDelayCalc *
|
||||||
makeLumpedCapDelayCalc(StaState *sta);
|
makeLumpedCapDelayCalc(StaState *sta);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -53,4 +53,4 @@ NetCaps::init(float pin_cap,
|
||||||
has_net_load_ = has_net_load;
|
has_net_load_ = has_net_load;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -51,4 +51,4 @@ private:
|
||||||
bool has_net_load_;
|
bool has_net_load_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -118,4 +118,4 @@ ParallelDelayCalc::gateDelaysParallel(ArcDcalcArgSeq &dcalc_args,
|
||||||
return dcalc_results;
|
return dcalc_results;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -47,4 +47,4 @@ protected:
|
||||||
const MinMax *min_max);
|
const MinMax *min_max);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -263,4 +263,4 @@ protected:
|
||||||
using ArcDelayCalc::reduceParasitic;
|
using ArcDelayCalc::reduceParasitic;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -187,4 +187,4 @@ UnitDelayCalc::finishDrvrPin()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -109,4 +109,4 @@ protected:
|
||||||
ArcDelayCalc *
|
ArcDelayCalc *
|
||||||
makeUnitDelayCalc(StaState *sta);
|
makeUnitDelayCalc(StaState *sta);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -108,9 +108,6 @@ in a class derived from Sta. Because the components refer to each
|
||||||
other, Sta::updateComponentsState() must be called to notify the
|
other, Sta::updateComponentsState() must be called to notify the
|
||||||
components if any of them are changed after creation.
|
components if any of them are changed after creation.
|
||||||
|
|
||||||
The file liberty/LibertyExt.cc contains an example that shows how the
|
|
||||||
liberty reader is replaced with a custom one on the Sta object.
|
|
||||||
|
|
||||||
Units
|
Units
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
|
@ -291,7 +288,7 @@ in this arc set:
|
||||||
S r -> Z f
|
S r -> Z f
|
||||||
|
|
||||||
The liberty file reader can be customized to read attributes that are
|
The liberty file reader can be customized to read attributes that are
|
||||||
not used by the STA. See liberty/LibertyExt.cc for an example.
|
not used by the STA.
|
||||||
|
|
||||||
Graph
|
Graph
|
||||||
-----
|
-----
|
||||||
|
|
|
||||||
|
|
@ -1580,4 +1580,4 @@ VertexIdLess::operator()(const Vertex *vertex1,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ public:
|
||||||
const Pin *drvr_pin,
|
const Pin *drvr_pin,
|
||||||
Edge *edge,
|
Edge *edge,
|
||||||
const TimingArc *arc,
|
const TimingArc *arc,
|
||||||
const Slew in_slew,
|
Slew in_slew,
|
||||||
float load_cap,
|
float load_cap,
|
||||||
const Parasitic *parasitic);
|
const Parasitic *parasitic);
|
||||||
ArcDcalcArg(const Pin *in_pin,
|
ArcDcalcArg(const Pin *in_pin,
|
||||||
|
|
@ -160,7 +160,6 @@ class ArcDelayCalc : public StaState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ArcDelayCalc(StaState *sta);
|
ArcDelayCalc(StaState *sta);
|
||||||
virtual ~ArcDelayCalc() {}
|
|
||||||
virtual ArcDelayCalc *copy() = 0;
|
virtual ArcDelayCalc *copy() = 0;
|
||||||
virtual std::string_view name() const = 0;
|
virtual std::string_view name() const = 0;
|
||||||
|
|
||||||
|
|
@ -262,4 +261,4 @@ public:
|
||||||
virtual void finishDrvrPin() = 0;
|
virtual void finishDrvrPin() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class Bdd : public StaState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Bdd(const StaState *sta);
|
Bdd(const StaState *sta);
|
||||||
~Bdd();
|
~Bdd() override;
|
||||||
DdNode *funcBdd(const FuncExpr *expr);
|
DdNode *funcBdd(const FuncExpr *expr);
|
||||||
DdNode *findNode(const LibertyPort *port);
|
DdNode *findNode(const LibertyPort *port);
|
||||||
const LibertyPort *nodePort(DdNode *node);
|
const LibertyPort *nodePort(DdNode *node);
|
||||||
|
|
@ -58,4 +58,4 @@ private:
|
||||||
BddVarIdxPortMap bdd_var_idx_port_map_;
|
BddVarIdxPortMap bdd_var_idx_port_map_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -50,10 +50,10 @@ using LevelQueue = std::vector<VertexSeq>;
|
||||||
// Vertices are marked as being in the queue by using a flag on
|
// 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
|
// 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.
|
// 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:
|
public:
|
||||||
virtual ~BfsIterator();
|
|
||||||
// Make sure that the BFS queue is deep enough for the max logic level.
|
// Make sure that the BFS queue is deep enough for the max logic level.
|
||||||
void ensureSize();
|
void ensureSize();
|
||||||
// Reset to virgin state.
|
// Reset to virgin state.
|
||||||
|
|
@ -130,7 +130,7 @@ public:
|
||||||
BfsFwdIterator(BfsIndex bfs_index,
|
BfsFwdIterator(BfsIndex bfs_index,
|
||||||
SearchPred *search_pred,
|
SearchPred *search_pred,
|
||||||
StaState *sta);
|
StaState *sta);
|
||||||
virtual ~BfsFwdIterator();
|
~BfsFwdIterator() override;
|
||||||
void enqueueAdjacentVertices(Vertex *vertex,
|
void enqueueAdjacentVertices(Vertex *vertex,
|
||||||
SearchPred *search_pred) override;
|
SearchPred *search_pred) override;
|
||||||
void enqueueAdjacentVertices(Vertex *vertex,
|
void enqueueAdjacentVertices(Vertex *vertex,
|
||||||
|
|
@ -152,7 +152,7 @@ public:
|
||||||
BfsBkwdIterator(BfsIndex bfs_index,
|
BfsBkwdIterator(BfsIndex bfs_index,
|
||||||
SearchPred *search_pred,
|
SearchPred *search_pred,
|
||||||
StaState *sta);
|
StaState *sta);
|
||||||
virtual ~BfsBkwdIterator();
|
~BfsBkwdIterator() override;
|
||||||
void enqueueAdjacentVertices(Vertex *vertex,
|
void enqueueAdjacentVertices(Vertex *vertex,
|
||||||
SearchPred *search_pred) override;
|
SearchPred *search_pred) override;
|
||||||
void enqueueAdjacentVertices(Vertex *vertex,
|
void enqueueAdjacentVertices(Vertex *vertex,
|
||||||
|
|
@ -168,4 +168,4 @@ protected:
|
||||||
void incrLevel(Level &level) const override;
|
void incrLevel(Level &level) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -28,4 +28,4 @@ namespace sta {
|
||||||
|
|
||||||
enum class CircuitSim { hspice, ngspice, xyce };
|
enum class CircuitSim { hspice, ngspice, xyce };
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ class ClkNetwork : public StaState
|
||||||
public:
|
public:
|
||||||
ClkNetwork(Mode *mode,
|
ClkNetwork(Mode *mode,
|
||||||
StaState *sta);
|
StaState *sta);
|
||||||
~ClkNetwork();
|
~ClkNetwork() override;
|
||||||
void ensureClkNetwork();
|
void ensureClkNetwork();
|
||||||
void clear();
|
void clear();
|
||||||
bool isClock(const Pin *pin) const;
|
bool isClock(const Pin *pin) const;
|
||||||
|
|
@ -73,9 +73,9 @@ private:
|
||||||
|
|
||||||
void findClkPins();
|
void findClkPins();
|
||||||
void findClkPins(bool ideal_only,
|
void findClkPins(bool ideal_only,
|
||||||
PinClksMap &clk_pin_map);
|
PinClksMap &pin_clks_map);
|
||||||
|
|
||||||
bool clk_pins_valid_;
|
bool clk_pins_valid_{false};
|
||||||
// pin -> clks
|
// pin -> clks
|
||||||
PinClksMap pin_clks_map_;
|
PinClksMap pin_clks_map_;
|
||||||
// pin -> ideal clks
|
// pin -> ideal clks
|
||||||
|
|
@ -84,4 +84,4 @@ private:
|
||||||
ClkPinsMap clk_pins_map_;
|
ClkPinsMap clk_pins_map_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -82,11 +82,11 @@ public:
|
||||||
void removeSlew();
|
void removeSlew();
|
||||||
const RiseFallMinMax &slews() const { return slews_; }
|
const RiseFallMinMax &slews() const { return slews_; }
|
||||||
void setSlewLimit(const RiseFallBoth *rf,
|
void setSlewLimit(const RiseFallBoth *rf,
|
||||||
const PathClkOrData clk_data,
|
PathClkOrData clk_data,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
float slew);
|
float slew);
|
||||||
void slewLimit(const RiseFall *rf,
|
void slewLimit(const RiseFall *rf,
|
||||||
const PathClkOrData clk_data,
|
PathClkOrData clk_data,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
// Return values.
|
// Return values.
|
||||||
float &slew,
|
float &slew,
|
||||||
|
|
@ -291,4 +291,4 @@ int
|
||||||
compare(const ClockSet *set1,
|
compare(const ClockSet *set1,
|
||||||
const ClockSet *set2);
|
const ClockSet *set2);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -42,4 +42,4 @@ private:
|
||||||
LogicValue active_value_;
|
LogicValue active_value_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -34,12 +34,12 @@ namespace sta {
|
||||||
class ClockGroups : public SdcCmdComment
|
class ClockGroups : public SdcCmdComment
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ClockGroups(const std::string &name,
|
ClockGroups(std::string_view name,
|
||||||
bool logically_exclusive,
|
bool logically_exclusive,
|
||||||
bool physically_exclusive,
|
bool physically_exclusive,
|
||||||
bool asynchronous,
|
bool asynchronous,
|
||||||
bool allow_paths,
|
bool allow_paths,
|
||||||
std::string comment);
|
std::string_view comment);
|
||||||
~ClockGroups();
|
~ClockGroups();
|
||||||
void makeClockGroup(ClockSet *clks);
|
void makeClockGroup(ClockSet *clks);
|
||||||
const std::string &name() const { return name_; }
|
const std::string &name() const { return name_; }
|
||||||
|
|
@ -59,4 +59,4 @@ private:
|
||||||
ClockGroupSet groups_;
|
ClockGroupSet groups_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -57,4 +57,4 @@ private:
|
||||||
RiseFallMinMax delays_[EarlyLate::index_count];
|
RiseFallMinMax delays_[EarlyLate::index_count];
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -61,4 +61,4 @@ private:
|
||||||
RiseFallMinMax delays_;
|
RiseFallMinMax delays_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -127,12 +127,12 @@ public:
|
||||||
ConcretePort *makeBundlePort(std::string_view name,
|
ConcretePort *makeBundlePort(std::string_view name,
|
||||||
ConcretePortSeq *members);
|
ConcretePortSeq *members);
|
||||||
// Group previously defined bus bit ports together.
|
// Group previously defined bus bit ports together.
|
||||||
void groupBusPorts(const char bus_brkt_left,
|
void groupBusPorts(char bus_brkt_left,
|
||||||
const char bus_brkt_right,
|
char bus_brkt_right,
|
||||||
std::function<bool(std::string_view)> port_msb_first);
|
std::function<bool(std::string_view)> port_msb_first);
|
||||||
size_t portCount() const;
|
size_t portCount() const;
|
||||||
void setName(std::string_view name);
|
void setName(std::string_view name);
|
||||||
void addPort(ConcretePort *port);
|
virtual void addPort(ConcretePort *port);
|
||||||
void addPortBit(ConcretePort *port);
|
void addPortBit(ConcretePort *port);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
@ -275,4 +275,4 @@ private:
|
||||||
ConcretePort *next_;
|
ConcretePort *next_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ class ConcreteNetwork : public NetworkReader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ConcreteNetwork();
|
ConcreteNetwork();
|
||||||
~ConcreteNetwork();
|
~ConcreteNetwork() override;
|
||||||
void clear() override;
|
void clear() override;
|
||||||
bool linkNetwork(std::string_view top_cell_name,
|
bool linkNetwork(std::string_view top_cell_name,
|
||||||
bool make_black_boxes,
|
bool make_black_boxes,
|
||||||
|
|
@ -354,7 +354,7 @@ public:
|
||||||
void setVertexId(VertexId id);
|
void setVertexId(VertexId id);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
~ConcretePin() {}
|
~ConcretePin() = default;
|
||||||
ConcretePin(ConcreteInstance *instance,
|
ConcretePin(ConcreteInstance *instance,
|
||||||
ConcretePort *port,
|
ConcretePort *port,
|
||||||
ConcreteNet *net);
|
ConcreteNet *net);
|
||||||
|
|
@ -384,7 +384,7 @@ public:
|
||||||
ConcretePin *pin() const { return pin_; }
|
ConcretePin *pin() const { return pin_; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
~ConcreteTerm() {}
|
~ConcreteTerm() = default;
|
||||||
ConcreteTerm(ConcretePin *pin,
|
ConcreteTerm(ConcretePin *pin,
|
||||||
ConcreteNet *net);
|
ConcreteNet *net);
|
||||||
|
|
||||||
|
|
@ -432,4 +432,4 @@ protected:
|
||||||
friend class ConcreteNetPinIterator;
|
friend class ConcreteNetPinIterator;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,8 @@ namespace sta {
|
||||||
// 1. Sequence containers (vector<T*>, list<T*>, deque<T*>, …)
|
// 1. Sequence containers (vector<T*>, list<T*>, deque<T*>, …)
|
||||||
// ------------------------------------------------------------
|
// ------------------------------------------------------------
|
||||||
template <typename Container>
|
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)
|
deleteContents(Container& c)
|
||||||
{
|
{
|
||||||
for (auto ptr : c)
|
for (auto ptr : c)
|
||||||
|
|
@ -51,7 +52,8 @@ deleteContents(Container& c)
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Container>
|
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)
|
deleteContents(Container *c)
|
||||||
{
|
{
|
||||||
for (auto ptr : *c)
|
for (auto ptr : *c)
|
||||||
|
|
@ -63,8 +65,8 @@ deleteContents(Container *c)
|
||||||
// 2. Maps (map<K, T*>, unordered_map<K, T*>)
|
// 2. Maps (map<K, T*>, unordered_map<K, T*>)
|
||||||
// ------------------------------------------------------------
|
// ------------------------------------------------------------
|
||||||
template <typename Map>
|
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)
|
deleteContents(Map& m)
|
||||||
{
|
{
|
||||||
for (auto& kv : m)
|
for (auto& kv : m)
|
||||||
|
|
@ -73,8 +75,8 @@ deleteContents(Map& m)
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Map>
|
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)
|
deleteContents(Map *m)
|
||||||
{
|
{
|
||||||
for (auto& kv : *m)
|
for (auto& kv : *m)
|
||||||
|
|
@ -86,10 +88,10 @@ deleteContents(Map *m)
|
||||||
// 3. Sets (set<T*>, unordered_set<T*>)
|
// 3. Sets (set<T*>, unordered_set<T*>)
|
||||||
// ------------------------------------------------------------
|
// ------------------------------------------------------------
|
||||||
template <typename Set>
|
template <typename Set>
|
||||||
std::enable_if_t<
|
requires (std::is_pointer_v<typename Set::value_type> &&
|
||||||
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>
|
!std::is_same_v<typename Set::value_type, typename Set::mapped_type>)
|
||||||
>
|
void
|
||||||
deleteContents(Set& s)
|
deleteContents(Set& s)
|
||||||
{
|
{
|
||||||
for (auto ptr : s)
|
for (auto ptr : s)
|
||||||
|
|
@ -119,28 +121,28 @@ struct find_return;
|
||||||
template<typename C>
|
template<typename C>
|
||||||
struct find_return<C*, true>
|
struct find_return<C*, true>
|
||||||
{
|
{
|
||||||
using type = typename C::mapped_type;
|
using type = C::mapped_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
// pointer to set
|
// pointer to set
|
||||||
template<typename C>
|
template<typename C>
|
||||||
struct find_return<C*, false>
|
struct find_return<C*, false>
|
||||||
{
|
{
|
||||||
using type = typename C::key_type;
|
using type = C::key_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
// map ref
|
// map ref
|
||||||
template<typename C>
|
template<typename C>
|
||||||
struct find_return<C, true>
|
struct find_return<C, true>
|
||||||
{
|
{
|
||||||
using type = typename C::mapped_type;
|
using type = C::mapped_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
// set ref
|
// set ref
|
||||||
template<typename C>
|
template<typename C>
|
||||||
struct find_return<C, false>
|
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>
|
template<typename AssocContainer>
|
||||||
auto
|
auto
|
||||||
findKey(const AssocContainer& c,
|
findKey(const AssocContainer& c,
|
||||||
typename AssocContainer::key_type key)
|
const typename AssocContainer::key_type& 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>,
|
static_assert(std::is_pointer_v<ReturnType>,
|
||||||
"findKey requires pointer types");
|
"findKey requires pointer types");
|
||||||
|
|
@ -173,9 +175,9 @@ template<typename AssocContainer>
|
||||||
auto
|
auto
|
||||||
findStringKey(const AssocContainer& c,
|
findStringKey(const AssocContainer& c,
|
||||||
std::string_view key)
|
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>,
|
static_assert(std::is_pointer_v<ReturnType>,
|
||||||
"findStringKey requires pointer types");
|
"findStringKey requires pointer types");
|
||||||
|
|
@ -194,8 +196,8 @@ findStringKey(const AssocContainer& c,
|
||||||
template<typename AssocContainer>
|
template<typename AssocContainer>
|
||||||
auto
|
auto
|
||||||
findKeyValue(const AssocContainer& c,
|
findKeyValue(const AssocContainer& c,
|
||||||
typename AssocContainer::key_type key)
|
const typename AssocContainer::key_type& key)
|
||||||
-> const typename find_return<AssocContainer>::type &
|
-> const find_return<AssocContainer>::type &
|
||||||
{
|
{
|
||||||
auto it = c.find(key);
|
auto it = c.find(key);
|
||||||
if (it != c.end()) {
|
if (it != c.end()) {
|
||||||
|
|
@ -213,7 +215,7 @@ findKeyValue(const AssocContainer& c,
|
||||||
template<typename AssocContainer>
|
template<typename AssocContainer>
|
||||||
void
|
void
|
||||||
findKeyValue(const AssocContainer& c,
|
findKeyValue(const AssocContainer& c,
|
||||||
typename AssocContainer::key_type key,
|
const typename AssocContainer::key_type& key,
|
||||||
typename find_return<AssocContainer>::type &value,
|
typename find_return<AssocContainer>::type &value,
|
||||||
bool &exists)
|
bool &exists)
|
||||||
{
|
{
|
||||||
|
|
@ -240,7 +242,7 @@ findKeyValue(const AssocContainer& c,
|
||||||
template<typename AssocContainer>
|
template<typename AssocContainer>
|
||||||
void
|
void
|
||||||
findKeyValue(const AssocContainer *c,
|
findKeyValue(const AssocContainer *c,
|
||||||
typename AssocContainer::key_type key,
|
const typename AssocContainer::key_type& key,
|
||||||
typename find_return<AssocContainer>::type &value,
|
typename find_return<AssocContainer>::type &value,
|
||||||
bool &exists)
|
bool &exists)
|
||||||
{
|
{
|
||||||
|
|
@ -269,8 +271,8 @@ findKeyValue(const AssocContainer *c,
|
||||||
template<typename AssocContainer>
|
template<typename AssocContainer>
|
||||||
auto
|
auto
|
||||||
findKeyValuePtr(AssocContainer& c,
|
findKeyValuePtr(AssocContainer& c,
|
||||||
typename AssocContainer::key_type key)
|
const typename AssocContainer::key_type& key)
|
||||||
-> typename find_return<AssocContainer>::type*
|
-> find_return<AssocContainer>::type*
|
||||||
{
|
{
|
||||||
auto it = c.find(key);
|
auto it = c.find(key);
|
||||||
if (it == c.end())
|
if (it == c.end())
|
||||||
|
|
@ -289,8 +291,8 @@ findKeyValuePtr(AssocContainer& c,
|
||||||
template<typename AssocContainer>
|
template<typename AssocContainer>
|
||||||
auto
|
auto
|
||||||
findKeyValuePtr(const AssocContainer& c,
|
findKeyValuePtr(const AssocContainer& c,
|
||||||
typename AssocContainer::key_type key)
|
const typename AssocContainer::key_type& key)
|
||||||
-> typename find_return<AssocContainer>::type const*
|
-> find_return<AssocContainer>::type const*
|
||||||
{
|
{
|
||||||
auto it = c.find(key);
|
auto it = c.find(key);
|
||||||
if (it == c.end())
|
if (it == c.end())
|
||||||
|
|
@ -311,7 +313,7 @@ template<typename AssocContainer>
|
||||||
auto
|
auto
|
||||||
findStringValuePtr(AssocContainer& c,
|
findStringValuePtr(AssocContainer& c,
|
||||||
std::string_view key)
|
std::string_view key)
|
||||||
-> typename find_return<AssocContainer>::type*
|
-> find_return<AssocContainer>::type*
|
||||||
{
|
{
|
||||||
auto it = c.find(key);
|
auto it = c.find(key);
|
||||||
if (it == c.end())
|
if (it == c.end())
|
||||||
|
|
@ -327,7 +329,7 @@ template<typename AssocContainer>
|
||||||
auto
|
auto
|
||||||
findStringValuePtr(const AssocContainer& c,
|
findStringValuePtr(const AssocContainer& c,
|
||||||
std::string_view key)
|
std::string_view key)
|
||||||
-> typename find_return<AssocContainer>::type const*
|
-> find_return<AssocContainer>::type const*
|
||||||
{
|
{
|
||||||
auto it = c.find(key);
|
auto it = c.find(key);
|
||||||
if (it == c.end())
|
if (it == c.end())
|
||||||
|
|
@ -435,7 +437,7 @@ requires std::predicate<Comp&,
|
||||||
std::ranges::range_reference_t<Range>>
|
std::ranges::range_reference_t<Range>>
|
||||||
void
|
void
|
||||||
sort(Range& r,
|
sort(Range& r,
|
||||||
Comp comp = Comp{})
|
const Comp &comp = Comp{})
|
||||||
{
|
{
|
||||||
std::sort(std::ranges::begin(r), std::ranges::end(r), 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>>
|
std::ranges::range_reference_t<Range>>
|
||||||
void
|
void
|
||||||
sort(Range* r,
|
sort(Range* r,
|
||||||
Comp comp = Comp{})
|
const Comp &comp = Comp{})
|
||||||
{
|
{
|
||||||
std::sort(std::ranges::begin(*r), std::ranges::end(*r), comp);
|
std::sort(std::ranges::begin(*r), std::ranges::end(*r), comp);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -130,4 +130,4 @@ private:
|
||||||
bool max_cycles_exceeded_;
|
bool max_cycles_exceeded_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -79,4 +79,4 @@ private:
|
||||||
const Network *network_;
|
const Network *network_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -64,9 +64,9 @@ public:
|
||||||
protected:
|
protected:
|
||||||
Report *report_;
|
Report *report_;
|
||||||
std::mutex buffer_lock_;
|
std::mutex buffer_lock_;
|
||||||
bool debug_on_;
|
bool debug_on_{false};
|
||||||
DebugMap debug_map_;
|
DebugMap debug_map_;
|
||||||
int stats_level_;
|
int stats_level_{0};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Inlining a varargs function would eval the args, which can
|
// Inlining a varargs function would eval the args, which can
|
||||||
|
|
@ -76,4 +76,4 @@ protected:
|
||||||
debug->report(what, fmt __VA_OPT__(,) __VA_ARGS__); \
|
debug->report(what, fmt __VA_OPT__(,) __VA_ARGS__); \
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -37,16 +37,16 @@ class StaState;
|
||||||
class Delay
|
class Delay
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Delay();
|
Delay() noexcept;
|
||||||
Delay(float mean);
|
Delay(float mean) noexcept;
|
||||||
Delay(float mean,
|
Delay(float mean,
|
||||||
// std_dev^2
|
// std_dev^2
|
||||||
float std_dev2);
|
float std_dev2) noexcept;
|
||||||
Delay(float mean,
|
Delay(float mean,
|
||||||
float mean_shift,
|
float mean_shift,
|
||||||
// std_dev^2
|
// std_dev^2
|
||||||
float std_dev2,
|
float std_dev2,
|
||||||
float skewness);
|
float skewness) noexcept;
|
||||||
void setValues(float mean,
|
void setValues(float mean,
|
||||||
float mean_shift,
|
float mean_shift,
|
||||||
float std_dev2,
|
float std_dev2,
|
||||||
|
|
@ -62,7 +62,7 @@ public:
|
||||||
float skewness() const { return values_[3]; }
|
float skewness() const { return values_[3]; }
|
||||||
void setSkewness(float skewness);
|
void setSkewness(float skewness);
|
||||||
|
|
||||||
void operator=(float delay);
|
Delay &operator=(float delay);
|
||||||
// This allows applications that do not support statistical timing
|
// This allows applications that do not support statistical timing
|
||||||
// to treat Delays as floats without explicitly converting with
|
// to treat Delays as floats without explicitly converting with
|
||||||
// delayAsFloat.
|
// delayAsFloat.
|
||||||
|
|
@ -77,8 +77,8 @@ private:
|
||||||
class DelayDbl
|
class DelayDbl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DelayDbl();
|
DelayDbl() noexcept;
|
||||||
DelayDbl(double value);
|
DelayDbl(double value) noexcept;
|
||||||
double mean() const { return values_[0]; }
|
double mean() const { return values_[0]; }
|
||||||
void setMean(double mean);
|
void setMean(double mean);
|
||||||
double meanShift() const { return values_[1]; }
|
double meanShift() const { return values_[1]; }
|
||||||
|
|
@ -91,7 +91,7 @@ public:
|
||||||
double std_dev2,
|
double std_dev2,
|
||||||
double skewnes);
|
double skewnes);
|
||||||
|
|
||||||
void operator=(double delay);
|
DelayDbl &operator=(double delay);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::array<double, 4> values_;
|
std::array<double, 4> values_;
|
||||||
|
|
@ -108,7 +108,7 @@ const Delay delay_zero(0.0);
|
||||||
class DelayOps
|
class DelayOps
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~DelayOps() {}
|
virtual ~DelayOps() = default;
|
||||||
virtual float stdDev2(const Delay &delay,
|
virtual float stdDev2(const Delay &delay,
|
||||||
const EarlyLate *early_late) const = 0;
|
const EarlyLate *early_late) const = 0;
|
||||||
virtual float asFloat(const Delay &delay,
|
virtual float asFloat(const Delay &delay,
|
||||||
|
|
@ -356,4 +356,4 @@ Delay
|
||||||
delayRemove(const Delay &delay1,
|
delayRemove(const Delay &delay1,
|
||||||
const Delay &delay2);
|
const Delay &delay2);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -55,4 +55,4 @@ ArcDelayCalc *
|
||||||
makeDelayCalc(std::string_view name,
|
makeDelayCalc(std::string_view name,
|
||||||
StaState *sta);
|
StaState *sta);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// OpenSTA, Static Timing Analyzer
|
// 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
|
// 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
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -87,4 +87,4 @@ public:
|
||||||
const StaState *sta) const override;
|
const StaState *sta) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// OpenSTA, Static Timing Analyzer
|
// 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
|
// 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
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -87,4 +87,4 @@ public:
|
||||||
const StaState *sta) const override;
|
const StaState *sta) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// OpenSTA, Static Timing Analyzer
|
// 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
|
// 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
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -95,4 +95,4 @@ private:
|
||||||
double skewness2) const;
|
double skewness2) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -117,4 +117,4 @@ public:
|
||||||
DeratingFactorsNet();
|
DeratingFactorsNet();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -111,4 +111,4 @@ sortByPathName(const DisabledInstancePortsMap *inst_map,
|
||||||
LibertyPortPairSeq
|
LibertyPortPairSeq
|
||||||
sortByName(const LibertyPortPairSet *set);
|
sortByName(const LibertyPortPairSet *set);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,10 @@ namespace sta {
|
||||||
|
|
||||||
class DispatchQueue
|
class DispatchQueue
|
||||||
{
|
{
|
||||||
typedef std::function<void(int thread)> fp_t;
|
using fp_t = std::function<void(int thread)>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DispatchQueue(size_t thread_cnt);
|
DispatchQueue(size_t thread_count);
|
||||||
~DispatchQueue();
|
~DispatchQueue();
|
||||||
void setThreadCount(size_t thread_count);
|
void setThreadCount(size_t thread_count);
|
||||||
size_t getThreadCount() const;
|
size_t getThreadCount() const;
|
||||||
|
|
@ -49,4 +49,4 @@ private:
|
||||||
bool quit_ = false;
|
bool quit_ = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,8 @@ template <class ENUM>
|
||||||
class EnumNameMap
|
class EnumNameMap
|
||||||
{
|
{
|
||||||
public:
|
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;
|
const std::string &find(ENUM key) const;
|
||||||
ENUM find(std::string_view name,
|
ENUM find(std::string_view name,
|
||||||
ENUM unknown_key) const;
|
ENUM unknown_key) const;
|
||||||
|
|
@ -49,7 +50,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class ENUM>
|
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)
|
enum_map_(enum_names)
|
||||||
{
|
{
|
||||||
for (const auto& [key, name] : enum_map_)
|
for (const auto& [key, name] : enum_map_)
|
||||||
|
|
@ -97,4 +98,4 @@ EnumNameMap<ENUM>::find(std::string_view name,
|
||||||
return unknown_key;
|
return unknown_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -87,4 +87,4 @@ bool
|
||||||
equivCellSequentials(const LibertyCell *cell1,
|
equivCellSequentials(const LibertyCell *cell1,
|
||||||
const LibertyCell *cell2);
|
const LibertyCell *cell2);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ class Exception : public std::exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Exception();
|
Exception();
|
||||||
virtual ~Exception() {}
|
|
||||||
const char *what() const noexcept override = 0;
|
const char *what() const noexcept override = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -44,7 +43,7 @@ class ExceptionMsg : public Exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ExceptionMsg(const std::string &msg,
|
ExceptionMsg(const std::string &msg,
|
||||||
const bool suppressed);
|
bool suppressed);
|
||||||
const char *what() const noexcept override;
|
const char *what() const noexcept override;
|
||||||
bool suppressed() const { return suppressed_; }
|
bool suppressed() const { return suppressed_; }
|
||||||
|
|
||||||
|
|
@ -93,4 +92,4 @@ protected:
|
||||||
#define criticalError(id, msg) \
|
#define criticalError(id, msg) \
|
||||||
Report::defaultReport()->fileCritical(id, __FILE__, __LINE__, msg)
|
Report::defaultReport()->fileCritical(id, __FILE__, __LINE__, msg)
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ public:
|
||||||
virtual bool isFilter() const { return false; }
|
virtual bool isFilter() const { return false; }
|
||||||
virtual ExceptionPathType type() const = 0;
|
virtual ExceptionPathType type() const = 0;
|
||||||
virtual std::string to_string(const Network *network) const;
|
virtual std::string to_string(const Network *network) const;
|
||||||
|
virtual std::string_view typeString() const = 0;
|
||||||
ExceptionFrom *from() const { return from_; }
|
ExceptionFrom *from() const { return from_; }
|
||||||
ExceptionThruSeq *thrus() const { return thrus_; }
|
ExceptionThruSeq *thrus() const { return thrus_; }
|
||||||
ExceptionTo *to() const { return to_; }
|
ExceptionTo *to() const { return to_; }
|
||||||
|
|
@ -135,7 +136,6 @@ public:
|
||||||
virtual bool breakPath() const { return false; }
|
virtual bool breakPath() const { return false; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual const char *typeString() const = 0;
|
|
||||||
std::string fromThruToString(const Network *network) const;
|
std::string fromThruToString(const Network *network) const;
|
||||||
void makeStates();
|
void makeStates();
|
||||||
|
|
||||||
|
|
@ -172,7 +172,7 @@ public:
|
||||||
bool own_pts) override;
|
bool own_pts) override;
|
||||||
bool isFalse() const override { return true; }
|
bool isFalse() const override { return true; }
|
||||||
ExceptionPathType type() const override { return ExceptionPathType::false_path; }
|
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 mergeable(ExceptionPath *exception) const override;
|
||||||
bool overrides(ExceptionPath *exception) const override;
|
bool overrides(ExceptionPath *exception) const override;
|
||||||
int typePriority() const override;
|
int typePriority() const override;
|
||||||
|
|
@ -188,7 +188,7 @@ public:
|
||||||
bool own_pts);
|
bool own_pts);
|
||||||
bool isLoop() const override { return true; }
|
bool isLoop() const override { return true; }
|
||||||
ExceptionPathType type() const override { return ExceptionPathType::loop; }
|
ExceptionPathType type() const override { return ExceptionPathType::loop; }
|
||||||
const char *typeString() const override;
|
std::string_view typeString() const override;
|
||||||
bool mergeable(ExceptionPath *exception) const override;
|
bool mergeable(ExceptionPath *exception) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -212,7 +212,7 @@ public:
|
||||||
bool isPathDelay() const override { return true; }
|
bool isPathDelay() const override { return true; }
|
||||||
ExceptionPathType type() const override { return ExceptionPathType::path_delay; }
|
ExceptionPathType type() const override { return ExceptionPathType::path_delay; }
|
||||||
std::string to_string(const Network *network) 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 mergeable(ExceptionPath *exception) const override;
|
||||||
bool overrides(ExceptionPath *exception) const override;
|
bool overrides(ExceptionPath *exception) const override;
|
||||||
float delay() const override { return delay_; }
|
float delay() const override { return delay_; }
|
||||||
|
|
@ -248,7 +248,7 @@ public:
|
||||||
bool matches(const MinMax *min_max,
|
bool matches(const MinMax *min_max,
|
||||||
bool exactly) const override;
|
bool exactly) const override;
|
||||||
std::string to_string(const Network *network) 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 mergeable(ExceptionPath *exception) const override;
|
||||||
bool overrides(ExceptionPath *exception) const override;
|
bool overrides(ExceptionPath *exception) const override;
|
||||||
bool useEndClk() const override { return use_end_clk_; }
|
bool useEndClk() const override { return use_end_clk_; }
|
||||||
|
|
@ -279,7 +279,7 @@ public:
|
||||||
bool own_pts) override;
|
bool own_pts) override;
|
||||||
bool isFilter() const override { return true; }
|
bool isFilter() const override { return true; }
|
||||||
ExceptionPathType type() const override { return ExceptionPathType::filter; }
|
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 mergeable(ExceptionPath *exception) const override;
|
||||||
bool overrides(ExceptionPath *exception) const override;
|
bool overrides(ExceptionPath *exception) const override;
|
||||||
bool resetMatch(ExceptionFrom *from,
|
bool resetMatch(ExceptionFrom *from,
|
||||||
|
|
@ -308,7 +308,7 @@ public:
|
||||||
bool own_pts) override;
|
bool own_pts) override;
|
||||||
bool isGroupPath() const override { return true; }
|
bool isGroupPath() const override { return true; }
|
||||||
ExceptionPathType type() const override { return ExceptionPathType::group_path; }
|
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 mergeable(ExceptionPath *exception) const override;
|
||||||
bool overrides(ExceptionPath *exception) const override;
|
bool overrides(ExceptionPath *exception) const override;
|
||||||
int typePriority() const override;
|
int typePriority() const override;
|
||||||
|
|
@ -327,7 +327,7 @@ class ExceptionPt
|
||||||
public:
|
public:
|
||||||
ExceptionPt(const RiseFallBoth *rf,
|
ExceptionPt(const RiseFallBoth *rf,
|
||||||
bool own_pts);
|
bool own_pts);
|
||||||
virtual ~ExceptionPt() {};
|
virtual ~ExceptionPt() = default;
|
||||||
virtual bool isFrom() const { return false; }
|
virtual bool isFrom() const { return false; }
|
||||||
virtual bool isThru() const { return false; }
|
virtual bool isThru() const { return false; }
|
||||||
virtual bool isTo() const { return false; }
|
virtual bool isTo() const { return false; }
|
||||||
|
|
@ -386,7 +386,7 @@ public:
|
||||||
const RiseFallBoth *rf,
|
const RiseFallBoth *rf,
|
||||||
bool own_pts,
|
bool own_pts,
|
||||||
const Network *network);
|
const Network *network);
|
||||||
~ExceptionFromTo();
|
~ExceptionFromTo() override;
|
||||||
PinSet *pins() override { return pins_; }
|
PinSet *pins() override { return pins_; }
|
||||||
bool hasPins() const;
|
bool hasPins() const;
|
||||||
ClockSet *clks() override { return clks_; }
|
ClockSet *clks() override { return clks_; }
|
||||||
|
|
@ -512,7 +512,7 @@ public:
|
||||||
const RiseFallBoth *rf,
|
const RiseFallBoth *rf,
|
||||||
bool own_pts,
|
bool own_pts,
|
||||||
const Network *network);
|
const Network *network);
|
||||||
~ExceptionThru();
|
~ExceptionThru() override;
|
||||||
ExceptionThru *clone(const Network *network);
|
ExceptionThru *clone(const Network *network);
|
||||||
std::string to_string(const Network *network) const override;
|
std::string to_string(const Network *network) const override;
|
||||||
bool isThru() const override { return true; }
|
bool isThru() const override { return true; }
|
||||||
|
|
@ -538,15 +538,6 @@ public:
|
||||||
const Network *network) const;
|
const Network *network) const;
|
||||||
int typePriority() const override { return 2; }
|
int typePriority() const override { return 2; }
|
||||||
size_t objectCount() const override;
|
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,
|
void addPin(const Pin *pin,
|
||||||
const Network *network) override;
|
const Network *network) override;
|
||||||
void addEdge(const EdgePins &edge,
|
void addEdge(const EdgePins &edge,
|
||||||
|
|
@ -556,6 +547,15 @@ protected:
|
||||||
void addInstance(const Instance *inst,
|
void addInstance(const Instance *inst,
|
||||||
const Network *network) override;
|
const Network *network) override;
|
||||||
void addClock(Clock *) 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,
|
void deletePin(const Pin *pin,
|
||||||
const Network *network);
|
const Network *network);
|
||||||
void deleteEdge(const EdgePins &edge);
|
void deleteEdge(const EdgePins &edge);
|
||||||
|
|
@ -620,7 +620,6 @@ class ExpandedExceptionVisitor
|
||||||
public:
|
public:
|
||||||
ExpandedExceptionVisitor(ExceptionPath *exception,
|
ExpandedExceptionVisitor(ExceptionPath *exception,
|
||||||
const Network *network);
|
const Network *network);
|
||||||
virtual ~ExpandedExceptionVisitor() {}
|
|
||||||
void visitExpansions();
|
void visitExpansions();
|
||||||
// From/thrus/to have a single exception point (pin/instance/net/clock).
|
// From/thrus/to have a single exception point (pin/instance/net/clock).
|
||||||
virtual void visit(ExceptionFrom *from,
|
virtual void visit(ExceptionFrom *from,
|
||||||
|
|
@ -678,7 +677,7 @@ exceptionStateCmp(const ExceptionState *state1,
|
||||||
class EmptyExpceptionPt : public Exception
|
class EmptyExpceptionPt : public Exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual const char *what() const noexcept;
|
const char *what() const noexcept override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ExceptionPathLess
|
class ExceptionPathLess
|
||||||
|
|
@ -698,4 +697,4 @@ checkFromThrusTo(ExceptionFrom *from,
|
||||||
ExceptionThruSeq *thrus,
|
ExceptionThruSeq *thrus,
|
||||||
ExceptionTo *to);
|
ExceptionTo *to);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// OpenSTA, Static Timing Analyzer
|
// 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
|
// 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
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -28,6 +28,7 @@
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "GraphClass.hh"
|
||||||
#include "NetworkClass.hh"
|
#include "NetworkClass.hh"
|
||||||
#include "SdcClass.hh"
|
#include "SdcClass.hh"
|
||||||
#include "SearchClass.hh"
|
#include "SearchClass.hh"
|
||||||
|
|
@ -93,4 +94,4 @@ StringSeq
|
||||||
filterExprToPostfix(std::string_view expr,
|
filterExprToPostfix(std::string_view expr,
|
||||||
Report *report);
|
Report *report);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -105,4 +105,4 @@ private:
|
||||||
FuncExpr *
|
FuncExpr *
|
||||||
funcExprNot(FuncExpr *expr);
|
funcExprNot(FuncExpr *expr);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -48,4 +48,4 @@ fuzzyGreaterEqual(float v1,
|
||||||
bool
|
bool
|
||||||
fuzzyInf(float value);
|
fuzzyInf(float value);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ public:
|
||||||
Graph(StaState *sta,
|
Graph(StaState *sta,
|
||||||
DcalcAPIndex ap_count);
|
DcalcAPIndex ap_count);
|
||||||
void makeGraph();
|
void makeGraph();
|
||||||
~Graph();
|
~Graph() override;
|
||||||
|
|
||||||
// Number of arc delays and slews from sdf or delay calculation.
|
// Number of arc delays and slews from sdf or delay calculation.
|
||||||
void setDelayCount(DcalcAPIndex ap_count);
|
void setDelayCount(DcalcAPIndex ap_count);
|
||||||
|
|
@ -291,8 +291,8 @@ protected:
|
||||||
bool is_bidirect_drvr,
|
bool is_bidirect_drvr,
|
||||||
bool is_reg_clk);
|
bool is_reg_clk);
|
||||||
void clear();
|
void clear();
|
||||||
Slew *slews() { return std::bit_cast<Slew*>(slews_); }
|
Slew *slews() { return reinterpret_cast<Slew*>(slews_); }
|
||||||
const Slew *slews() const { return std::bit_cast<const Slew*>(slews_); }
|
const Slew *slews() const { return reinterpret_cast<const Slew*>(slews_); }
|
||||||
float *slewsFloat() { return slews_; }
|
float *slewsFloat() { return slews_; }
|
||||||
const float *slewsFloat() const { return slews_; }
|
const float *slewsFloat() const { return slews_; }
|
||||||
void setSlews(float *slews);
|
void setSlews(float *slews);
|
||||||
|
|
@ -491,4 +491,4 @@ makeVertexSet(StaState *sta)
|
||||||
return VertexSet(VertexIdLess(sta->graphRef()));
|
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.
|
// Bit shifts used to mark vertices in a Bfs queue.
|
||||||
enum class BfsIndex { dcalc, arrival, required, other, bits };
|
enum class BfsIndex { dcalc, arrival, required, other, bits };
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -59,4 +59,4 @@ sortEdges(EdgeSeq *edges,
|
||||||
Network *network,
|
Network *network,
|
||||||
Graph *graph);
|
Graph *graph);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -53,8 +53,8 @@ class GraphDelayCalc : public StaState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GraphDelayCalc(StaState *sta);
|
GraphDelayCalc(StaState *sta);
|
||||||
virtual ~GraphDelayCalc();
|
~GraphDelayCalc() override;
|
||||||
virtual void copyState(const StaState *sta);
|
void copyState(const StaState *sta) override;
|
||||||
// Set the observer for edge delay changes.
|
// Set the observer for edge delay changes.
|
||||||
virtual void setObserver(DelayCalcObserver *observer);
|
virtual void setObserver(DelayCalcObserver *observer);
|
||||||
// Invalidate all delays/slews.
|
// Invalidate all delays/slews.
|
||||||
|
|
@ -323,8 +323,7 @@ protected:
|
||||||
class DelayCalcObserver
|
class DelayCalcObserver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DelayCalcObserver() {}
|
virtual ~DelayCalcObserver() = default;
|
||||||
virtual ~DelayCalcObserver() {}
|
|
||||||
virtual void delayChangedFrom(Vertex *vertex) = 0;
|
virtual void delayChangedFrom(Vertex *vertex) = 0;
|
||||||
virtual void delayChangedTo(Vertex *vertex) = 0;
|
virtual void delayChangedTo(Vertex *vertex) = 0;
|
||||||
virtual void checkDelayChangedTo(Vertex *vertex) = 0;
|
virtual void checkDelayChangedTo(Vertex *vertex) = 0;
|
||||||
|
|
@ -359,4 +358,4 @@ private:
|
||||||
std::vector<NetCaps> net_caps_;
|
std::vector<NetCaps> net_caps_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -67,4 +67,4 @@ hashString(std::string_view str);
|
||||||
#define hashPtr(ptr) (reinterpret_cast<intptr_t>(ptr) >> 2)
|
#define hashPtr(ptr) (reinterpret_cast<intptr_t>(ptr) >> 2)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,7 @@ public:
|
||||||
class HpinDrvrLoadVisitor
|
class HpinDrvrLoadVisitor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HpinDrvrLoadVisitor() {}
|
virtual ~HpinDrvrLoadVisitor() = default;
|
||||||
virtual ~HpinDrvrLoadVisitor() {}
|
|
||||||
virtual void visit(HpinDrvrLoad *drvr_load) = 0;
|
virtual void visit(HpinDrvrLoad *drvr_load) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -76,4 +75,4 @@ private:
|
||||||
PinSet *hpins_to_load_;
|
PinSet *hpins_to_load_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -116,4 +116,4 @@ private:
|
||||||
const LibertyPort *to_port_;
|
const LibertyPort *to_port_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -94,4 +94,4 @@ protected:
|
||||||
InternalPowerModels models_;
|
InternalPowerModels models_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ template <class OBJ>
|
||||||
class Iterator
|
class Iterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~Iterator() {}
|
virtual ~Iterator() = default;
|
||||||
virtual bool hasNext() = 0;
|
virtual bool hasNext() = 0;
|
||||||
virtual OBJ next() = 0;
|
virtual OBJ next() = 0;
|
||||||
};
|
};
|
||||||
|
|
@ -116,4 +116,4 @@ protected:
|
||||||
SET_TYPE::const_iterator itr_;
|
SET_TYPE::const_iterator itr_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -50,4 +50,4 @@ protected:
|
||||||
float power_;
|
float power_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string value_;
|
std::string value_;
|
||||||
FuncExpr *cond_;
|
FuncExpr *cond_{nullptr};
|
||||||
std::string sdf_cond_;
|
std::string sdf_cond_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -159,10 +159,10 @@ enum class PwrGndType { none,
|
||||||
deepnwell, deeppwell};
|
deepnwell, deeppwell};
|
||||||
|
|
||||||
enum class ScaleFactorPvt { process, volt, temp, unknown };
|
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 };
|
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 };
|
enum class LevelShifterType { HL, LH, HL_LH };
|
||||||
|
|
||||||
|
|
@ -206,7 +206,7 @@ class LibertyLibrary : public ConcreteLibrary
|
||||||
public:
|
public:
|
||||||
LibertyLibrary(std::string_view name,
|
LibertyLibrary(std::string_view name,
|
||||||
std::string_view filename);
|
std::string_view filename);
|
||||||
virtual ~LibertyLibrary();
|
~LibertyLibrary() override;
|
||||||
LibertyCell *findLibertyCell(std::string_view name) const;
|
LibertyCell *findLibertyCell(std::string_view name) const;
|
||||||
LibertyCellSeq findLibertyCellsMatching(PatternMatch *pattern);
|
LibertyCellSeq findLibertyCellsMatching(PatternMatch *pattern);
|
||||||
// Liberty cells that are buffers.
|
// Liberty cells that are buffers.
|
||||||
|
|
@ -269,7 +269,7 @@ public:
|
||||||
|
|
||||||
void defaultIntrinsic(const RiseFall *rf,
|
void defaultIntrinsic(const RiseFall *rf,
|
||||||
// Return values.
|
// Return values.
|
||||||
float &intrisic,
|
float &intrinsic,
|
||||||
bool &exists) const;
|
bool &exists) const;
|
||||||
void setDefaultIntrinsic(const RiseFall *rf,
|
void setDefaultIntrinsic(const RiseFall *rf,
|
||||||
float value);
|
float value);
|
||||||
|
|
@ -360,7 +360,7 @@ public:
|
||||||
void setDefaultOcvDerate(OcvDerate *derate);
|
void setDefaultOcvDerate(OcvDerate *derate);
|
||||||
OcvDerate *makeOcvDerate(std::string_view name);
|
OcvDerate *makeOcvDerate(std::string_view name);
|
||||||
OcvDerate *findOcvDerate(std::string_view derate_name);
|
OcvDerate *findOcvDerate(std::string_view derate_name);
|
||||||
void addSupplyVoltage(std::string_view suppy_name,
|
void addSupplyVoltage(std::string_view supply_name,
|
||||||
float voltage);
|
float voltage);
|
||||||
bool supplyExists(std::string_view supply_name) const;
|
bool supplyExists(std::string_view supply_name) const;
|
||||||
void supplyVoltage(std::string_view supply_name,
|
void supplyVoltage(std::string_view supply_name,
|
||||||
|
|
@ -374,19 +374,19 @@ public:
|
||||||
|
|
||||||
static void
|
static void
|
||||||
makeSceneMap(LibertyLibrary *lib,
|
makeSceneMap(LibertyLibrary *lib,
|
||||||
int ap_index,
|
size_t lib_ap_index,
|
||||||
Network *network,
|
Network *network,
|
||||||
Report *report);
|
Report *report);
|
||||||
static void
|
static void
|
||||||
makeSceneMap(LibertyCell *link_cell,
|
makeSceneMap(LibertyCell *link_cell,
|
||||||
LibertyCell *map_cell,
|
LibertyCell *scene_cell,
|
||||||
int ap_index,
|
size_t lib_ap_index,
|
||||||
Report *report);
|
Report *report);
|
||||||
static void
|
static void
|
||||||
makeSceneMap(LibertyCell *cell1,
|
makeSceneMap(LibertyCell *cell1,
|
||||||
LibertyCell *cell2,
|
LibertyCell *cell2,
|
||||||
bool link,
|
bool link,
|
||||||
int ap_index,
|
size_t lib_ap_index,
|
||||||
Report *report);
|
Report *report);
|
||||||
static void
|
static void
|
||||||
checkScenes(LibertyCell *cell,
|
checkScenes(LibertyCell *cell,
|
||||||
|
|
@ -396,62 +396,66 @@ public:
|
||||||
DriverWaveform *findDriverWaveform(std::string_view name);
|
DriverWaveform *findDriverWaveform(std::string_view name);
|
||||||
DriverWaveform *driverWaveformDefault() { return findDriverWaveform(""); }
|
DriverWaveform *driverWaveformDefault() { return findDriverWaveform(""); }
|
||||||
DriverWaveform *makeDriverWaveform(std::string_view name,
|
DriverWaveform *makeDriverWaveform(std::string_view name,
|
||||||
TablePtr waveforms);
|
const TablePtr &waveforms);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
float degradeWireSlew(const TableModel *model,
|
float degradeWireSlew(const TableModel *model,
|
||||||
float in_slew,
|
float in_slew,
|
||||||
float wire_delay) const;
|
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 input_threshold_default_ = .5;
|
||||||
static constexpr float output_threshold_default_ = .5;
|
static constexpr float output_threshold_default_ = .5;
|
||||||
static constexpr float slew_lower_threshold_default_ = .2;
|
static constexpr float slew_lower_threshold_default_ = .2;
|
||||||
static constexpr float slew_upper_threshold_default_ = .8;
|
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:
|
private:
|
||||||
friend class LibertyCell;
|
friend class LibertyCell;
|
||||||
friend class LibertyCellIterator;
|
friend class LibertyCellIterator;
|
||||||
|
|
@ -476,12 +480,11 @@ public:
|
||||||
LibertyCell(LibertyLibrary *library,
|
LibertyCell(LibertyLibrary *library,
|
||||||
std::string_view name,
|
std::string_view name,
|
||||||
std::string_view filename);
|
std::string_view filename);
|
||||||
virtual ~LibertyCell();
|
~LibertyCell() override;
|
||||||
LibertyLibrary *libertyLibrary() const { return liberty_library_; }
|
LibertyLibrary *libertyLibrary() const { return liberty_library_; }
|
||||||
LibertyLibrary *libertyLibrary() { return liberty_library_; }
|
LibertyLibrary *libertyLibrary() { return liberty_library_; }
|
||||||
LibertyPort *findLibertyPort(std::string_view name) const;
|
LibertyPort *findLibertyPort(std::string_view name) const;
|
||||||
LibertyPortSeq findLibertyPortsMatching(PatternMatch *pattern) const;
|
LibertyPortSeq findLibertyPortsMatching(PatternMatch *pattern) const;
|
||||||
bool hasInternalPorts() const { return has_internal_ports_; }
|
|
||||||
ScaleFactors *scaleFactors() const { return scale_factors_; }
|
ScaleFactors *scaleFactors() const { return scale_factors_; }
|
||||||
void setScaleFactors(ScaleFactors *scale_factors);
|
void setScaleFactors(ScaleFactors *scale_factors);
|
||||||
ModeDef *makeModeDef(std::string_view name);
|
ModeDef *makeModeDef(std::string_view name);
|
||||||
|
|
@ -524,7 +527,7 @@ public:
|
||||||
const LibertyPort *to) const;
|
const LibertyPort *to) const;
|
||||||
size_t timingArcSetCount() const;
|
size_t timingArcSetCount() const;
|
||||||
// Find a timing arc set equivalent to key.
|
// 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;
|
TimingArcSet *findTimingArcSet(size_t index) const;
|
||||||
bool hasTimingArcs(LibertyPort *port) const;
|
bool hasTimingArcs(LibertyPort *port) const;
|
||||||
|
|
||||||
|
|
@ -552,7 +555,7 @@ public:
|
||||||
// timing arcs.
|
// timing arcs.
|
||||||
bool hasInferedRegTimingArcs() const { return has_infered_reg_timing_arcs_; }
|
bool hasInferedRegTimingArcs() const { return has_infered_reg_timing_arcs_; }
|
||||||
TestCell *testCell() const { return test_cell_; }
|
TestCell *testCell() const { return test_cell_; }
|
||||||
void latchEnable(const TimingArcSet *arc_set,
|
void latchEnable(const TimingArcSet *d_to_q_set,
|
||||||
// Return values.
|
// Return values.
|
||||||
const LibertyPort *&enable_port,
|
const LibertyPort *&enable_port,
|
||||||
const FuncExpr *&enable_func,
|
const FuncExpr *&enable_func,
|
||||||
|
|
@ -560,7 +563,7 @@ public:
|
||||||
const RiseFall *latchCheckEnableEdge(TimingArcSet *check_set);
|
const RiseFall *latchCheckEnableEdge(TimingArcSet *check_set);
|
||||||
LibertyCell *sceneCell(const Scene *scene,
|
LibertyCell *sceneCell(const Scene *scene,
|
||||||
const MinMax *min_max);
|
const MinMax *min_max);
|
||||||
LibertyCell *sceneCell(int ap_index);
|
LibertyCell *sceneCell(size_t lib_ap_index);
|
||||||
|
|
||||||
// AOCV
|
// AOCV
|
||||||
float ocvArcDepth() const;
|
float ocvArcDepth() const;
|
||||||
|
|
@ -604,7 +607,7 @@ public:
|
||||||
void setTestCell(TestCell *test);
|
void setTestCell(TestCell *test);
|
||||||
void setHasInferedRegTimingArcs(bool infered);
|
void setHasInferedRegTimingArcs(bool infered);
|
||||||
void setSceneCell(LibertyCell *scene_cell,
|
void setSceneCell(LibertyCell *scene_cell,
|
||||||
int ap_index);
|
size_t lib_ap_index);
|
||||||
// Call after cell is finished being constructed.
|
// Call after cell is finished being constructed.
|
||||||
void finish(bool infer_latches,
|
void finish(bool infer_latches,
|
||||||
Report *report,
|
Report *report,
|
||||||
|
|
@ -623,9 +626,9 @@ public:
|
||||||
void setFootprint(std::string_view footprint);
|
void setFootprint(std::string_view footprint);
|
||||||
const std::string &userFunctionClass() const { return user_function_class_; }
|
const std::string &userFunctionClass() const { return user_function_class_; }
|
||||||
void setUserFunctionClass(std::string_view user_function_class);
|
void setUserFunctionClass(std::string_view user_function_class);
|
||||||
|
void addPort(ConcretePort *port) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void addPort(ConcretePort *port);
|
|
||||||
void setHasInternalPorts(bool has_internal);
|
void setHasInternalPorts(bool has_internal);
|
||||||
void setLibertyLibrary(LibertyLibrary *library);
|
void setLibertyLibrary(LibertyLibrary *library);
|
||||||
void makeLatchEnables(Report *report,
|
void makeLatchEnables(Report *report,
|
||||||
|
|
@ -661,35 +664,35 @@ protected:
|
||||||
bool checkSceneCell(const Scene *scene,
|
bool checkSceneCell(const Scene *scene,
|
||||||
const MinMax *min_max) const;
|
const MinMax *min_max) const;
|
||||||
|
|
||||||
LibertyLibrary *liberty_library_;
|
LibertyLibrary *liberty_library_{nullptr};
|
||||||
float area_;
|
float area_{0.0F};
|
||||||
bool dont_use_;
|
bool dont_use_{false};
|
||||||
bool is_macro_;
|
bool is_macro_{false};
|
||||||
bool is_memory_;
|
bool is_memory_{false};
|
||||||
bool is_pad_;
|
bool is_pad_{false};
|
||||||
bool is_clock_cell_;
|
bool is_clock_cell_{false};
|
||||||
bool is_level_shifter_;
|
bool is_level_shifter_{false};
|
||||||
LevelShifterType level_shifter_type_;
|
LevelShifterType level_shifter_type_{LevelShifterType::HL_LH};
|
||||||
bool is_isolation_cell_;
|
bool is_isolation_cell_{false};
|
||||||
bool always_on_;
|
bool always_on_{false};
|
||||||
SwitchCellType switch_cell_type_;
|
SwitchCellType switch_cell_type_{SwitchCellType::fine_grain};
|
||||||
bool interface_timing_;
|
bool interface_timing_{false};
|
||||||
ClockGateType clock_gate_type_;
|
ClockGateType clock_gate_type_{ClockGateType::none};
|
||||||
TimingArcSetSeq timing_arc_sets_;
|
TimingArcSetSeq timing_arc_sets_;
|
||||||
TimingArcSetSet timing_arc_set_set_;
|
TimingArcSetSet timing_arc_set_set_;
|
||||||
LibertyPortPairTimingArcMap port_timing_arc_set_map_;
|
LibertyPortPairTimingArcMap port_timing_arc_set_map_;
|
||||||
bool has_infered_reg_timing_arcs_;
|
bool has_infered_reg_timing_arcs_{false};
|
||||||
InternalPowerSeq internal_powers_;
|
InternalPowerSeq internal_powers_;
|
||||||
PortInternalPowerMap port_internal_powers_;
|
PortInternalPowerMap port_internal_powers_;
|
||||||
LeakagePowerSeq leakage_powers_;
|
LeakagePowerSeq leakage_powers_;
|
||||||
SequentialSeq sequentials_;
|
SequentialSeq sequentials_;
|
||||||
PortToSequentialMap port_to_seq_map_;
|
PortToSequentialMap port_to_seq_map_;
|
||||||
Statetable *statetable_;
|
Statetable *statetable_{nullptr};
|
||||||
BusDclMap bus_dcls_;
|
BusDclMap bus_dcls_;
|
||||||
ModeDefMap mode_defs_;
|
ModeDefMap mode_defs_;
|
||||||
ScaleFactors *scale_factors_;
|
ScaleFactors *scale_factors_{nullptr};
|
||||||
ScaledCellMap scaled_cells_;
|
ScaledCellMap scaled_cells_;
|
||||||
TestCell *test_cell_;
|
TestCell *test_cell_{nullptr};
|
||||||
// Latch D->Q to LatchEnable index.
|
// Latch D->Q to LatchEnable index.
|
||||||
LatchEnableIndexMap latch_d_to_q_map_;
|
LatchEnableIndexMap latch_d_to_q_map_;
|
||||||
// Latch EN->D setup to LatchEnable index.
|
// Latch EN->D setup to LatchEnable index.
|
||||||
|
|
@ -697,14 +700,14 @@ protected:
|
||||||
LatchEnableSeq latch_enables_;
|
LatchEnableSeq latch_enables_;
|
||||||
// Ports that have latch D->Q timing arc sets from them.
|
// Ports that have latch D->Q timing arc sets from them.
|
||||||
LibertyPortSet latch_data_ports_;
|
LibertyPortSet latch_data_ports_;
|
||||||
float ocv_arc_depth_;
|
float ocv_arc_depth_{0.0F};
|
||||||
OcvDerate *ocv_derate_;
|
OcvDerate *ocv_derate_{nullptr};
|
||||||
OcvDerateMap ocv_derate_map_;
|
OcvDerateMap ocv_derate_map_;
|
||||||
std::vector<LibertyCell*> scene_cells_;
|
std::vector<LibertyCell*> scene_cells_;
|
||||||
float leakage_power_;
|
float leakage_power_{0.0F};
|
||||||
bool leakage_power_exists_;
|
bool leakage_power_exists_{false};
|
||||||
bool has_internal_ports_;
|
bool has_internal_ports_{false};
|
||||||
std::atomic<bool> have_voltage_waveforms_;
|
std::atomic<bool> have_voltage_waveforms_{false};
|
||||||
std::mutex waveform_lock_;
|
std::mutex waveform_lock_;
|
||||||
std::string footprint_;
|
std::string footprint_;
|
||||||
std::string user_function_class_;
|
std::string user_function_class_;
|
||||||
|
|
@ -731,7 +734,7 @@ class LibertyCellPortBitIterator : public Iterator<LibertyPort*>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LibertyCellPortBitIterator(const LibertyCell *cell);
|
LibertyCellPortBitIterator(const LibertyCell *cell);
|
||||||
virtual ~LibertyCellPortBitIterator();
|
~LibertyCellPortBitIterator() override;
|
||||||
bool hasNext() override;
|
bool hasNext() override;
|
||||||
LibertyPort *next() override;
|
LibertyPort *next() override;
|
||||||
|
|
||||||
|
|
@ -748,9 +751,7 @@ public:
|
||||||
LibertyLibrary *libertyLibrary() const { return liberty_cell_->libertyLibrary(); }
|
LibertyLibrary *libertyLibrary() const { return liberty_cell_->libertyLibrary(); }
|
||||||
LibertyPort *findLibertyMember(int index) const;
|
LibertyPort *findLibertyMember(int index) const;
|
||||||
LibertyPort *findLibertyBusBit(int index) const;
|
LibertyPort *findLibertyBusBit(int index) const;
|
||||||
LibertyPort *bundlePort() const;
|
|
||||||
BusDcl *busDcl() const { return bus_dcl_; }
|
BusDcl *busDcl() const { return bus_dcl_; }
|
||||||
void setDirection(PortDirection *dir);
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
// pg_pin functions
|
// pg_pin functions
|
||||||
|
|
@ -872,15 +873,15 @@ public:
|
||||||
const RiseFall *pulseClkTrigger() const { return pulse_clk_trigger_; }
|
const RiseFall *pulseClkTrigger() const { return pulse_clk_trigger_; }
|
||||||
// Rise for high, fall for low.
|
// Rise for high, fall for low.
|
||||||
const RiseFall *pulseClkSense() const { return pulse_clk_sense_; }
|
const RiseFall *pulseClkSense() const { return pulse_clk_sense_; }
|
||||||
void setPulseClk(const RiseFall *rfigger,
|
void setPulseClk(const RiseFall *trigger,
|
||||||
const RiseFall *sense);
|
const RiseFall *sense);
|
||||||
LibertyPort *scenePort(const Scene *scene,
|
LibertyPort *scenePort(const Scene *scene,
|
||||||
const MinMax *min_max);
|
const MinMax *min_max);
|
||||||
const LibertyPort *scenePort(const Scene *scene,
|
const LibertyPort *scenePort(const Scene *scene,
|
||||||
const MinMax *min_max) const;
|
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,
|
void setScenePort(LibertyPort *scene_port,
|
||||||
int ap_index);
|
size_t lib_ap_index);
|
||||||
LibertyPort *relatedGroundPort() const { return related_ground_port_; }
|
LibertyPort *relatedGroundPort() const { return related_ground_port_; }
|
||||||
void setRelatedGroundPort(LibertyPort *related_ground_port);
|
void setRelatedGroundPort(LibertyPort *related_ground_port);
|
||||||
LibertyPort *relatedPowerPort() const { return related_power_port_; }
|
LibertyPort *relatedPowerPort() const { return related_power_port_; }
|
||||||
|
|
@ -913,7 +914,7 @@ protected:
|
||||||
int to_index,
|
int to_index,
|
||||||
bool is_bundle,
|
bool is_bundle,
|
||||||
ConcretePortSeq *members);
|
ConcretePortSeq *members);
|
||||||
virtual ~LibertyPort();
|
~LibertyPort() override;
|
||||||
void setMinPort(LibertyPort *min);
|
void setMinPort(LibertyPort *min);
|
||||||
void addScaledPort(OperatingConditions *op_cond,
|
void addScaledPort(OperatingConditions *op_cond,
|
||||||
LibertyPort *scaled_port);
|
LibertyPort *scaled_port);
|
||||||
|
|
@ -927,48 +928,48 @@ protected:
|
||||||
float,
|
float,
|
||||||
const MinMax *)> &setter);
|
const MinMax *)> &setter);
|
||||||
|
|
||||||
LibertyPort *scenePort(int ap_index);
|
LibertyPort *scenePort(size_t lib_ap_index);
|
||||||
|
|
||||||
LibertyCell *liberty_cell_;
|
LibertyCell *liberty_cell_{nullptr};
|
||||||
BusDcl *bus_dcl_;
|
BusDcl *bus_dcl_{nullptr};
|
||||||
PwrGndType pwr_gnd_type_;
|
PwrGndType pwr_gnd_type_{PwrGndType::none};
|
||||||
std::string voltage_name_;
|
std::string voltage_name_;
|
||||||
ScanSignalType scan_signal_type_;
|
ScanSignalType scan_signal_type_{ScanSignalType::none};
|
||||||
FuncExpr *function_;
|
FuncExpr *function_{nullptr};
|
||||||
FuncExpr *tristate_enable_;
|
FuncExpr *tristate_enable_{nullptr};
|
||||||
ScaledPortMap *scaled_ports_;
|
ScaledPortMap *scaled_ports_{nullptr};
|
||||||
RiseFallMinMax capacitance_;
|
RiseFallMinMax capacitance_;
|
||||||
MinMaxFloatValues slew_limit_; // inputs and outputs
|
MinMaxFloatValues slew_limit_; // inputs and outputs
|
||||||
MinMaxFloatValues cap_limit_; // outputs
|
MinMaxFloatValues cap_limit_; // outputs
|
||||||
float fanout_load_; // inputs
|
float fanout_load_{0.0F}; // inputs
|
||||||
bool fanout_load_exists_;
|
bool fanout_load_exists_{false};
|
||||||
MinMaxFloatValues fanout_limit_; // outputs
|
MinMaxFloatValues fanout_limit_; // outputs
|
||||||
float min_period_;
|
float min_period_{0.0F};
|
||||||
float min_pulse_width_[RiseFall::index_count];
|
float min_pulse_width_[RiseFall::index_count]{0.0F, 0.0F};
|
||||||
const RiseFall *pulse_clk_trigger_;
|
const RiseFall *pulse_clk_trigger_{nullptr};
|
||||||
const RiseFall *pulse_clk_sense_;
|
const RiseFall *pulse_clk_sense_{nullptr};
|
||||||
LibertyPort *related_ground_port_;
|
LibertyPort *related_ground_port_{nullptr};
|
||||||
LibertyPort *related_power_port_;
|
LibertyPort *related_power_port_{nullptr};
|
||||||
std::vector<LibertyPort*> scene_ports_;
|
std::vector<LibertyPort*> scene_ports_;
|
||||||
ReceiverModelPtr receiver_model_;
|
ReceiverModelPtr receiver_model_{nullptr};
|
||||||
DriverWaveform *driver_waveform_[RiseFall::index_count];
|
DriverWaveform *driver_waveform_[RiseFall::index_count]{nullptr, nullptr};
|
||||||
|
|
||||||
unsigned int min_pulse_width_exists_:RiseFall::index_count;
|
bool min_pulse_width_exists_:RiseFall::index_count {false};
|
||||||
bool min_period_exists_:1;
|
bool min_period_exists_:1 {false};
|
||||||
bool is_clk_:1;
|
bool is_clk_:1 {false};
|
||||||
bool is_reg_clk_:1;
|
bool is_reg_clk_:1 {false};
|
||||||
bool is_reg_output_:1;
|
bool is_reg_output_:1 {false};
|
||||||
bool is_latch_data_: 1;
|
bool is_latch_data_: 1 {false};
|
||||||
bool is_check_clk_:1;
|
bool is_check_clk_:1 {false};
|
||||||
bool is_clk_gate_clk_:1;
|
bool is_clk_gate_clk_:1 {false};
|
||||||
bool is_clk_gate_enable_:1;
|
bool is_clk_gate_enable_:1 {false};
|
||||||
bool is_clk_gate_out_:1;
|
bool is_clk_gate_out_:1 {false};
|
||||||
bool is_pll_feedback_:1;
|
bool is_pll_feedback_:1 {false};
|
||||||
bool isolation_cell_data_:1;
|
bool isolation_cell_data_:1 {false};
|
||||||
bool isolation_cell_enable_:1;
|
bool isolation_cell_enable_:1 {false};
|
||||||
bool level_shifter_data_:1;
|
bool level_shifter_data_:1 {false};
|
||||||
bool is_switch_:1;
|
bool is_switch_:1 {false};
|
||||||
bool is_pad_:1;
|
bool is_pad_:1 {false};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class LibertyLibrary;
|
friend class LibertyLibrary;
|
||||||
|
|
@ -984,7 +985,7 @@ class LibertyPortMemberIterator : public Iterator<LibertyPort*>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LibertyPortMemberIterator(const LibertyPort *port);
|
LibertyPortMemberIterator(const LibertyPort *port);
|
||||||
virtual ~LibertyPortMemberIterator();
|
~LibertyPortMemberIterator() override;
|
||||||
bool hasNext() override;
|
bool hasNext() override;
|
||||||
LibertyPort *next() override;
|
LibertyPort *next() override;
|
||||||
|
|
||||||
|
|
@ -999,7 +1000,7 @@ public:
|
||||||
Pvt(float process,
|
Pvt(float process,
|
||||||
float voltage,
|
float voltage,
|
||||||
float temperature);
|
float temperature);
|
||||||
virtual ~Pvt() {}
|
virtual ~Pvt() = default;
|
||||||
float process() const { return process_; }
|
float process() const { return process_; }
|
||||||
void setProcess(float process);
|
void setProcess(float process);
|
||||||
float voltage() const { return voltage_; }
|
float voltage() const { return voltage_; }
|
||||||
|
|
@ -1023,7 +1024,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string name_;
|
std::string name_;
|
||||||
WireloadTree wire_load_tree_;
|
WireloadTree wire_load_tree_{WireloadTree::unknown};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ScaleFactors
|
class ScaleFactors
|
||||||
|
|
@ -1112,7 +1113,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string name_;
|
std::string name_;
|
||||||
TableTemplateType type_;
|
TableTemplateType type_{TableTemplateType::delay};
|
||||||
TableAxisPtr axis1_;
|
TableAxisPtr axis1_;
|
||||||
TableAxisPtr axis2_;
|
TableAxisPtr axis2_;
|
||||||
TableAxisPtr axis3_;
|
TableAxisPtr axis3_;
|
||||||
|
|
@ -1124,15 +1125,12 @@ public:
|
||||||
TestCell(LibertyLibrary *library,
|
TestCell(LibertyLibrary *library,
|
||||||
std::string_view name,
|
std::string_view name,
|
||||||
std::string_view filename);
|
std::string_view filename);
|
||||||
|
|
||||||
protected:
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class OcvDerate
|
class OcvDerate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
OcvDerate(std::string_view name);
|
OcvDerate(std::string_view name);
|
||||||
~OcvDerate();
|
|
||||||
const std::string &name() const { return name_; }
|
const std::string &name() const { return name_; }
|
||||||
const Table *derateTable(const RiseFall *rf,
|
const Table *derateTable(const RiseFall *rf,
|
||||||
const EarlyLate *early_late,
|
const EarlyLate *early_late,
|
||||||
|
|
@ -1153,8 +1151,8 @@ portLibertyToSta(std::string_view port_name);
|
||||||
const std::string &
|
const std::string &
|
||||||
scanSignalTypeName(ScanSignalType scan_type);
|
scanSignalTypeName(ScanSignalType scan_type);
|
||||||
const std::string &
|
const std::string &
|
||||||
pwrGndTypeName(PwrGndType pwr_gnd_type);
|
pwrGndTypeName(PwrGndType pg_type);
|
||||||
PwrGndType
|
PwrGndType
|
||||||
findPwrGndType(std::string_view pg_name);
|
findPwrGndType(std::string_view pg_name);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ enum class ScaleFactorType : unsigned {
|
||||||
wire_cap,
|
wire_cap,
|
||||||
wire_res,
|
wire_res,
|
||||||
min_period,
|
min_period,
|
||||||
// Liberty attributes have rise/fall suffix.
|
// Liberty attributes with rise/fall suffix.
|
||||||
cell,
|
cell,
|
||||||
hold,
|
hold,
|
||||||
setup,
|
setup,
|
||||||
|
|
@ -95,13 +95,13 @@ enum class ScaleFactorType : unsigned {
|
||||||
skew,
|
skew,
|
||||||
leakage_power,
|
leakage_power,
|
||||||
internal_power,
|
internal_power,
|
||||||
// Liberty attributes have rise/fall prefix.
|
// Liberty attributes with rise/fall prefix.
|
||||||
transition,
|
transition,
|
||||||
// Liberty attributes have low/high suffix (indexed as rise/fall).
|
// Liberty attributes with low/high suffix (indexed as rise/fall).
|
||||||
min_pulse_width,
|
min_pulse_width,
|
||||||
unknown,
|
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.
|
// Enough bits to hold a ScaleFactorType enum.
|
||||||
const int scale_factor_bits = 4;
|
const int scale_factor_bits = 4;
|
||||||
|
|
||||||
|
|
@ -116,7 +116,7 @@ enum class TimingSense {
|
||||||
none,
|
none,
|
||||||
unknown
|
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;
|
const int timing_sense_bit_count = 3;
|
||||||
|
|
||||||
enum class TableAxisVariable {
|
enum class TableAxisVariable {
|
||||||
|
|
@ -178,4 +178,4 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -35,4 +35,4 @@ writeLiberty(LibertyLibrary *lib,
|
||||||
const char *filename,
|
const char *filename,
|
||||||
StaState *sta);
|
StaState *sta);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,9 @@ public:
|
||||||
PocvMode pocv_mode,
|
PocvMode pocv_mode,
|
||||||
int digits) const override;
|
int digits) const override;
|
||||||
float driveResistance(const Pvt *pvt) const override;
|
float driveResistance(const Pvt *pvt) const override;
|
||||||
|
|
||||||
protected:
|
|
||||||
void setIsScaled(bool is_scaled) override;
|
void setIsScaled(bool is_scaled) override;
|
||||||
|
|
||||||
|
protected:
|
||||||
float intrinsic_;
|
float intrinsic_;
|
||||||
float resistance_;
|
float resistance_;
|
||||||
};
|
};
|
||||||
|
|
@ -82,11 +81,10 @@ public:
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
PocvMode pocv_mode,
|
PocvMode pocv_mode,
|
||||||
int digits) const override;
|
int digits) const override;
|
||||||
|
|
||||||
protected:
|
|
||||||
void setIsScaled(bool is_scaled) override;
|
void setIsScaled(bool is_scaled) override;
|
||||||
|
|
||||||
|
protected:
|
||||||
float intrinsic_;
|
float intrinsic_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -26,11 +26,6 @@
|
||||||
|
|
||||||
// This header contains global os/port specific definitions.
|
// This header contains global os/port specific definitions.
|
||||||
|
|
||||||
// Pragma placeholder for non-gcc compilers.
|
|
||||||
#ifndef __GNUC__
|
|
||||||
#define __attribute__(x)
|
|
||||||
#endif // __GNUC__
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
// Microcruft Visual C++
|
// Microcruft Visual C++
|
||||||
// Obtuse warning codes enabled by pragma.
|
// Obtuse warning codes enabled by pragma.
|
||||||
|
|
@ -48,6 +43,7 @@
|
||||||
// 4611 = setjmp used in C++ function
|
// 4611 = setjmp used in C++ function
|
||||||
// 4701 = variable used but not initialized
|
// 4701 = variable used but not initialized
|
||||||
#pragma warning( 3 : 4018 4032 4132 4189 4201 4222 4234 4505 4611 4701 )
|
#pragma warning( 3 : 4018 4032 4132 4189 4201 4222 4234 4505 4611 4701 )
|
||||||
|
|
||||||
// Disable security warnings for posix functions.
|
// Disable security warnings for posix functions.
|
||||||
// _CRT_SECURE_NO_WARNINGS does not seem to work
|
// _CRT_SECURE_NO_WARNINGS does not seem to work
|
||||||
#pragma warning( disable : 4996 )
|
#pragma warning( disable : 4996 )
|
||||||
|
|
@ -65,7 +61,7 @@
|
||||||
// Flex doesn't check for unistd.h.
|
// Flex doesn't check for unistd.h.
|
||||||
#define YY_NO_UNISTD_H
|
#define YY_NO_UNISTD_H
|
||||||
namespace sta {
|
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);
|
int vasprintf(char **str, const char *fmt, va_list args);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -31,4 +31,4 @@ class NetworkReader;
|
||||||
NetworkReader *
|
NetworkReader *
|
||||||
makeConcreteNetwork();
|
makeConcreteNetwork();
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -52,12 +52,12 @@ public:
|
||||||
static const MinMax *max() { return &max_; }
|
static const MinMax *max() { return &max_; }
|
||||||
static const EarlyLate *early() { return &min_; }
|
static const EarlyLate *early() { return &min_; }
|
||||||
static const EarlyLate *late() { return &max_; }
|
static const EarlyLate *late() { return &max_; }
|
||||||
static int minIndex() { return min_.index_; }
|
static size_t minIndex() { return min_.index_; }
|
||||||
static int earlyIndex() { return min_.index_; }
|
static size_t earlyIndex() { return min_.index_; }
|
||||||
static int maxIndex() { return max_.index_; }
|
static size_t maxIndex() { return max_.index_; }
|
||||||
static int lateIndex() { return max_.index_; }
|
static size_t lateIndex() { return max_.index_; }
|
||||||
const std::string &to_string() const { return name_; }
|
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_; }
|
float initValue() const { return init_value_; }
|
||||||
int initValueInt() const { return init_value_int_; }
|
int initValueInt() const { return init_value_int_; }
|
||||||
// Max value1 > value2, Min value1 < value2.
|
// Max value1 > value2, Min value1 < value2.
|
||||||
|
|
@ -72,18 +72,18 @@ public:
|
||||||
// for (auto min_max : MinMax::range()) {}
|
// for (auto min_max : MinMax::range()) {}
|
||||||
static const std::array<const MinMax*, 2> &range() { return range_; }
|
static const std::array<const MinMax*, 2> &range() { return range_; }
|
||||||
// for (auto mm_index : MinMax::rangeIndex()) {}
|
// 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.
|
// 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.
|
// Find MinMax from index.
|
||||||
static const MinMax *find(int index);
|
static const MinMax *find(size_t index);
|
||||||
static const int index_max = 1;
|
static const size_t index_max = 1;
|
||||||
static const int index_count = 2;
|
static const size_t index_count = 2;
|
||||||
static const int index_bit_count = 1;
|
static const size_t index_bit_count = 1;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MinMax(const char *name,
|
MinMax(std::string_view name,
|
||||||
int index,
|
size_t index,
|
||||||
float init_value,
|
float init_value,
|
||||||
int init_value_int,
|
int init_value_int,
|
||||||
bool (*compare)(float value1,
|
bool (*compare)(float value1,
|
||||||
|
|
@ -99,7 +99,7 @@ private:
|
||||||
static const MinMax min_;
|
static const MinMax min_;
|
||||||
static const MinMax max_;
|
static const MinMax max_;
|
||||||
static const std::array<const MinMax*, 2> range_;
|
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.
|
// 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 *all() { return &all_; }
|
||||||
static const MinMaxAll *minMax() { return &all_; }
|
static const MinMaxAll *minMax() { return &all_; }
|
||||||
const std::string &to_string() const { return name_; }
|
const std::string &to_string() const { return name_; }
|
||||||
int index() const { return index_; }
|
size_t index() const { return index_; }
|
||||||
const MinMax *asMinMax() const;
|
const MinMax *asMinMax() const;
|
||||||
bool matches(const MinMax *min_max) const;
|
bool matches(const MinMax *min_max) const;
|
||||||
bool matches(const MinMaxAll *min_max) const;
|
bool matches(const MinMaxAll *min_max) const;
|
||||||
|
|
@ -122,22 +122,22 @@ public:
|
||||||
// for (const auto min_max : min_max->range()) {}
|
// for (const auto min_max : min_max->range()) {}
|
||||||
const std::vector<const MinMax*> &range() const { return range_; }
|
const std::vector<const MinMax*> &range() const { return range_; }
|
||||||
// for (const auto mm_index : min_max->rangeIndex()) {}
|
// 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:
|
private:
|
||||||
MinMaxAll(const char *name,
|
MinMaxAll(std::string_view name,
|
||||||
int index,
|
size_t index,
|
||||||
std::vector<const MinMax*> range,
|
const std::vector<const MinMax*> &range,
|
||||||
std::vector<int> range_index);
|
const std::vector<size_t> &range_index);
|
||||||
|
|
||||||
const std::string name_;
|
const std::string name_;
|
||||||
int index_;
|
size_t index_;
|
||||||
const std::vector<const MinMax*> range_;
|
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 min_;
|
||||||
static const MinMaxAll max_;
|
static const MinMaxAll max_;
|
||||||
static const MinMaxAll all_;
|
static const MinMaxAll all_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -200,4 +200,4 @@ private:
|
||||||
using MinMaxFloatValues = MinMaxValues<float>;
|
using MinMaxFloatValues = MinMaxValues<float>;
|
||||||
using MinMaxIntValues = MinMaxValues<int>;
|
using MinMaxIntValues = MinMaxValues<int>;
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -39,21 +39,22 @@ class PathGroups;
|
||||||
using PathGroupSeq = std::vector<PathGroup*>;
|
using PathGroupSeq = std::vector<PathGroup*>;
|
||||||
|
|
||||||
// Sdc and dependent state.
|
// Sdc and dependent state.
|
||||||
class Mode : public StaState
|
class Mode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Mode(std::string_view name,
|
Mode(std::string_view name,
|
||||||
size_t mode_index,
|
size_t mode_index,
|
||||||
StaState *sta);
|
StaState *sta);
|
||||||
virtual ~Mode();
|
~Mode();
|
||||||
virtual void copyState(const StaState *sta);
|
void copyState(const StaState *sta);
|
||||||
void clear();
|
void clear();
|
||||||
const std::string &name() const { return name_; }
|
const std::string &name() const { return name_; }
|
||||||
size_t modeIndex() const { return mode_index_; }
|
size_t modeIndex() const { return mode_index_; }
|
||||||
const SceneSeq &scenes() const { return scenes_; }
|
const SceneSeq &scenes() const { return scenes_; }
|
||||||
const SceneSet sceneSet() const;
|
SceneSet sceneSet() const;
|
||||||
void addScene(Scene *scene);
|
void addScene(Scene *scene);
|
||||||
void removeScene(Scene *scene);
|
void removeScene(Scene *scene);
|
||||||
|
StaState *sta() const { return sta_; }
|
||||||
Sdc *sdc() { return sdc_; }
|
Sdc *sdc() { return sdc_; }
|
||||||
Sdc *sdc() const { return sdc_; }
|
Sdc *sdc() const { return sdc_; }
|
||||||
Sim *sim() { return sim_; }
|
Sim *sim() { return sim_; }
|
||||||
|
|
@ -69,8 +70,8 @@ public:
|
||||||
int endpoint_path_count,
|
int endpoint_path_count,
|
||||||
bool unique_pins,
|
bool unique_pins,
|
||||||
bool unique_edges,
|
bool unique_edges,
|
||||||
float min_slack,
|
float slack_min,
|
||||||
float max_slack,
|
float slack_max,
|
||||||
StringSeq &group_names,
|
StringSeq &group_names,
|
||||||
bool setup,
|
bool setup,
|
||||||
bool hold,
|
bool hold,
|
||||||
|
|
@ -89,7 +90,8 @@ private:
|
||||||
Sim *sim_;
|
Sim *sim_;
|
||||||
ClkNetwork *clk_network_;
|
ClkNetwork *clk_network_;
|
||||||
Genclks *genclks_;
|
Genclks *genclks_;
|
||||||
PathGroups *path_groups_;
|
PathGroups *path_groups_{nullptr};
|
||||||
|
StaState *sta_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,6 @@
|
||||||
namespace sta {
|
namespace sta {
|
||||||
|
|
||||||
// Hide a bit of the std verbosity.
|
// Hide a bit of the std verbosity.
|
||||||
using LockGuard = std::lock_guard<std::mutex>;
|
using LockGuard = std::scoped_lock<std::mutex>;
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ class Network : public StaState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Network();
|
Network();
|
||||||
virtual ~Network();
|
~Network() override;
|
||||||
virtual void clear();
|
virtual void clear();
|
||||||
|
|
||||||
// Linking the hierarchy creates the instance/pin/net network hierarchy.
|
// Linking the hierarchy creates the instance/pin/net network hierarchy.
|
||||||
|
|
@ -501,7 +501,7 @@ class NetworkEdit : public Network
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NetworkEdit();
|
NetworkEdit();
|
||||||
virtual bool isEditable() const { return true; }
|
bool isEditable() const override { return true; }
|
||||||
virtual Instance *makeInstance(LibertyCell *cell,
|
virtual Instance *makeInstance(LibertyCell *cell,
|
||||||
std::string_view name,
|
std::string_view name,
|
||||||
Instance *parent) = 0;
|
Instance *parent) = 0;
|
||||||
|
|
@ -533,7 +533,6 @@ public:
|
||||||
class NetworkReader : public NetworkEdit
|
class NetworkReader : public NetworkEdit
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NetworkReader() {}
|
|
||||||
// Called before reading a netlist to delete any previously linked network.
|
// Called before reading a netlist to delete any previously linked network.
|
||||||
virtual void readNetlistBefore() = 0;
|
virtual void readNetlistBefore() = 0;
|
||||||
virtual void setLinkFunc(LinkNetworkFunc link) = 0;
|
virtual void setLinkFunc(LinkNetworkFunc link) = 0;
|
||||||
|
|
@ -599,8 +598,7 @@ linkReaderNetwork(Cell *top_cell,
|
||||||
class ConstantPinIterator
|
class ConstantPinIterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ConstantPinIterator() {}
|
virtual ~ConstantPinIterator() = default;
|
||||||
virtual ~ConstantPinIterator() {}
|
|
||||||
virtual bool hasNext() = 0;
|
virtual bool hasNext() = 0;
|
||||||
virtual void next(const Pin *&pin,
|
virtual void next(const Pin *&pin,
|
||||||
LogicValue &value) = 0;
|
LogicValue &value) = 0;
|
||||||
|
|
@ -613,9 +611,8 @@ public:
|
||||||
NetworkConstantPinIterator(const Network *network,
|
NetworkConstantPinIterator(const Network *network,
|
||||||
NetSet &zero_nets,
|
NetSet &zero_nets,
|
||||||
NetSet &one_nets);
|
NetSet &one_nets);
|
||||||
virtual ~NetworkConstantPinIterator() {}
|
bool hasNext() override;
|
||||||
virtual bool hasNext();
|
void next(const Pin *&pin, LogicValue &value) override;
|
||||||
virtual void next(const Pin *&pin, LogicValue &value);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void findConstantPins(NetSet &nets,
|
void findConstantPins(NetSet &nets,
|
||||||
|
|
@ -631,8 +628,7 @@ private:
|
||||||
class HierPinThruVisitor
|
class HierPinThruVisitor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HierPinThruVisitor() {}
|
virtual ~HierPinThruVisitor() = default;
|
||||||
virtual ~HierPinThruVisitor() {}
|
|
||||||
virtual void visit(const Pin *drvr,
|
virtual void visit(const Pin *drvr,
|
||||||
const Pin *load) = 0;
|
const Pin *load) = 0;
|
||||||
};
|
};
|
||||||
|
|
@ -640,7 +636,7 @@ public:
|
||||||
class PinVisitor
|
class PinVisitor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~PinVisitor() {}
|
virtual ~PinVisitor() = default;
|
||||||
virtual void operator()(const Pin *pin) = 0;
|
virtual void operator()(const Pin *pin) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -652,7 +648,7 @@ public:
|
||||||
PinSeq &loads,
|
PinSeq &loads,
|
||||||
PinSeq &drvrs,
|
PinSeq &drvrs,
|
||||||
const Network *network);
|
const Network *network);
|
||||||
virtual void operator()(const Pin *pin);
|
void operator()(const Pin *pin) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const Pin *drvr_pin_;
|
const Pin *drvr_pin_;
|
||||||
|
|
@ -675,4 +671,4 @@ visitDrvrLoadsThruNet(const Net *net,
|
||||||
char
|
char
|
||||||
logicValueString(LogicValue value);
|
logicValueString(LogicValue value);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -173,4 +173,4 @@ public:
|
||||||
NetSet(const Network *network);
|
NetSet(const Network *network);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -91,4 +91,4 @@ NetSeq
|
||||||
sortByPathName(NetSet *set,
|
sortByPathName(NetSet *set,
|
||||||
const Network *network);
|
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 ObjectId object_id_null = 0;
|
||||||
static constexpr ObjectIdx object_idx_null = 0;
|
static constexpr ObjectIdx object_idx_null = 0;
|
||||||
|
|
||||||
} // Namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,6 @@ template <class TYPE>
|
||||||
class ObjectTable
|
class ObjectTable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ObjectTable();
|
|
||||||
~ObjectTable();
|
~ObjectTable();
|
||||||
TYPE *make();
|
TYPE *make();
|
||||||
void destroy(TYPE *object);
|
void destroy(TYPE *object);
|
||||||
|
|
@ -70,20 +69,13 @@ private:
|
||||||
void freePush(TYPE *object,
|
void freePush(TYPE *object,
|
||||||
ObjectId id);
|
ObjectId id);
|
||||||
|
|
||||||
size_t size_;
|
size_t size_{0};
|
||||||
// Object ID of next free object.
|
// Object ID of next free object.
|
||||||
ObjectId free_;
|
ObjectId free_{object_id_null};
|
||||||
std::vector<TableBlock<TYPE>*> blocks_;
|
std::vector<TableBlock<TYPE>*> blocks_;
|
||||||
static constexpr ObjectId idx_mask_ = block_object_count - 1;
|
static constexpr ObjectId idx_mask_ = block_object_count - 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class TYPE>
|
|
||||||
ObjectTable<TYPE>::ObjectTable() :
|
|
||||||
size_(0),
|
|
||||||
free_(object_id_null)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class TYPE>
|
template <class TYPE>
|
||||||
ObjectTable<TYPE>::~ObjectTable()
|
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:
|
public:
|
||||||
Parasitics(StaState *sta);
|
Parasitics(StaState *sta);
|
||||||
virtual ~Parasitics() {}
|
|
||||||
virtual const std::string &name() const = 0;
|
virtual const std::string &name() const = 0;
|
||||||
virtual const std::string &filename() const = 0;
|
virtual const std::string &filename() const = 0;
|
||||||
virtual bool haveParasitics() = 0;
|
virtual bool haveParasitics() = 0;
|
||||||
|
|
@ -304,4 +303,4 @@ private:
|
||||||
const Network *network_;
|
const Network *network_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -32,4 +32,4 @@ class ParasiticNode;
|
||||||
class ParasiticResistor;
|
class ParasiticResistor;
|
||||||
class ParasiticCapacitor;
|
class ParasiticCapacitor;
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ namespace sta {
|
||||||
// Return true if name is a bus.
|
// Return true if name is a bus.
|
||||||
bool
|
bool
|
||||||
isBusName(std::string_view name,
|
isBusName(std::string_view name,
|
||||||
const char brkt_left,
|
char brkt_left,
|
||||||
const char brkt_right,
|
char brkt_right,
|
||||||
char escape);
|
char escape);
|
||||||
|
|
||||||
// Parse name as a bus.
|
// Parse name as a bus.
|
||||||
|
|
@ -45,8 +45,8 @@ isBusName(std::string_view name,
|
||||||
// Caller must delete returned bus_name string.
|
// Caller must delete returned bus_name string.
|
||||||
void
|
void
|
||||||
parseBusName(std::string_view name,
|
parseBusName(std::string_view name,
|
||||||
const char brkt_left,
|
char brkt_left,
|
||||||
const char brkt_right,
|
char brkt_right,
|
||||||
char escape,
|
char escape,
|
||||||
// Return values.
|
// Return values.
|
||||||
bool &is_bus,
|
bool &is_bus,
|
||||||
|
|
@ -68,8 +68,8 @@ parseBusName(std::string_view name,
|
||||||
// Caller must delete returned bus_name string.
|
// Caller must delete returned bus_name string.
|
||||||
void
|
void
|
||||||
parseBusName(std::string_view name,
|
parseBusName(std::string_view name,
|
||||||
const char brkt_left,
|
char brkt_left,
|
||||||
const char brkt_right,
|
char brkt_right,
|
||||||
char escape,
|
char escape,
|
||||||
// Return values.
|
// Return values.
|
||||||
bool &is_bus,
|
bool &is_bus,
|
||||||
|
|
@ -85,7 +85,7 @@ void
|
||||||
parseBusName(std::string_view name,
|
parseBusName(std::string_view name,
|
||||||
std::string_view brkts_left,
|
std::string_view brkts_left,
|
||||||
std::string_view brkts_right,
|
std::string_view brkts_right,
|
||||||
const char escape,
|
char escape,
|
||||||
// Return values.
|
// Return values.
|
||||||
bool &is_bus,
|
bool &is_bus,
|
||||||
bool &is_range,
|
bool &is_range,
|
||||||
|
|
@ -97,8 +97,8 @@ parseBusName(std::string_view name,
|
||||||
// Insert escapes before ch1 and ch2 in token.
|
// Insert escapes before ch1 and ch2 in token.
|
||||||
std::string
|
std::string
|
||||||
escapeChars(std::string_view token,
|
escapeChars(std::string_view token,
|
||||||
const char ch1,
|
char ch1,
|
||||||
const char ch2,
|
char ch2,
|
||||||
const char escape);
|
char escape);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ public:
|
||||||
const Required &required() const {return required_; }
|
const Required &required() const {return required_; }
|
||||||
void setRequired(const Required &required);
|
void setRequired(const Required &required);
|
||||||
Slack slack(const StaState *sta) const;
|
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.
|
// This takes the same time as prevPath and prevArc combined.
|
||||||
Path *prevPath() const;
|
Path *prevPath() const;
|
||||||
void setPrevPath(Path *prev_path);
|
void setPrevPath(Path *prev_path);
|
||||||
|
|
@ -201,7 +201,6 @@ public:
|
||||||
const RiseFall *rf,
|
const RiseFall *rf,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
const StaState *sta);
|
const StaState *sta);
|
||||||
virtual ~VertexPathIterator();
|
|
||||||
bool hasNext() override;
|
bool hasNext() override;
|
||||||
Path *next() override;
|
Path *next() override;
|
||||||
|
|
||||||
|
|
@ -219,4 +218,4 @@ private:
|
||||||
Path *next_;
|
Path *next_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual PathEnd *copy() const = 0;
|
virtual PathEnd *copy() const = 0;
|
||||||
virtual ~PathEnd() {}
|
virtual ~PathEnd() = default;
|
||||||
void deletePath();
|
void deletePath();
|
||||||
Path *path() { return path_; }
|
Path *path() { return path_; }
|
||||||
const Path *path() const { return path_; }
|
const Path *path() const { return path_; }
|
||||||
|
|
@ -147,9 +147,8 @@ public:
|
||||||
virtual TimingArc *checkArc() const { return nullptr; }
|
virtual TimingArc *checkArc() const { return nullptr; }
|
||||||
// PathEndDataCheck data clock path.
|
// PathEndDataCheck data clock path.
|
||||||
virtual const Path *dataClkPath() const { return nullptr; }
|
virtual const Path *dataClkPath() const { return nullptr; }
|
||||||
virtual int setupDefaultCycles() const { return 1; }
|
|
||||||
virtual Delay clkSkew(const StaState *sta);
|
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,
|
static bool less(const PathEnd *path_end1,
|
||||||
const PathEnd *path_end2,
|
const PathEnd *path_end2,
|
||||||
|
|
@ -219,53 +218,55 @@ protected:
|
||||||
static bool ignoreClkLatency(const Path *path,
|
static bool ignoreClkLatency(const Path *path,
|
||||||
PathDelay *path_delay,
|
PathDelay *path_delay,
|
||||||
const StaState *sta);
|
const StaState *sta);
|
||||||
|
virtual int setupDefaultCycles() const { return 1; }
|
||||||
|
|
||||||
Path *path_;
|
Path *path_;
|
||||||
PathGroup *path_group_;
|
PathGroup *path_group_{nullptr};
|
||||||
};
|
};
|
||||||
|
|
||||||
class PathEndUnconstrained : public PathEnd
|
class PathEndUnconstrained : public PathEnd
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PathEndUnconstrained(Path *path);
|
PathEndUnconstrained(Path *path);
|
||||||
virtual Type type() const;
|
Type type() const override;
|
||||||
virtual const char *typeName() const;
|
const char *typeName() const override;
|
||||||
virtual PathEnd *copy() const;
|
PathEnd *copy() const override;
|
||||||
virtual void reportShort(const ReportPath *report) const;
|
void reportShort(const ReportPath *report) const override;
|
||||||
virtual void reportFull(const ReportPath *report) const;
|
void reportFull(const ReportPath *report) const override;
|
||||||
virtual bool isUnconstrained() const;
|
bool isUnconstrained() const override;
|
||||||
virtual Required requiredTime(const StaState *sta) const;
|
Required requiredTime(const StaState *sta) const override;
|
||||||
virtual Required requiredTimeOffset(const StaState *sta) const;
|
Required requiredTimeOffset(const StaState *sta) const override;
|
||||||
virtual ArcDelay margin(const StaState *sta) const;
|
ArcDelay margin(const StaState *sta) const override;
|
||||||
virtual Slack slack(const StaState *sta) const;
|
Slack slack(const StaState *sta) const override;
|
||||||
virtual Slack slackNoCrpr(const StaState *sta) const;
|
Slack slackNoCrpr(const StaState *sta) const override;
|
||||||
virtual float sourceClkOffset(const StaState *sta) const;
|
float sourceClkOffset(const StaState *sta) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PathEndClkConstrained : public PathEnd
|
class PathEndClkConstrained : public PathEnd
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual float sourceClkOffset(const StaState *sta) const;
|
float sourceClkOffset(const StaState *sta) const override;
|
||||||
virtual Delay sourceClkLatency(const StaState *sta) const;
|
Delay sourceClkLatency(const StaState *sta) const override;
|
||||||
virtual Delay sourceClkInsertionDelay(const StaState *sta) const;
|
Delay sourceClkInsertionDelay(const StaState *sta) const override;
|
||||||
virtual const Clock *targetClk(const StaState *sta) const;
|
const Clock *targetClk(const StaState *sta) const override;
|
||||||
virtual const ClockEdge *targetClkEdge(const StaState *sta) const;
|
const ClockEdge *targetClkEdge(const StaState *sta) const override;
|
||||||
virtual Path *targetClkPath();
|
Path *targetClkPath() override;
|
||||||
virtual const Path *targetClkPath() const;
|
const Path *targetClkPath() const override;
|
||||||
virtual float targetClkTime(const StaState *sta) const;
|
float targetClkTime(const StaState *sta) const override;
|
||||||
virtual float targetClkOffset(const StaState *sta) const;
|
float targetClkOffset(const StaState *sta) const override;
|
||||||
virtual Arrival targetClkArrival(const StaState *sta) const;
|
Arrival targetClkArrival(const StaState *sta) const override;
|
||||||
virtual Delay targetClkDelay(const StaState *sta) const;
|
Delay targetClkDelay(const StaState *sta) const override;
|
||||||
virtual Delay targetClkInsertionDelay(const StaState *sta) const;
|
Delay targetClkInsertionDelay(const StaState *sta) const override;
|
||||||
virtual float targetNonInterClkUncertainty(const StaState *sta) const;
|
float targetNonInterClkUncertainty(const StaState *sta) const override;
|
||||||
virtual float interClkUncertainty(const StaState *sta) const;
|
float interClkUncertainty(const StaState *sta) const override;
|
||||||
virtual float targetClkUncertainty(const StaState *sta) const;
|
float targetClkUncertainty(const StaState *sta) const override;
|
||||||
virtual Crpr crpr(const StaState *sta) const;
|
Crpr crpr(const StaState *sta) const override;
|
||||||
virtual Required requiredTime(const StaState *sta) const;
|
Required requiredTime(const StaState *sta) const override;
|
||||||
virtual Slack slack(const StaState *sta) const;
|
Slack slack(const StaState *sta) const override;
|
||||||
virtual Slack slackNoCrpr(const StaState *sta) const;
|
Slack slackNoCrpr(const StaState *sta) const override;
|
||||||
virtual int exceptPathCmp(const PathEnd *path_end,
|
int exceptPathCmp(const PathEnd *path_end,
|
||||||
const StaState *sta) const;
|
const StaState *sta) const override;
|
||||||
virtual void setPath(Path *path);
|
void setPath(Path *path) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
PathEndClkConstrained(Path *path,
|
PathEndClkConstrained(Path *path,
|
||||||
|
|
@ -280,16 +281,16 @@ protected:
|
||||||
|
|
||||||
Path *clk_path_;
|
Path *clk_path_;
|
||||||
mutable Crpr crpr_;
|
mutable Crpr crpr_;
|
||||||
mutable bool crpr_valid_;
|
mutable bool crpr_valid_{false};
|
||||||
};
|
};
|
||||||
|
|
||||||
class PathEndClkConstrainedMcp : public PathEndClkConstrained
|
class PathEndClkConstrainedMcp : public PathEndClkConstrained
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual MultiCyclePath *multiCyclePath() const { return mcp_; }
|
MultiCyclePath *multiCyclePath() const override { return mcp_; }
|
||||||
virtual float targetClkMcpAdjustment(const StaState *sta) const;
|
float targetClkMcpAdjustment(const StaState *sta) const override;
|
||||||
virtual int exceptPathCmp(const PathEnd *path_end,
|
int exceptPathCmp(const PathEnd *path_end,
|
||||||
const StaState *sta) const;
|
const StaState *sta) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
PathEndClkConstrainedMcp(Path *path,
|
PathEndClkConstrainedMcp(Path *path,
|
||||||
|
|
@ -316,23 +317,23 @@ public:
|
||||||
Path *clk_path,
|
Path *clk_path,
|
||||||
MultiCyclePath *mcp,
|
MultiCyclePath *mcp,
|
||||||
const StaState *sta);
|
const StaState *sta);
|
||||||
virtual PathEnd *copy() const;
|
PathEnd *copy() const override;
|
||||||
virtual Type type() const;
|
Type type() const override;
|
||||||
virtual const char *typeName() const;
|
const char *typeName() const override;
|
||||||
virtual void reportShort(const ReportPath *report) const;
|
void reportShort(const ReportPath *report) const override;
|
||||||
virtual void reportFull(const ReportPath *report) const;
|
void reportFull(const ReportPath *report) const override;
|
||||||
virtual bool isCheck() const { return true; }
|
bool isCheck() const override { return true; }
|
||||||
virtual ArcDelay margin(const StaState *sta) const;
|
ArcDelay margin(const StaState *sta) const override;
|
||||||
virtual float macroClkTreeDelay(const StaState *sta) const;
|
float macroClkTreeDelay(const StaState *sta) const override;
|
||||||
virtual const TimingRole *checkRole(const StaState *sta) const;
|
const TimingRole *checkRole(const StaState *sta) const override;
|
||||||
virtual TimingArc *checkArc() const { return check_arc_; }
|
TimingArc *checkArc() const override { return check_arc_; }
|
||||||
virtual int exceptPathCmp(const PathEnd *path_end,
|
int exceptPathCmp(const PathEnd *path_end,
|
||||||
const StaState *sta) const;
|
const StaState *sta) const override;
|
||||||
virtual Delay clkSkew(const StaState *sta);
|
Delay clkSkew(const StaState *sta) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Delay sourceClkDelay(const StaState *sta) const;
|
Delay sourceClkDelay(const StaState *sta) const;
|
||||||
virtual Required requiredTimeNoCrpr(const StaState *sta) const;
|
Required requiredTimeNoCrpr(const StaState *sta) const override;
|
||||||
|
|
||||||
TimingArc *check_arc_;
|
TimingArc *check_arc_;
|
||||||
Edge *check_edge_;
|
Edge *check_edge_;
|
||||||
|
|
@ -349,25 +350,25 @@ public:
|
||||||
MultiCyclePath *mcp,
|
MultiCyclePath *mcp,
|
||||||
PathDelay *path_delay,
|
PathDelay *path_delay,
|
||||||
const StaState *sta);
|
const StaState *sta);
|
||||||
virtual Type type() const;
|
Type type() const override;
|
||||||
virtual const char *typeName() const;
|
const char *typeName() const override;
|
||||||
virtual float sourceClkOffset(const StaState *sta) const;
|
float sourceClkOffset(const StaState *sta) const override;
|
||||||
virtual bool isCheck() const { return false; }
|
bool isCheck() const override { return false; }
|
||||||
virtual bool isLatchCheck() const { return true; }
|
bool isLatchCheck() const override { return true; }
|
||||||
virtual PathDelay *pathDelay() const { return path_delay_; }
|
PathDelay *pathDelay() const override { return path_delay_; }
|
||||||
virtual PathEnd *copy() const;
|
PathEnd *copy() const override;
|
||||||
Path *latchDisable();
|
Path *latchDisable();
|
||||||
const Path *latchDisable() const;
|
const Path *latchDisable() const;
|
||||||
virtual void reportShort(const ReportPath *report) const;
|
void reportShort(const ReportPath *report) const override;
|
||||||
virtual void reportFull(const ReportPath *report) const;
|
void reportFull(const ReportPath *report) const override;
|
||||||
virtual const TimingRole *checkRole(const StaState *sta) const;
|
const TimingRole *checkRole(const StaState *sta) const override;
|
||||||
virtual Required requiredTime(const StaState *sta) const;
|
Required requiredTime(const StaState *sta) const override;
|
||||||
virtual Arrival borrow(const StaState *sta) const;
|
Arrival borrow(const StaState *sta) const override;
|
||||||
virtual float targetClkTime(const StaState *sta) const;
|
float targetClkTime(const StaState *sta) const override;
|
||||||
virtual float targetClkOffset(const StaState *sta) const;
|
float targetClkOffset(const StaState *sta) const override;
|
||||||
Arrival targetClkWidth(const StaState *sta) const;
|
Arrival targetClkWidth(const StaState *sta) const;
|
||||||
virtual int exceptPathCmp(const PathEnd *path_end,
|
int exceptPathCmp(const PathEnd *path_end,
|
||||||
const StaState *sta) const;
|
const StaState *sta) const override;
|
||||||
void latchRequired(const StaState *sta,
|
void latchRequired(const StaState *sta,
|
||||||
// Return values.
|
// Return values.
|
||||||
Required &required,
|
Required &required,
|
||||||
|
|
@ -384,7 +385,7 @@ public:
|
||||||
Crpr &crpr_diff,
|
Crpr &crpr_diff,
|
||||||
Delay &max_borrow,
|
Delay &max_borrow,
|
||||||
bool &borrow_limit_exists) const;
|
bool &borrow_limit_exists) const;
|
||||||
virtual bool ignoreClkLatency(const StaState *sta) const;
|
bool ignoreClkLatency(const StaState *sta) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Path *disable_path_;
|
Path *disable_path_;
|
||||||
|
|
@ -404,23 +405,23 @@ public:
|
||||||
Path *clk_path,
|
Path *clk_path,
|
||||||
MultiCyclePath *mcp,
|
MultiCyclePath *mcp,
|
||||||
const StaState *sta);
|
const StaState *sta);
|
||||||
virtual PathEnd *copy() const;
|
PathEnd *copy() const override;
|
||||||
virtual Type type() const;
|
Type type() const override;
|
||||||
virtual const char *typeName() const;
|
const char *typeName() const override;
|
||||||
virtual void reportShort(const ReportPath *report) const;
|
void reportShort(const ReportPath *report) const override;
|
||||||
virtual void reportFull(const ReportPath *report) const;
|
void reportFull(const ReportPath *report) const override;
|
||||||
virtual bool isOutputDelay() const { return true; }
|
bool isOutputDelay() const override { return true; }
|
||||||
virtual ArcDelay margin(const StaState *sta) const;
|
ArcDelay margin(const StaState *sta) const override;
|
||||||
virtual const TimingRole *checkRole(const StaState *sta) const;
|
const TimingRole *checkRole(const StaState *sta) const override;
|
||||||
virtual const ClockEdge *targetClkEdge(const StaState *sta) const;
|
const ClockEdge *targetClkEdge(const StaState *sta) const override;
|
||||||
virtual Arrival targetClkArrivalNoCrpr(const StaState *sta) const;
|
Delay targetClkDelay(const StaState *sta) const override;
|
||||||
virtual Delay targetClkDelay(const StaState *sta) const;
|
Delay targetClkInsertionDelay(const StaState *sta) const override;
|
||||||
virtual Delay targetClkInsertionDelay(const StaState *sta) const;
|
Crpr crpr(const StaState *sta) const override;
|
||||||
virtual Crpr crpr(const StaState *sta) const;
|
int exceptPathCmp(const PathEnd *path_end,
|
||||||
virtual int exceptPathCmp(const PathEnd *path_end,
|
const StaState *sta) const override;
|
||||||
const StaState *sta) const;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Arrival targetClkArrivalNoCrpr(const StaState *sta) const override;
|
||||||
Arrival tgtClkDelay(const ClockEdge *tgt_clk_edge,
|
Arrival tgtClkDelay(const ClockEdge *tgt_clk_edge,
|
||||||
const TimingRole *check_role,
|
const TimingRole *check_role,
|
||||||
const StaState *sta) const;
|
const StaState *sta) const;
|
||||||
|
|
@ -444,16 +445,16 @@ public:
|
||||||
MultiCyclePath *mcp,
|
MultiCyclePath *mcp,
|
||||||
ArcDelay margin,
|
ArcDelay margin,
|
||||||
const StaState *sta);
|
const StaState *sta);
|
||||||
virtual PathEnd *copy() const;
|
PathEnd *copy() const override;
|
||||||
virtual Type type() const;
|
Type type() const override;
|
||||||
virtual const char *typeName() const;
|
const char *typeName() const override;
|
||||||
virtual void reportShort(const ReportPath *report) const;
|
void reportShort(const ReportPath *report) const override;
|
||||||
virtual void reportFull(const ReportPath *report) const;
|
void reportFull(const ReportPath *report) const override;
|
||||||
virtual bool isGatedClock() const { return true; }
|
bool isGatedClock() const override { return true; }
|
||||||
virtual ArcDelay margin(const StaState *) const { return margin_; }
|
ArcDelay margin(const StaState *) const override { return margin_; }
|
||||||
virtual const TimingRole *checkRole(const StaState *sta) const;
|
const TimingRole *checkRole(const StaState *sta) const override;
|
||||||
virtual int exceptPathCmp(const PathEnd *path_end,
|
int exceptPathCmp(const PathEnd *path_end,
|
||||||
const StaState *sta) const;
|
const StaState *sta) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const TimingRole *check_role_;
|
const TimingRole *check_role_;
|
||||||
|
|
@ -468,25 +469,25 @@ public:
|
||||||
Path *data_clk_path,
|
Path *data_clk_path,
|
||||||
MultiCyclePath *mcp,
|
MultiCyclePath *mcp,
|
||||||
const StaState *sta);
|
const StaState *sta);
|
||||||
virtual PathEnd *copy() const;
|
PathEnd *copy() const override;
|
||||||
virtual Type type() const;
|
Type type() const override;
|
||||||
virtual const char *typeName() const;
|
const char *typeName() const override;
|
||||||
virtual void reportShort(const ReportPath *report) const;
|
void reportShort(const ReportPath *report) const override;
|
||||||
virtual void reportFull(const ReportPath *report) const;
|
void reportFull(const ReportPath *report) const override;
|
||||||
virtual bool isDataCheck() const { return true; }
|
bool isDataCheck() const override { return true; }
|
||||||
virtual const ClockEdge *targetClkEdge(const StaState *sta) const;
|
const ClockEdge *targetClkEdge(const StaState *sta) const override;
|
||||||
virtual const TimingRole *checkRole(const StaState *sta) const;
|
const TimingRole *checkRole(const StaState *sta) const override;
|
||||||
virtual ArcDelay margin(const StaState *sta) const;
|
ArcDelay margin(const StaState *sta) const override;
|
||||||
virtual int exceptPathCmp(const PathEnd *path_end,
|
int exceptPathCmp(const PathEnd *path_end,
|
||||||
const StaState *sta) const;
|
const StaState *sta) const override;
|
||||||
virtual const Path *dataClkPath() const { return data_clk_path_; }
|
const Path *dataClkPath() const override { return data_clk_path_; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Path *clkPath(Path *path,
|
Path *clkPath(Path *path,
|
||||||
const StaState *sta);
|
const StaState *sta);
|
||||||
Arrival requiredTimeNoCrpr(const StaState *sta) const;
|
Arrival requiredTimeNoCrpr(const StaState *sta) const override;
|
||||||
// setup uses zero cycle default
|
// setup uses zero cycle default
|
||||||
virtual int setupDefaultCycles() const { return 0; }
|
int setupDefaultCycles() const override { return 0; }
|
||||||
|
|
||||||
Path *data_clk_path_;
|
Path *data_clk_path_;
|
||||||
DataCheck *check_;
|
DataCheck *check_;
|
||||||
|
|
@ -514,29 +515,29 @@ public:
|
||||||
Path *path,
|
Path *path,
|
||||||
OutputDelay *output_delay,
|
OutputDelay *output_delay,
|
||||||
const StaState *sta);
|
const StaState *sta);
|
||||||
virtual PathEnd *copy() const;
|
PathEnd *copy() const override;
|
||||||
virtual Type type() const;
|
Type type() const override;
|
||||||
virtual const char *typeName() const;
|
const char *typeName() const override;
|
||||||
virtual void reportShort(const ReportPath *report) const;
|
void reportShort(const ReportPath *report) const override;
|
||||||
virtual void reportFull(const ReportPath *report) const;
|
void reportFull(const ReportPath *report) const override;
|
||||||
virtual bool isPathDelay() const { return true; }
|
bool isPathDelay() const override { return true; }
|
||||||
virtual const TimingRole *checkRole(const StaState *sta) const;
|
const TimingRole *checkRole(const StaState *sta) const override;
|
||||||
virtual bool pathDelayMarginIsExternal() const;
|
bool pathDelayMarginIsExternal() const override;
|
||||||
virtual PathDelay *pathDelay() const { return path_delay_; }
|
PathDelay *pathDelay() const override { return path_delay_; }
|
||||||
virtual ArcDelay margin(const StaState *sta) const;
|
ArcDelay margin(const StaState *sta) const override;
|
||||||
virtual float sourceClkOffset(const StaState *sta) const;
|
float sourceClkOffset(const StaState *sta) const override;
|
||||||
virtual const ClockEdge *targetClkEdge(const StaState *sta) const;
|
const ClockEdge *targetClkEdge(const StaState *sta) const override;
|
||||||
virtual float targetClkTime(const StaState *sta) const;
|
float targetClkTime(const StaState *sta) const override;
|
||||||
virtual Arrival targetClkArrivalNoCrpr(const StaState *sta) const;
|
float targetClkOffset(const StaState *sta) const override;
|
||||||
virtual float targetClkOffset(const StaState *sta) const;
|
TimingArc *checkArc() const override { return check_arc_; }
|
||||||
virtual TimingArc *checkArc() const { return check_arc_; }
|
Required requiredTime(const StaState *sta) const override;
|
||||||
virtual Required requiredTime(const StaState *sta) const;
|
int exceptPathCmp(const PathEnd *path_end,
|
||||||
virtual int exceptPathCmp(const PathEnd *path_end,
|
const StaState *sta) const override;
|
||||||
const StaState *sta) const;
|
|
||||||
[[nodiscard]] bool hasOutputDelay() const { return output_delay_ != nullptr; }
|
[[nodiscard]] bool hasOutputDelay() const { return output_delay_ != nullptr; }
|
||||||
virtual bool ignoreClkLatency(const StaState *sta) const;
|
bool ignoreClkLatency(const StaState *sta) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Arrival targetClkArrivalNoCrpr(const StaState *sta) const override;
|
||||||
void findSrcClkArrival(const StaState *sta);
|
void findSrcClkArrival(const StaState *sta);
|
||||||
|
|
||||||
PathDelay *path_delay_;
|
PathDelay *path_delay_;
|
||||||
|
|
@ -590,4 +591,4 @@ protected:
|
||||||
const StaState *sta_;
|
const StaState *sta_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -78,4 +78,4 @@ protected:
|
||||||
const StaState *sta_;
|
const StaState *sta_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -52,20 +52,20 @@ class PathGroup
|
||||||
public:
|
public:
|
||||||
// Path group that compares compare slacks.
|
// Path group that compares compare slacks.
|
||||||
static PathGroup *makePathGroupArrival(std::string_view name,
|
static PathGroup *makePathGroupArrival(std::string_view name,
|
||||||
int group_path_count,
|
size_t group_path_count,
|
||||||
int endpoint_path_count,
|
size_t endpoint_path_count,
|
||||||
bool unique_pins,
|
bool unique_pins,
|
||||||
bool unique_edges,
|
bool unique_edges,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
const StaState *sta);
|
const StaState *sta);
|
||||||
// Path group that compares arrival time, sorted by min_max.
|
// Path group that compares arrival time, sorted by min_max.
|
||||||
static PathGroup *makePathGroupSlack(std::string_view name,
|
static PathGroup *makePathGroupSlack(std::string_view name,
|
||||||
int group_path_count,
|
size_t group_path_count,
|
||||||
int endpoint_path_count,
|
size_t endpoint_path_count,
|
||||||
bool unique_pins,
|
bool unique_pins,
|
||||||
bool unique_edges,
|
bool unique_edges,
|
||||||
float min_slack,
|
float slack_min,
|
||||||
float max_slack,
|
float slack_max,
|
||||||
const StaState *sta);
|
const StaState *sta);
|
||||||
~PathGroup();
|
~PathGroup();
|
||||||
const std::string &name() const { return name_; }
|
const std::string &name() const { return name_; }
|
||||||
|
|
@ -77,19 +77,19 @@ public:
|
||||||
// Predicate to determine if a PathEnd is worth saving.
|
// Predicate to determine if a PathEnd is worth saving.
|
||||||
bool saveable(PathEnd *path_end);
|
bool saveable(PathEnd *path_end);
|
||||||
bool enumMinSlackUnderMin(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.
|
// This does NOT delete the path ends.
|
||||||
void clear();
|
void clear();
|
||||||
static int group_path_count_max;
|
static size_t group_path_count_max;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
PathGroup(std::string_view name,
|
PathGroup(std::string_view name,
|
||||||
int group_path_count,
|
size_t group_path_count,
|
||||||
int endpoint_path_count,
|
size_t endpoint_path_count,
|
||||||
bool unique_pins,
|
bool unique_pins,
|
||||||
bool unique_edges,
|
bool unique_edges,
|
||||||
float min_slack,
|
float slack_min,
|
||||||
float max_slack,
|
float slack_max,
|
||||||
bool cmp_slack,
|
bool cmp_slack,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
const StaState *sta);
|
const StaState *sta);
|
||||||
|
|
@ -98,8 +98,8 @@ protected:
|
||||||
void sort();
|
void sort();
|
||||||
|
|
||||||
std::string name_;
|
std::string name_;
|
||||||
int group_path_count_;
|
size_t group_path_count_;
|
||||||
int endpoint_path_count_;
|
size_t endpoint_path_count_;
|
||||||
bool unique_pins_;
|
bool unique_pins_;
|
||||||
bool unique_edges_;
|
bool unique_edges_;
|
||||||
float slack_min_;
|
float slack_min_;
|
||||||
|
|
@ -116,8 +116,8 @@ protected:
|
||||||
class PathGroups : public StaState
|
class PathGroups : public StaState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PathGroups(int group_path_count,
|
PathGroups(size_t group_path_count,
|
||||||
int endpoint_path_count,
|
size_t endpoint_path_count,
|
||||||
bool unique_pins,
|
bool unique_pins,
|
||||||
bool unique_edges,
|
bool unique_edges,
|
||||||
float slack_min,
|
float slack_min,
|
||||||
|
|
@ -131,7 +131,7 @@ public:
|
||||||
bool clk_gating_hold,
|
bool clk_gating_hold,
|
||||||
bool unconstrained,
|
bool unconstrained,
|
||||||
const Mode *mode);
|
const Mode *mode);
|
||||||
~PathGroups();
|
~PathGroups() override;
|
||||||
// Use scene nullptr to make PathEnds for all scenes.
|
// Use scene nullptr to make PathEnds for all scenes.
|
||||||
// The PathEnds in the vector are owned by the PathGroups.
|
// The PathEnds in the vector are owned by the PathGroups.
|
||||||
void makePathEnds(ExceptionTo *to,
|
void makePathEnds(ExceptionTo *to,
|
||||||
|
|
@ -155,8 +155,8 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void makeGroupPathEnds(ExceptionTo *to,
|
void makeGroupPathEnds(ExceptionTo *to,
|
||||||
int group_path_count,
|
size_t group_path_count,
|
||||||
int endpoint_path_count,
|
size_t endpoint_path_count,
|
||||||
bool unique_pins,
|
bool unique_pins,
|
||||||
bool unique_edges,
|
bool unique_edges,
|
||||||
const SceneSeq &scenes,
|
const SceneSeq &scenes,
|
||||||
|
|
@ -170,8 +170,8 @@ protected:
|
||||||
const MinMaxAll *min_max,
|
const MinMaxAll *min_max,
|
||||||
PathEndVisitor *visitor);
|
PathEndVisitor *visitor);
|
||||||
void enumPathEnds(PathGroup *group,
|
void enumPathEnds(PathGroup *group,
|
||||||
int group_path_count,
|
size_t group_path_count,
|
||||||
int endpoint_path_count,
|
size_t endpoint_path_count,
|
||||||
bool unique_pins,
|
bool unique_pins,
|
||||||
bool unique_edges,
|
bool unique_edges,
|
||||||
bool cmp_slack);
|
bool cmp_slack);
|
||||||
|
|
@ -180,8 +180,8 @@ protected:
|
||||||
void pushUnconstrainedPathEnds(PathEndSeq &path_ends,
|
void pushUnconstrainedPathEnds(PathEndSeq &path_ends,
|
||||||
const MinMaxAll *min_max);
|
const MinMaxAll *min_max);
|
||||||
|
|
||||||
void makeGroups(int group_path_count,
|
void makeGroups(size_t group_path_count,
|
||||||
int endpoint_path_count,
|
size_t endpoint_path_count,
|
||||||
bool unique_pins,
|
bool unique_pins,
|
||||||
bool unique_edges,
|
bool unique_edges,
|
||||||
float slack_min,
|
float slack_min,
|
||||||
|
|
@ -199,8 +199,8 @@ protected:
|
||||||
StringSeq pathGroupNames();
|
StringSeq pathGroupNames();
|
||||||
|
|
||||||
const Mode *mode_;
|
const Mode *mode_;
|
||||||
int group_path_count_;
|
size_t group_path_count_;
|
||||||
int endpoint_path_count_;
|
size_t endpoint_path_count_;
|
||||||
bool unique_pins_;
|
bool unique_pins_;
|
||||||
bool unique_edges_;
|
bool unique_edges_;
|
||||||
float slack_min_;
|
float slack_min_;
|
||||||
|
|
@ -226,4 +226,4 @@ protected:
|
||||||
static constexpr std::string_view unconstrained_group_name_ = "unconstrained";
|
static constexpr std::string_view unconstrained_group_name_ = "unconstrained";
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
|
|
@ -77,8 +77,8 @@ class RegexpCompileError : public Exception
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RegexpCompileError(std::string_view pattern);
|
RegexpCompileError(std::string_view pattern);
|
||||||
virtual ~RegexpCompileError() noexcept {}
|
~RegexpCompileError() noexcept override = default;
|
||||||
virtual const char *what() const noexcept;
|
const char *what() const noexcept override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string error_;
|
std::string error_;
|
||||||
|
|
@ -98,4 +98,4 @@ patternMatchNoCase(std::string_view pattern,
|
||||||
bool
|
bool
|
||||||
patternWildcards(std::string_view pattern);
|
patternWildcards(std::string_view pattern);
|
||||||
|
|
||||||
} // namespace
|
} // namespace sta
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue