OpenSTA/liberty/FuncExpr.cc

427 lines
9.8 KiB
C++
Raw Normal View History

2018-09-28 17:54:21 +02:00
// OpenSTA, Static Timing Analyzer
// Copyright (c) 2025, 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
// 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
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//
// The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software.
//
// Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
//
// This notice may not be removed or altered from any source distribution.
2018-09-28 17:54:21 +02:00
2020-04-05 23:53:44 +02:00
#include "FuncExpr.hh"
2020-04-05 20:35:51 +02:00
2020-04-05 23:53:44 +02:00
#include "StringUtil.hh"
#include "Liberty.hh"
#include "Network.hh"
2018-09-28 17:54:21 +02:00
namespace sta {
FuncExpr *
FuncExpr::makePort(LibertyPort *port)
{
2019-03-13 01:25:53 +01:00
return new FuncExpr(op_port, nullptr, nullptr, port);
2018-09-28 17:54:21 +02:00
}
FuncExpr *
FuncExpr::makeNot(FuncExpr *expr)
{
2019-03-13 01:25:53 +01:00
return new FuncExpr(op_not, expr, nullptr, nullptr);
2018-09-28 17:54:21 +02:00
}
FuncExpr *
FuncExpr::makeAnd(FuncExpr *left,
FuncExpr *right)
{
2019-03-13 01:25:53 +01:00
return new FuncExpr(op_and, left, right, nullptr);
2018-09-28 17:54:21 +02:00
}
FuncExpr *
FuncExpr::makeOr(FuncExpr *left,
FuncExpr *right)
{
2019-03-13 01:25:53 +01:00
return new FuncExpr(op_or, left, right, nullptr);
2018-09-28 17:54:21 +02:00
}
FuncExpr *
FuncExpr::makeXor(FuncExpr *left,
FuncExpr *right)
{
2019-03-13 01:25:53 +01:00
return new FuncExpr(op_xor, left, right, nullptr);
2018-09-28 17:54:21 +02:00
}
FuncExpr *
FuncExpr::makeZero()
{
2019-03-13 01:25:53 +01:00
return new FuncExpr(op_zero, nullptr, nullptr, nullptr);
2018-09-28 17:54:21 +02:00
}
FuncExpr *
FuncExpr::makeOne()
{
2019-03-13 01:25:53 +01:00
return new FuncExpr(op_one, nullptr, nullptr, nullptr);
2018-09-28 17:54:21 +02:00
}
FuncExpr::FuncExpr(Operator op,
FuncExpr *left,
FuncExpr *right,
LibertyPort *port) :
op_(op),
left_(left),
right_(right),
port_(port)
{
}
void
FuncExpr::deleteSubexprs()
{
if (left_)
left_->deleteSubexprs();
if (right_)
right_->deleteSubexprs();
delete this;
}
2019-05-20 01:06:06 +02:00
FuncExpr *
FuncExpr::copy()
{
FuncExpr *left = left_ ? left_->copy() : nullptr;
FuncExpr *right = right_ ? right_->copy() : nullptr;
return new FuncExpr(op_, left, right, port_);
}
2018-09-28 17:54:21 +02:00
LibertyPort *
FuncExpr::port() const
{
if (op_ == op_port)
return port_;
else
2019-03-13 01:25:53 +01:00
return nullptr;
2018-09-28 17:54:21 +02:00
}
// Protect against null sub-expressions caused by unknown port refs.
TimingSense
FuncExpr::portTimingSense(const LibertyPort *port) const
{
TimingSense left_sense, right_sense;
switch (op_) {
case op_port:
if (port == port_)
2019-03-13 01:25:53 +01:00
return TimingSense::positive_unate;
2018-09-28 17:54:21 +02:00
else
2019-03-13 01:25:53 +01:00
return TimingSense::none;
2018-09-28 17:54:21 +02:00
case op_not:
if (left_) {
switch (left_->portTimingSense(port)) {
2019-03-13 01:25:53 +01:00
case TimingSense::positive_unate:
return TimingSense::negative_unate;
case TimingSense::negative_unate:
return TimingSense::positive_unate;
case TimingSense::non_unate:
return TimingSense::non_unate;
case TimingSense::none:
return TimingSense::none;
case TimingSense::unknown:
return TimingSense::unknown;
2018-09-28 17:54:21 +02:00
}
}
2019-03-13 01:25:53 +01:00
return TimingSense::unknown;
2018-09-28 17:54:21 +02:00
case op_or:
case op_and:
2019-03-13 01:25:53 +01:00
left_sense = TimingSense::unknown;
right_sense = TimingSense::unknown;
2018-09-28 17:54:21 +02:00
if (left_)
left_sense = left_->portTimingSense(port);
if (right_)
right_sense = right_->portTimingSense(port);
if (left_sense == right_sense)
return left_sense;
2019-03-13 01:25:53 +01:00
else if (left_sense == TimingSense::non_unate
|| right_sense == TimingSense::non_unate
|| (left_sense == TimingSense::positive_unate
&& right_sense == TimingSense::negative_unate)
|| (left_sense == TimingSense::negative_unate
&& right_sense == TimingSense::positive_unate))
return TimingSense::non_unate;
else if (left_sense == TimingSense::none
|| left_sense == TimingSense::unknown)
2018-09-28 17:54:21 +02:00
return right_sense;
2019-03-13 01:25:53 +01:00
else if (right_sense == TimingSense::none
|| right_sense == TimingSense::unknown)
2018-09-28 17:54:21 +02:00
return left_sense;
else
2019-03-13 01:25:53 +01:00
return TimingSense::unknown;
2018-09-28 17:54:21 +02:00
case op_xor:
2019-03-13 01:25:53 +01:00
left_sense = TimingSense::unknown;
right_sense = TimingSense::unknown;
2018-09-28 17:54:21 +02:00
if (left_)
left_sense = left_->portTimingSense(port);
if (right_)
right_sense = right_->portTimingSense(port);
2019-03-13 01:25:53 +01:00
if (left_sense == TimingSense::positive_unate
|| left_sense == TimingSense::negative_unate
|| left_sense == TimingSense::non_unate
|| right_sense == TimingSense::positive_unate
|| right_sense == TimingSense::negative_unate
|| right_sense == TimingSense::non_unate)
return TimingSense::non_unate;
2018-09-28 17:54:21 +02:00
else
2019-03-13 01:25:53 +01:00
return TimingSense::unknown;
2018-09-28 17:54:21 +02:00
case op_one:
2019-03-13 01:25:53 +01:00
return TimingSense::none;
2018-09-28 17:54:21 +02:00
case op_zero:
2019-03-13 01:25:53 +01:00
return TimingSense::none;
2018-09-28 17:54:21 +02:00
}
// Prevent warnings from lame compilers.
2019-03-13 01:25:53 +01:00
return TimingSense::unknown;
2018-09-28 17:54:21 +02:00
}
const char *
FuncExpr::asString() const
{
return asString(false);
}
const char *
FuncExpr::asString(bool with_parens) const
{
switch (op_) {
case op_port:
return port_->name();
case op_not: {
const char *left = left_->asString(true);
size_t left_length = strlen(left);
size_t length = left_length + 2;
char *result = makeTmpString(length);
char *ptr = result;
*ptr++ = '!';
strcpy(ptr, left);
return result;
}
case op_or:
return asStringSubexpr(with_parens, '+');
case op_and:
return asStringSubexpr(with_parens, '*');
case op_xor:
return asStringSubexpr(with_parens, '^');
case op_one:
return "1";
case op_zero:
return "0";
default:
return "?";
}
}
const char *
FuncExpr::asStringSubexpr(bool with_parens,
char op) const
{
const char *left = left_->asString(true);
const char *right = right_->asString(true);
size_t length = strlen(left) + 1 + strlen(right) + 1;
if (with_parens)
length += 2;
char *result = makeTmpString(length);
char *r = result;
if (with_parens)
*r++= '(';
stringAppend(r, left);
*r++ = op;
stringAppend(r, right);
if (with_parens)
*r++ = ')';
*r = '\0';
return result;
}
FuncExpr *
FuncExpr::bitSubExpr(int bit_offset)
{
switch (op_) {
case op_port:
if (port_->hasMembers()) {
if (port_->size() == 1) {
LibertyPort *port = port_->findLibertyMember(0);
return makePort(port);
}
else {
LibertyPort *port = port_->findLibertyMember(bit_offset);
return makePort(port);
}
}
else
// Always copy so the subexpr doesn't share memory.
return makePort(port_);
case op_not:
return makeNot(left_->bitSubExpr(bit_offset));
case op_or:
return makeOr(left_->bitSubExpr(bit_offset),
right_->bitSubExpr(bit_offset));
case op_and:
return makeAnd(left_->bitSubExpr(bit_offset),
right_->bitSubExpr(bit_offset));
case op_xor:
return makeXor(left_->bitSubExpr(bit_offset),
right_->bitSubExpr(bit_offset));
case op_one:
case op_zero:
return this;
}
// Prevent warnings from lame compilers.
2019-03-13 01:25:53 +01:00
return nullptr;
2018-09-28 17:54:21 +02:00
}
bool
FuncExpr::hasPort(const LibertyPort *port) const
{
switch (op_) {
case op_port:
return (port_ == port);
case op_not:
return left_ && left_->hasPort(port);
case op_or:
case op_and:
case op_xor:
return (left_ && left_->hasPort(port))
|| (right_ && right_->hasPort(port));
case op_one:
case op_zero:
return false;
}
// Prevent warnings from lame compilers.
return false;
}
bool
FuncExpr::checkSize(LibertyPort *port)
{
return checkSize(port->size());
}
bool
FuncExpr::checkSize(size_t size)
{
size_t port_size;
switch (op_) {
case op_port:
port_size = port_->size();
return !(port_size == size
|| port_size == 1);
case op_not:
return left_->checkSize(size);
case op_or:
case op_and:
case op_xor:
return left_->checkSize(size) || right_->checkSize(size);
case op_one:
case op_zero:
return false;
}
// Prevent warnings from lame compilers.
return false;
}
FuncExpr *
funcExprNot(FuncExpr *expr)
{
if (expr->op() == FuncExpr::op_not) {
FuncExpr *not_expr = expr->left();
delete expr;
return not_expr;
}
else
return FuncExpr::makeNot(expr);
}
////////////////////////////////////////////////////////////////
ccs ceff delay calc commit 87130be63ddbf1a7fb65986b02839eb4c0b13168 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 27 09:49:02 2024 -0700 ccs ceff delay calc Signed-off-by: James Cherry <cherry@parallaxsw.com> commit de0dd38dabda2f7ef51b49c196c2787a0d3c5784 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 27 07:40:11 2024 -0700 dcalc public funcs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit dd7fcb12f929b9b0a391653cad42e617f9cbdd3b Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 26 09:08:37 2024 -0700 mv CircuitSim.hh to include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 9663e46d28ece544ee1453f229990c9db9e0efec Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 17:58:57 2024 -0700 ArcDcalcArg Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 76b0588034faaefd2302c865c441975f76386d3f Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 15:36:46 2024 -0700 ensureVoltageWaveforms Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f88e67b861c56752e5b36efe2b552ba0077a7180 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 15:00:02 2024 -0700 const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8f32cc571dcadee0185b08f951a1f79d46e7984d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 14:57:51 2024 -0700 Graph::gateEdgeArc Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ac3cb35cb6732d7ecbf0532d7351a3ff2a917fc9 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 14:31:30 2024 -0700 ConcreteParasiticSubNodeMap, ConcreteParasiticPinNodeMap use id cmp Signed-off-by: James Cherry <cherry@parallaxsw.com> commit cbfe4eac463036c26a64701239d7651d91a09778 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 14:08:41 2024 -0700 WriteSpice Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8b5d30f1a8b1ccb8c9cbd9d7ba93418907c41b2a Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 24 09:45:46 2024 -0700 emplace_push Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 5335a2eaaf737ed7c7a8cff30654a68c4ac4c8e4 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 23 16:19:30 2024 -0700 Parasitics::findParasiticNode Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ce92f3caf28afb0e0384799f08166cfb0aecfea0 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 23 15:53:28 2024 -0700 Parasitics::findParasiticNode Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 0c591430c725a3ebd50d2892673dca76e023dc32 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 23 09:03:18 2024 -0700 Parsitics::name(node) const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 499c297e64d1487388f549843ff9ea05e8555cfc Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 23 09:03:07 2024 -0700 write_spice umr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 6984c398dbce9e6266fab8377a844bc518481d9d Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 22 18:42:34 2024 -0700 gcc warning Signed-off-by: James Cherry <cherry@parallaxsw.com> commit edec16519806013623194d8201e804dec81a51dd Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 22 17:54:11 2024 -0700 no cuddification Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 4a0e1070c179b2f8615b604c362359ce4b3a0e2e Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 22 17:29:46 2024 -0700 sim const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 2e941fafa631f6b9bc0f82784b9146de2449e9c5 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 22 17:29:39 2024 -0700 sdc comment Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1c12f56aee7115fcb06807b5b6c626d1a419ccdc Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 21 13:13:29 2024 -0700 Sim use Bdd class Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b70c41d5caec56c3001b834141b6dab89bb933ed Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 20 12:18:27 2024 -0700 write_spice coupling caps Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 614d2cd41a1a9cf850dbe480954a5f58ee0dc21e Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 19 14:37:30 2024 -0700 write_spice time offset Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f0ba1fca0dfca384e6fb0be302bba9ced71ee41c Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 19 10:59:18 2024 -0700 class Bdd for cudd Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 24c94756334fce5e70e97ce0ee31375ae4e59b84 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 18 08:58:30 2024 -0700 WriteSpice Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 47a4505d88bdfe4a85056895f8b7d842e07dce8d Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 16 21:34:23 2024 -0700 default sim ngspice Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 06e279555a076e218f0a9c308e8937a6fc8fdea4 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 16 21:34:01 2024 -0700 WriteSpice refactor Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 06e3f0734edbbbd69ad063e97d1d8cca92a83aea Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 15 15:18:35 2024 -0700 mv report_dcalc to DelayCalc.tcl Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 922056471a6d380699bbd0623f95637401d23eff Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 15 14:27:31 2024 -0700 WriteSpice::cell_spice_port_names_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 732922ead68097e3f7da268ecc5ae2ca2daa4492 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 15 13:35:13 2024 -0700 WritePathSpice.hh Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8cd6e2ffc6ad66e831630273b5eacd192259191e Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 15 10:11:39 2024 -0700 small Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f7f6bfb49f43ddc3e45c294f89c8814d60df5220 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 15 09:48:09 2024 -0700 refactor WritePathSpice Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f74db730c3e8c67a24d531266510e4376db463d3 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 14 09:22:01 2024 -0700 Sta.hh Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 051532deef203cae97e32e8af7a2348bfd8912cc Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 14 08:14:44 2024 -0700 PowerClass.hh Signed-off-by: James Cherry <cherry@parallaxsw.com> commit bfb8357d1093e5d3da14e708acd21fc21ba3b0dd Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 14 08:08:56 2024 -0700 doc Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8fe28ec91b234d9d8210019aa46a2e8107aa497a Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 14 07:32:34 2024 -0700 ClkSkew use seq instead of set Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4e3a3a0315ab4f6160a707e838423bb734f5363 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 13 19:26:45 2024 -0700 report_clock_latency Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 51fb6657d9706c7443e1c269cfe63cf080b05d50 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 13 11:10:11 2024 -0700 report_clock_latency Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e639ee129d13e1c11b34bca0762b8136b18563f3 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 12 11:19:06 2024 -0700 ClkSkew use map Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e91d3ea8142a73b7b607dfdf53b3fce8e2f16984 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 12 10:18:27 2024 -0700 report_clock_skew report format Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c650b7ec63b83382ba9cec7d187ffee8a031c2ce Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 12 09:22:29 2024 -0700 report_clock_skew include macro clock_tree_path_delay Signed-off-by: James Cherry <cherry@parallaxsw.com> commit cf14b230a9944b95ba43ef7c09e553d9014990eb Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 11 11:03:29 2024 -0700 clk skew range iter Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e7e0342e063ac876d00d03fd1ff0eab1715cfde4 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 11 08:11:29 2024 -0700 write_spice sensitize and3 Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 743ceb676c763ac5bcbf05e630a4da1b507c537d Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 10 18:07:04 2024 -0700 write spice Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2024-02-27 18:00:48 +01:00
FuncExprPortIterator::FuncExprPortIterator(const FuncExpr *expr)
2018-09-28 17:54:21 +02:00
{
findPorts(expr);
iter_.init(ports_);
}
void
ccs ceff delay calc commit 87130be63ddbf1a7fb65986b02839eb4c0b13168 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 27 09:49:02 2024 -0700 ccs ceff delay calc Signed-off-by: James Cherry <cherry@parallaxsw.com> commit de0dd38dabda2f7ef51b49c196c2787a0d3c5784 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 27 07:40:11 2024 -0700 dcalc public funcs Signed-off-by: James Cherry <cherry@parallaxsw.com> commit dd7fcb12f929b9b0a391653cad42e617f9cbdd3b Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 26 09:08:37 2024 -0700 mv CircuitSim.hh to include Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 9663e46d28ece544ee1453f229990c9db9e0efec Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 17:58:57 2024 -0700 ArcDcalcArg Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 76b0588034faaefd2302c865c441975f76386d3f Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 15:36:46 2024 -0700 ensureVoltageWaveforms Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f88e67b861c56752e5b36efe2b552ba0077a7180 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 15:00:02 2024 -0700 const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8f32cc571dcadee0185b08f951a1f79d46e7984d Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 14:57:51 2024 -0700 Graph::gateEdgeArc Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ac3cb35cb6732d7ecbf0532d7351a3ff2a917fc9 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 14:31:30 2024 -0700 ConcreteParasiticSubNodeMap, ConcreteParasiticPinNodeMap use id cmp Signed-off-by: James Cherry <cherry@parallaxsw.com> commit cbfe4eac463036c26a64701239d7651d91a09778 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 25 14:08:41 2024 -0700 WriteSpice Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8b5d30f1a8b1ccb8c9cbd9d7ba93418907c41b2a Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 24 09:45:46 2024 -0700 emplace_push Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 5335a2eaaf737ed7c7a8cff30654a68c4ac4c8e4 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 23 16:19:30 2024 -0700 Parasitics::findParasiticNode Signed-off-by: James Cherry <cherry@parallaxsw.com> commit ce92f3caf28afb0e0384799f08166cfb0aecfea0 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 23 15:53:28 2024 -0700 Parasitics::findParasiticNode Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 0c591430c725a3ebd50d2892673dca76e023dc32 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 23 09:03:18 2024 -0700 Parsitics::name(node) const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 499c297e64d1487388f549843ff9ea05e8555cfc Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 23 09:03:07 2024 -0700 write_spice umr Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 6984c398dbce9e6266fab8377a844bc518481d9d Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 22 18:42:34 2024 -0700 gcc warning Signed-off-by: James Cherry <cherry@parallaxsw.com> commit edec16519806013623194d8201e804dec81a51dd Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 22 17:54:11 2024 -0700 no cuddification Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 4a0e1070c179b2f8615b604c362359ce4b3a0e2e Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 22 17:29:46 2024 -0700 sim const Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 2e941fafa631f6b9bc0f82784b9146de2449e9c5 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 22 17:29:39 2024 -0700 sdc comment Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 1c12f56aee7115fcb06807b5b6c626d1a419ccdc Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 21 13:13:29 2024 -0700 Sim use Bdd class Signed-off-by: James Cherry <cherry@parallaxsw.com> commit b70c41d5caec56c3001b834141b6dab89bb933ed Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 20 12:18:27 2024 -0700 write_spice coupling caps Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 614d2cd41a1a9cf850dbe480954a5f58ee0dc21e Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 19 14:37:30 2024 -0700 write_spice time offset Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f0ba1fca0dfca384e6fb0be302bba9ced71ee41c Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 19 10:59:18 2024 -0700 class Bdd for cudd Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 24c94756334fce5e70e97ce0ee31375ae4e59b84 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 18 08:58:30 2024 -0700 WriteSpice Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 47a4505d88bdfe4a85056895f8b7d842e07dce8d Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 16 21:34:23 2024 -0700 default sim ngspice Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 06e279555a076e218f0a9c308e8937a6fc8fdea4 Author: James Cherry <cherry@parallaxsw.com> Date: Fri Feb 16 21:34:01 2024 -0700 WriteSpice refactor Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 06e3f0734edbbbd69ad063e97d1d8cca92a83aea Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 15 15:18:35 2024 -0700 mv report_dcalc to DelayCalc.tcl Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 922056471a6d380699bbd0623f95637401d23eff Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 15 14:27:31 2024 -0700 WriteSpice::cell_spice_port_names_ Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 732922ead68097e3f7da268ecc5ae2ca2daa4492 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 15 13:35:13 2024 -0700 WritePathSpice.hh Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8cd6e2ffc6ad66e831630273b5eacd192259191e Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 15 10:11:39 2024 -0700 small Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f7f6bfb49f43ddc3e45c294f89c8814d60df5220 Author: James Cherry <cherry@parallaxsw.com> Date: Thu Feb 15 09:48:09 2024 -0700 refactor WritePathSpice Signed-off-by: James Cherry <cherry@parallaxsw.com> commit f74db730c3e8c67a24d531266510e4376db463d3 Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 14 09:22:01 2024 -0700 Sta.hh Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 051532deef203cae97e32e8af7a2348bfd8912cc Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 14 08:14:44 2024 -0700 PowerClass.hh Signed-off-by: James Cherry <cherry@parallaxsw.com> commit bfb8357d1093e5d3da14e708acd21fc21ba3b0dd Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 14 08:08:56 2024 -0700 doc Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 8fe28ec91b234d9d8210019aa46a2e8107aa497a Author: James Cherry <cherry@parallaxsw.com> Date: Wed Feb 14 07:32:34 2024 -0700 ClkSkew use seq instead of set Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c4e3a3a0315ab4f6160a707e838423bb734f5363 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 13 19:26:45 2024 -0700 report_clock_latency Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 51fb6657d9706c7443e1c269cfe63cf080b05d50 Author: James Cherry <cherry@parallaxsw.com> Date: Tue Feb 13 11:10:11 2024 -0700 report_clock_latency Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e639ee129d13e1c11b34bca0762b8136b18563f3 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 12 11:19:06 2024 -0700 ClkSkew use map Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e91d3ea8142a73b7b607dfdf53b3fce8e2f16984 Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 12 10:18:27 2024 -0700 report_clock_skew report format Signed-off-by: James Cherry <cherry@parallaxsw.com> commit c650b7ec63b83382ba9cec7d187ffee8a031c2ce Author: James Cherry <cherry@parallaxsw.com> Date: Mon Feb 12 09:22:29 2024 -0700 report_clock_skew include macro clock_tree_path_delay Signed-off-by: James Cherry <cherry@parallaxsw.com> commit cf14b230a9944b95ba43ef7c09e553d9014990eb Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 11 11:03:29 2024 -0700 clk skew range iter Signed-off-by: James Cherry <cherry@parallaxsw.com> commit e7e0342e063ac876d00d03fd1ff0eab1715cfde4 Author: James Cherry <cherry@parallaxsw.com> Date: Sun Feb 11 08:11:29 2024 -0700 write_spice sensitize and3 Signed-off-by: James Cherry <cherry@parallaxsw.com> commit 743ceb676c763ac5bcbf05e630a4da1b507c537d Author: James Cherry <cherry@parallaxsw.com> Date: Sat Feb 10 18:07:04 2024 -0700 write spice Signed-off-by: James Cherry <cherry@parallaxsw.com> Signed-off-by: James Cherry <cherry@parallaxsw.com>
2024-02-27 18:00:48 +01:00
FuncExprPortIterator::findPorts(const FuncExpr *expr)
2018-09-28 17:54:21 +02:00
{
if (expr) {
if (expr->op() == FuncExpr::op_port)
ports_.insert(expr->port());
else {
findPorts(expr->left());
findPorts(expr->right());
}
}
}
bool
FuncExpr::equiv(const FuncExpr *expr1,
const FuncExpr *expr2)
{
2019-03-13 01:25:53 +01:00
if (expr1 == nullptr && expr2 == nullptr)
2018-09-28 17:54:21 +02:00
return true;
2019-03-13 01:25:53 +01:00
else if (expr1 != nullptr && expr2 != nullptr
2018-09-28 17:54:21 +02:00
&& expr1->op() == expr2->op()) {
switch (expr1->op()) {
case FuncExpr::op_port:
return LibertyPort::equiv(expr1->port(), expr2->port());
case FuncExpr::op_not:
return equiv(expr1->left(), expr2->left());
default:
return equiv(expr1->left(), expr2->left())
&& equiv(expr1->right(), expr2->right());
}
}
else
return false;
}
bool
FuncExpr::less(const FuncExpr *expr1,
const FuncExpr *expr2)
{
2019-03-13 01:25:53 +01:00
if (expr1 != nullptr && expr2 != nullptr) {
2018-09-28 17:54:21 +02:00
Operator op1 = expr1->op();
Operator op2 = expr2->op();
if (op1 == op2) {
switch (expr1->op()) {
case FuncExpr::op_port:
return LibertyPort::less(expr1->port(), expr2->port());
case FuncExpr::op_not:
return less(expr1->left(), expr2->left());
default:
if (equiv(expr1->left(), expr2->left()))
return less(expr1->right(), expr2->right());
else
return less(expr1->left(), expr2->left());
}
}
else
return op1 < op2;
}
2019-03-13 01:25:53 +01:00
else if (expr1 == nullptr && expr2 == nullptr)
2018-09-28 17:54:21 +02:00
return false;
else
2019-03-13 01:25:53 +01:00
return (expr1 == nullptr && expr2 != nullptr);
2018-09-28 17:54:21 +02:00
}
} // namespace