Skip to content

Commit

Permalink
parasitics const
Browse files Browse the repository at this point in the history
Signed-off-by: James Cherry <[email protected]>
  • Loading branch information
jjcherry56 committed Sep 23, 2023
1 parent cab4118 commit 51185d8
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 26 deletions.
4 changes: 2 additions & 2 deletions include/sta/NullParasitics.hh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public:
const ParasiticAnalysisPt *ap);
virtual ParasiticDeviceIterator *deviceIterator(Parasitic *) { return nullptr; }
virtual ParasiticNodeIterator *nodeIterator(Parasitic *) { return nullptr; }
virtual bool includesPinCaps(Parasitic *parasitic) const;
virtual bool includesPinCaps(const Parasitic *parasitic) const;
virtual void deleteParasiticNetwork(const Net *net,
const ParasiticAnalysisPt *ap);
virtual void deleteParasiticNetworks(const Net *net);
Expand Down Expand Up @@ -132,7 +132,7 @@ public:

virtual const char *name(const ParasiticNode *node);
virtual const Pin *connectionPin(const ParasiticNode *node) const;
virtual ParasiticNode *findNode(Parasitic *parasitic,
virtual ParasiticNode *findNode(const Parasitic *parasitic,
const Pin *pin) const;
virtual float nodeGndCap(const ParasiticNode *node,
const ParasiticAnalysisPt *ap) const;
Expand Down
4 changes: 2 additions & 2 deletions include/sta/Parasitics.hh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public:
const ParasiticAnalysisPt *ap) = 0;
virtual void deleteParasiticNetworks(const Net *net) = 0;
// True if the parasitic network caps include pin capacitances.
virtual bool includesPinCaps(Parasitic *parasitic) const = 0;
virtual bool includesPinCaps(const Parasitic *parasitic) const = 0;
// Parasitic network component builders.
// Make a subnode of the parasitic network net.
virtual ParasiticNode *ensureParasiticNode(Parasitic *parasitic,
Expand Down Expand Up @@ -207,7 +207,7 @@ public:
virtual const char *name(const ParasiticNode *node) = 0;
virtual const Pin *connectionPin(const ParasiticNode *node) const = 0;
// Find the parasitic node connected to pin.
virtual ParasiticNode *findNode(Parasitic *parasitic,
virtual ParasiticNode *findNode(const Parasitic *parasitic,
const Pin *pin) const = 0;
// Node capacitance to ground.
virtual float nodeGndCap(const ParasiticNode *node,
Expand Down
14 changes: 7 additions & 7 deletions parasitics/ConcreteParasitics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ ConcreteParasiticNetwork::ensureParasiticNode(const Net *net,
}

ConcreteParasiticNode *
ConcreteParasiticNetwork::findNode(const Pin *pin)
ConcreteParasiticNetwork::findNode(const Pin *pin) const
{
return pin_nodes_.findKey(pin);
}
Expand Down Expand Up @@ -1373,10 +1373,10 @@ ConcreteParasitics::deleteParasiticNetworks(const Net *net)
}

bool
ConcreteParasitics::includesPinCaps(Parasitic *parasitic) const
ConcreteParasitics::includesPinCaps(const Parasitic *parasitic) const
{
ConcreteParasiticNetwork *cparasitic =
static_cast<ConcreteParasiticNetwork*>(parasitic);
const ConcreteParasiticNetwork *cparasitic =
static_cast<const ConcreteParasiticNetwork*>(parasitic);
return cparasitic->includesPinCaps();
}

Expand Down Expand Up @@ -1513,11 +1513,11 @@ ConcreteParasitics::connectionPin(const ParasiticNode *node) const
}

ParasiticNode *
ConcreteParasitics::findNode(Parasitic *parasitic,
ConcreteParasitics::findNode(const Parasitic *parasitic,
const Pin *pin) const
{
ConcreteParasiticNetwork *cparasitic =
static_cast<ConcreteParasiticNetwork*>(parasitic);
const ConcreteParasiticNetwork *cparasitic =
static_cast<const ConcreteParasiticNetwork*>(parasitic);
return cparasitic->findNode(pin);
}

Expand Down
5 changes: 3 additions & 2 deletions parasitics/ConcreteParasitics.hh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public:
virtual void deleteParasiticNetwork(const Net *net,
const ParasiticAnalysisPt *ap);
virtual void deleteParasiticNetworks(const Net *net);
virtual bool includesPinCaps(Parasitic *parasitic) const;
virtual bool includesPinCaps(const Parasitic *parasitic) const;
virtual ParasiticNode *ensureParasiticNode(Parasitic *parasitic,
const Net *net,
int id);
Expand Down Expand Up @@ -147,7 +147,8 @@ public:

virtual const char *name(const ParasiticNode *node);
virtual const Pin *connectionPin(const ParasiticNode *node) const;
virtual ParasiticNode *findNode(Parasitic *parasitic, const Pin *pin) const;
virtual ParasiticNode *findNode(const Parasitic *parasitic,
const Pin *pin) const;
virtual float nodeGndCap(const ParasiticNode *node,
const ParasiticAnalysisPt *ap) const;
virtual ParasiticDeviceIterator *
Expand Down
2 changes: 1 addition & 1 deletion parasitics/ConcreteParasiticsPvt.hh
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ public:
bool includesPinCaps() const { return includes_pin_caps_; }
ConcreteParasiticNode *ensureParasiticNode(const Net *net,
int id);
ConcreteParasiticNode *findNode(const Pin *pin);
ConcreteParasiticNode *findNode(const Pin *pin) const;
ConcreteParasiticNode *ensureParasiticNode(const Pin *pin);
virtual float capacitance() const;
ConcreteParasiticPinNodeMap *pinNodes() { return &pin_nodes_; }
Expand Down
4 changes: 2 additions & 2 deletions parasitics/NullParasitics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ NullParasitics::makeParasiticNetwork(const Net *,
}

bool
NullParasitics::includesPinCaps(Parasitic *) const
NullParasitics::includesPinCaps(const Parasitic *) const
{
return false;
}
Expand Down Expand Up @@ -327,7 +327,7 @@ NullParasitics::connectionPin(const ParasiticNode *) const
}

ParasiticNode *
NullParasitics::findNode(Parasitic *,
NullParasitics::findNode(const Parasitic *,
const Pin *) const
{
return nullptr;
Expand Down
16 changes: 8 additions & 8 deletions parasitics/ReduceParasitics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class ReduceToPiElmore : public ReduceToPi
{
public:
ReduceToPiElmore(StaState *sta);
void makePiElmore(Parasitic *parasitic_network,
void makePiElmore(const Parasitic *parasitic_network,
const Pin *drvr_pin,
ParasiticNode *drvr_node,
float coupling_cap_factor,
Expand All @@ -298,7 +298,7 @@ class ReduceToPiElmore : public ReduceToPi
};

void
reduceToPiElmore(Parasitic *parasitic_network,
reduceToPiElmore(const Parasitic *parasitic_network,
const Pin *drvr_pin,
float coupling_cap_factor,
const OperatingConditions *op_cond,
Expand Down Expand Up @@ -332,7 +332,7 @@ ReduceToPiElmore::ReduceToPiElmore(StaState *sta) :
}

void
ReduceToPiElmore::makePiElmore(Parasitic *parasitic_network,
ReduceToPiElmore::makePiElmore(const Parasitic *parasitic_network,
const Pin *drvr_pin,
ParasiticNode *drvr_node,
float coupling_cap_factor,
Expand Down Expand Up @@ -400,12 +400,12 @@ class ReduceToPiPoleResidue2 : public ReduceToPi
public:
ReduceToPiPoleResidue2(StaState *sta);
~ReduceToPiPoleResidue2();
void findPolesResidues(Parasitic *parasitic_network,
void findPolesResidues(const Parasitic *parasitic_network,
Parasitic *pi_pole_residue,
const Pin *drvr_pin,
ParasiticNode *drvr_node,
const ParasiticAnalysisPt *ap);
void makePiPoleResidue2(Parasitic *parasitic_network,
void makePiPoleResidue2(const Parasitic *parasitic_network,
const Pin *drvr_pin,
ParasiticNode *drvr_node,
float coupling_cap_factor,
Expand Down Expand Up @@ -466,7 +466,7 @@ ReduceToPiPoleResidue2::ReduceToPiPoleResidue2(StaState *sta) :
// Three Moments of the Impulse Response", Proceedings of the 33rd
// Design Automation Conference, 1996, pg 611-616.
void
reduceToPiPoleResidue2(Parasitic *parasitic_network,
reduceToPiPoleResidue2(const Parasitic *parasitic_network,
const Pin *drvr_pin,
float coupling_cap_factor,
const OperatingConditions *op_cond,
Expand Down Expand Up @@ -494,7 +494,7 @@ reduceToPiPoleResidue2(Parasitic *parasitic_network,
}

void
ReduceToPiPoleResidue2::makePiPoleResidue2(Parasitic *parasitic_network,
ReduceToPiPoleResidue2::makePiPoleResidue2(const Parasitic *parasitic_network,
const Pin *drvr_pin,
ParasiticNode *drvr_node,
float coupling_cap_factor,
Expand Down Expand Up @@ -524,7 +524,7 @@ ReduceToPiPoleResidue2::~ReduceToPiPoleResidue2()
}

void
ReduceToPiPoleResidue2::findPolesResidues(Parasitic *parasitic_network,
ReduceToPiPoleResidue2::findPolesResidues(const Parasitic *parasitic_network,
Parasitic *pi_pole_residue,
const Pin *drvr_pin,
ParasiticNode *drvr_node,
Expand Down
4 changes: 2 additions & 2 deletions parasitics/ReduceParasitics.hh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class StaState;

// Reduce parasitic network to pi elmore model for drvr_pin.
void
reduceToPiElmore(Parasitic *parasitic_network,
reduceToPiElmore(const Parasitic *parasitic_network,
const Pin *drvr_pin,
float coupling_cap_factor,
const OperatingConditions *op_cond,
Expand All @@ -40,7 +40,7 @@ reduceToPiElmore(Parasitic *parasitic_network,
// Reduce parasitic network to pi and 2nd order pole/residue models
// for drvr_pin.
void
reduceToPiPoleResidue2(Parasitic *parasitic_network,
reduceToPiPoleResidue2(const Parasitic *parasitic_network,
const Pin *drvr_pin,
float coupling_cap_factor,
const OperatingConditions *op_cond,
Expand Down

0 comments on commit 51185d8

Please sign in to comment.