2018-09-28 17:54:21 +02:00
|
|
|
// OpenSTA, Static Timing Analyzer
|
2024-01-12 01:34:49 +01:00
|
|
|
// Copyright (c) 2024, Parallax Software, Inc.
|
2018-09-28 17:54:21 +02:00
|
|
|
//
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2022-01-04 18:17:08 +01:00
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2018-09-28 17:54:21 +02:00
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
//
|
|
|
|
|
// You should have received a copy of the GNU General Public License
|
2022-01-04 18:17:08 +01:00
|
|
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2018-09-28 17:54:21 +02:00
|
|
|
|
2020-04-05 23:53:44 +02:00
|
|
|
#include "UnitDelayCalc.hh"
|
2020-04-05 20:35:51 +02:00
|
|
|
|
2020-04-05 23:53:44 +02:00
|
|
|
#include "Units.hh"
|
2018-09-28 17:54:21 +02:00
|
|
|
|
|
|
|
|
namespace sta {
|
|
|
|
|
|
|
|
|
|
ArcDelayCalc *
|
|
|
|
|
makeUnitDelayCalc(StaState *sta)
|
|
|
|
|
{
|
|
|
|
|
return new UnitDelayCalc(sta);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UnitDelayCalc::UnitDelayCalc(StaState *sta) :
|
|
|
|
|
ArcDelayCalc(sta)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ArcDelayCalc *
|
|
|
|
|
UnitDelayCalc::copy()
|
|
|
|
|
{
|
|
|
|
|
return new UnitDelayCalc(this);
|
|
|
|
|
}
|
|
|
|
|
|
2019-04-11 05:36:48 +02:00
|
|
|
Parasitic *
|
2018-09-28 17:54:21 +02:00
|
|
|
UnitDelayCalc::findParasitic(const Pin *,
|
2019-11-11 23:30:19 +01:00
|
|
|
const RiseFall *,
|
2019-04-11 05:36:48 +02:00
|
|
|
const DcalcAnalysisPt *)
|
2018-09-28 17:54:21 +02:00
|
|
|
{
|
2019-04-11 05:36:48 +02:00
|
|
|
return nullptr;
|
2018-09-28 17:54:21 +02:00
|
|
|
}
|
|
|
|
|
|
2024-02-08 21:54:52 +01:00
|
|
|
Parasitic *
|
|
|
|
|
UnitDelayCalc::reduceParasitic(const Parasitic *,
|
|
|
|
|
const Pin *,
|
|
|
|
|
const RiseFall *,
|
|
|
|
|
const DcalcAnalysisPt *)
|
|
|
|
|
{
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
UnitDelayCalc::reduceParasitic(const Parasitic *,
|
|
|
|
|
const Net *,
|
|
|
|
|
const Corner *,
|
|
|
|
|
const MinMaxAll *)
|
2024-01-28 05:34:38 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2024-06-27 22:57:58 +02:00
|
|
|
void
|
|
|
|
|
UnitDelayCalc::setDcalcArgParasiticSlew(ArcDcalcArg &,
|
|
|
|
|
const DcalcAnalysisPt *)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
UnitDelayCalc::setDcalcArgParasiticSlew(ArcDcalcArgSeq &,
|
|
|
|
|
const DcalcAnalysisPt *)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-07 21:44:04 +01:00
|
|
|
ArcDcalcResult
|
2018-09-28 17:54:21 +02:00
|
|
|
UnitDelayCalc::inputPortDelay(const Pin *,
|
|
|
|
|
float,
|
2019-11-11 23:30:19 +01:00
|
|
|
const RiseFall *,
|
2023-01-19 19:23:45 +01:00
|
|
|
const Parasitic *,
|
2024-01-07 21:44:04 +01:00
|
|
|
const LoadPinIndexMap &load_pin_index_map,
|
|
|
|
|
const DcalcAnalysisPt *)
|
2018-09-28 17:54:21 +02:00
|
|
|
{
|
2024-01-07 21:44:04 +01:00
|
|
|
return unitDelayResult(load_pin_index_map);
|
2018-09-28 17:54:21 +02:00
|
|
|
}
|
|
|
|
|
|
2024-01-07 21:44:04 +01:00
|
|
|
ArcDcalcResult
|
|
|
|
|
UnitDelayCalc::gateDelay(const Pin *,
|
|
|
|
|
const TimingArc *,
|
2018-09-28 17:54:21 +02:00
|
|
|
const Slew &,
|
|
|
|
|
float,
|
2023-01-19 19:23:45 +01:00
|
|
|
const Parasitic *,
|
2024-01-07 21:44:04 +01:00
|
|
|
const LoadPinIndexMap &load_pin_index_map,
|
|
|
|
|
const DcalcAnalysisPt *)
|
2018-09-28 17:54:21 +02:00
|
|
|
{
|
2024-01-07 21:44:04 +01:00
|
|
|
return unitDelayResult(load_pin_index_map);
|
2018-09-28 17:54:21 +02:00
|
|
|
}
|
|
|
|
|
|
2024-01-07 21:44:04 +01:00
|
|
|
ArcDcalcResultSeq
|
|
|
|
|
UnitDelayCalc::gateDelays(ArcDcalcArgSeq &dcalc_args,
|
|
|
|
|
const LoadPinIndexMap &load_pin_index_map,
|
|
|
|
|
const DcalcAnalysisPt *)
|
2023-11-19 18:04:45 +01:00
|
|
|
{
|
2024-01-07 21:44:04 +01:00
|
|
|
size_t drvr_count = dcalc_args.size();
|
|
|
|
|
ArcDcalcResultSeq dcalc_results(drvr_count);
|
|
|
|
|
for (size_t drvr_idx = 0; drvr_idx < drvr_count; drvr_idx++) {
|
|
|
|
|
ArcDcalcResult &dcalc_result = dcalc_results[drvr_idx];
|
|
|
|
|
dcalc_result = unitDelayResult(load_pin_index_map);
|
|
|
|
|
}
|
|
|
|
|
return dcalc_results;
|
2023-11-19 18:04:45 +01:00
|
|
|
}
|
|
|
|
|
|
2024-01-07 21:44:04 +01:00
|
|
|
ArcDcalcResult
|
|
|
|
|
UnitDelayCalc::unitDelayResult(const LoadPinIndexMap &load_pin_index_map)
|
2023-11-19 18:04:45 +01:00
|
|
|
{
|
2024-01-07 21:44:04 +01:00
|
|
|
size_t load_count = load_pin_index_map.size();
|
|
|
|
|
ArcDcalcResult dcalc_result(load_count);
|
|
|
|
|
dcalc_result.setGateDelay(units_->timeUnit()->scale());
|
|
|
|
|
dcalc_result.setDrvrSlew(0.0);
|
|
|
|
|
for (size_t load_idx = 0; load_idx < load_count; load_idx++) {
|
|
|
|
|
dcalc_result.setWireDelay(load_idx, 0.0);
|
|
|
|
|
dcalc_result.setLoadSlew(load_idx, 0.0);
|
|
|
|
|
}
|
|
|
|
|
return dcalc_result;
|
2018-11-26 18:15:52 +01:00
|
|
|
}
|
|
|
|
|
|
2023-03-24 23:15:57 +01:00
|
|
|
string
|
2024-01-07 21:44:04 +01:00
|
|
|
UnitDelayCalc::reportGateDelay(const Pin *,
|
|
|
|
|
const TimingArc *,
|
2018-09-28 17:54:21 +02:00
|
|
|
const Slew &,
|
|
|
|
|
float,
|
2023-01-19 19:23:45 +01:00
|
|
|
const Parasitic *,
|
2024-01-07 21:44:04 +01:00
|
|
|
const LoadPinIndexMap &,
|
2018-09-28 17:54:21 +02:00
|
|
|
const DcalcAnalysisPt *,
|
2023-03-24 23:15:57 +01:00
|
|
|
int)
|
2018-09-28 17:54:21 +02:00
|
|
|
{
|
2023-03-24 23:15:57 +01:00
|
|
|
string result("Delay = 1.0\n");
|
|
|
|
|
result += "Slew = 0.0\n";
|
|
|
|
|
return result;
|
2018-09-28 17:54:21 +02:00
|
|
|
}
|
|
|
|
|
|
2024-01-07 21:44:04 +01:00
|
|
|
ArcDelay
|
|
|
|
|
UnitDelayCalc::checkDelay(const Pin *,
|
|
|
|
|
const TimingArc *,
|
2018-09-28 17:54:21 +02:00
|
|
|
const Slew &,
|
|
|
|
|
const Slew &,
|
|
|
|
|
float,
|
2024-01-07 21:44:04 +01:00
|
|
|
const DcalcAnalysisPt *)
|
2018-09-28 17:54:21 +02:00
|
|
|
{
|
2024-01-07 21:44:04 +01:00
|
|
|
return units_->timeUnit()->scale();
|
2018-09-28 17:54:21 +02:00
|
|
|
}
|
|
|
|
|
|
2023-03-24 23:15:57 +01:00
|
|
|
string
|
2024-01-07 21:44:04 +01:00
|
|
|
UnitDelayCalc::reportCheckDelay(const Pin *,
|
|
|
|
|
const TimingArc *,
|
2018-09-28 17:54:21 +02:00
|
|
|
const Slew &,
|
|
|
|
|
const char *,
|
|
|
|
|
const Slew &,
|
|
|
|
|
float,
|
|
|
|
|
const DcalcAnalysisPt *,
|
2023-03-24 23:15:57 +01:00
|
|
|
int)
|
2018-09-28 17:54:21 +02:00
|
|
|
{
|
2023-03-24 23:15:57 +01:00
|
|
|
return "Check = 1.0\n";
|
2018-09-28 17:54:21 +02:00
|
|
|
}
|
|
|
|
|
|
2019-04-11 05:36:48 +02:00
|
|
|
void
|
|
|
|
|
UnitDelayCalc::finishDrvrPin()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-28 17:54:21 +02:00
|
|
|
} // namespace
|