Skip to content

Commit

Permalink
parasitics api update
Browse files Browse the repository at this point in the history
commit 5eb41d9304fe43d22dcf32b5346a6c9705c0d0b3
Author: James Cherry <[email protected]>
Date:   Thu Feb 8 11:49:16 2024 -0700

    tcl endpoint_count

    Signed-off-by: James Cherry <[email protected]>

commit ffb0e0a083edbbdc3753b829641ba26730d3d882
Author: James Cherry <[email protected]>
Date:   Thu Feb 8 10:51:36 2024 -0700

    ArcDelayCalc::reduceParasitic

    Signed-off-by: James Cherry <[email protected]>

commit ed167b218ed026b0b7427301ace67c3d22cc969a
Author: James Cherry <[email protected]>
Date:   Wed Feb 7 22:46:40 2024 -0700

    parasitics makeResistor/capacitor rm network arg

    Signed-off-by: James Cherry <[email protected]>

commit 41244abfcfdee20ddc9aa8ac80cac2e3e7f68146
Author: James Cherry <[email protected]>
Date:   Wed Feb 7 17:08:04 2024 -0700

    arnoldi coupling caps

    Signed-off-by: James Cherry <[email protected]>

commit a14d6880be0dc22bf008cae63ec93880c8347ccf
Author: James Cherry <[email protected]>
Date:   Wed Feb 7 07:28:31 2024 -0700

    parasiticLoad

    Signed-off-by: James Cherry <[email protected]>

commit 1cacbd7da71c7f8c5ac311caabd03bb74b66e675
Author: James Cherry <[email protected]>
Date:   Wed Feb 7 07:21:49 2024 -0700

    parasitic resistor/capacitor index -> id

    Signed-off-by: James Cherry <[email protected]>

commit 6c749158cc94e5a91376721a8ccb71a8a4d020d5
Author: James Cherry <[email protected]>
Date:   Tue Feb 6 21:42:03 2024 -0700

    arnoldi

    Signed-off-by: James Cherry <[email protected]>

commit 4ffa6002224d76321287f64448929e5ef0ec6edd
Author: James Cherry <[email protected]>
Date:   Tue Feb 6 18:27:33 2024 -0700

    arnoldi parasitic leak

    Signed-off-by: James Cherry <[email protected]>

commit a9666dd7c44126b262c7bd1170db69fafa5ef327
Author: James Cherry <[email protected]>
Date:   Tue Feb 6 17:05:24 2024 -0700

    arnoldi parasitic leak

    Signed-off-by: James Cherry <[email protected]>

commit eca0e8b5ea3b4dbb22a1a2ed11018e6e40229b3f
Author: James Cherry <[email protected]>
Date:   Tue Feb 6 14:40:38 2024 -0700

    comment

    Signed-Off-by: James Cherry <[email protected]>

commit 0263245b5e2412ebefbedc67babf23e1ac047c7b
Author: James Cherry <[email protected]>
Date:   Tue Feb 6 14:24:51 2024 -0700

    CouplingCap -> Capacitor

    Signed-off-by: James Cherry <[email protected]>

commit f9da059814fb09c44cc3529a9a787c3c2192a4e9
Author: James Cherry <[email protected]>
Date:   Tue Feb 6 09:31:00 2024 -0700

    rm parasitic network array if empty

    Signed-off-by: James Cherry <[email protected]>

commit 28c2728e5f2859839818ef228aac51fd0100ae65
Author: James Cherry <[email protected]>
Date:   Tue Feb 6 08:13:03 2024 -0700

    parasitic resistor name -> id

    Signed-off-by: James Cherry <[email protected]>

commit 045fd7efa3ae8b1cf07c5aa421f3119022e3895a
Author: James Cherry <[email protected]>
Date:   Mon Feb 5 21:09:39 2024 -0700

    Map -> map

    Signed-off-by: James Cherry <[email protected]>

commit 8f7d18eed14a8173d91fd98a4e345a16d168b0ee
Author: James Cherry <[email protected]>
Date:   Mon Feb 5 21:04:35 2024 -0700

    ParasiticResistor, ParasiticCapacitor

    Signed-off-by: James Cherry <[email protected]>

commit e2df87a10febc573c77b51a22e82d2d1f6f52af9
Author: James Cherry <[email protected]>
Date:   Mon Feb 5 17:06:34 2024 -0700

    rm ParasticNode::devices

    Signed-off-by: James Cherry <[email protected]>

commit 07133b72b73d204d16f964472c38907c18f9758d
Author: James Cherry <[email protected]>
Date:   Mon Feb 5 16:52:43 2024 -0700

    Parsitic network nodes instead of nodeIterator

    Signed-off-by: James Cherry <[email protected]>

commit 48c08673b11d0c328ed7d70606b6c7a979d9d0b8
Author: James Cherry <[email protected]>
Date:   Mon Feb 5 16:34:31 2024 -0700

    mv otherNode to Parasitics

    Signed-off-by: James Cherry <[email protected]>

commit 99fccc76937c25c68454d8db667306bff2a142ae
Author: James Cherry <[email protected]>
Date:   Mon Feb 5 16:29:23 2024 -0700

    ParasiticNetwork resistor/capacitor array

    Signed-off-by: James Cherry <[email protected]>

commit 9de49992ad403d7bc3468c53201d50825d7b961c
Author: James Cherry <[email protected]>
Date:   Mon Feb 5 09:42:01 2024 -0700

    SpefNameMap

    Signed-off-by: James Cherry <[email protected]>

commit f296850201debeb2cfe1fd0b9c61c3c196f00d65
Author: James Cherry <[email protected]>
Date:   Mon Feb 5 09:11:17 2024 -0700

    comments

    Signed-off-by: James Cherry <[email protected]>

commit 86ca29b9bdeb732c1a596c196e0c4bf91de3ee37
Author: James Cherry <[email protected]>
Date:   Mon Feb 5 08:29:53 2024 -0700

    rm Parasitics::reduceTo

    Signed-off-by: James Cherry <[email protected]>

commit 880bf458d473004ee5d3dc33baa62c9e643ddaec
Author: James Cherry <[email protected]>
Date:   Sun Feb 4 20:15:05 2024 -0700

    loadCap

    Signed-off-by: James Cherry <[email protected]>

commit 67322e686f4703a2a5d9cdd1dd66534814662fe4
Author: James Cherry <[email protected]>
Date:   Sun Feb 4 09:39:21 2024 -0700

    report_parasitic_annotation

    Signed-off-by: James Cherry <[email protected]>

commit 8ef4e9841bca62a5879e74da83cacee70fa50b2f
Author: James Cherry <[email protected]>
Date:   Sat Feb 3 19:13:27 2024 -0700

    ParasiticAnalysisPt use string

    Signed-off-by: James Cherry <[email protected]>

commit 109a85ab37b5a869a72738ac6a6cd84e4a1d1ac4
Author: James Cherry <[email protected]>
Date:   Sat Feb 3 18:59:02 2024 -0700

    rm ParasiticAnalysisPt::min_max_

    Signed-off-by: James Cherry <[email protected]>

commit bb7874537d20a1fe905779fe46d783dba14e2db6
Author: James Cherry <[email protected]>
Date:   Sat Feb 3 12:21:28 2024 -0700

    parasitics rm pole_residue pointer

    Signed-off-by: James Cherry <[email protected]>

commit 9e1e2c484e5cd088a08afc278f25b9fcf2cc5dd9
Author: James Cherry <[email protected]>
Date:   Sat Feb 3 11:54:22 2024 -0700

    parasitics rm loads pointer

    Signed-off-by: James Cherry <[email protected]>

commit cb4a7f870b2371a2ac6b3ce1d340bb5d3c24791a
Author: James Cherry <[email protected]>
Date:   Sat Feb 3 08:05:55 2024 -0700

    parasitics use override

    Signed-off-by: James Cherry <[email protected]>

commit 8e0f84c4fec0411ad3626c836710545531ef219d
Author: James Cherry <[email protected]>
Date:   Sat Feb 3 07:53:59 2024 -0700

    Parasitics::unannotatedLoads

    Signed-off-by: James Cherry <[email protected]>

commit 6b45e369e7be158616219258e6e9a675e87fd8ca
Author: James Cherry <[email protected]>
Date:   Fri Feb 2 12:27:23 2024 -0700

    format

    Signed-off-by: James Cherry <[email protected]>

commit 27e820b36caf7867d20307c7045e86486819db6b
Author: James Cherry <[email protected]>
Date:   Thu Feb 1 18:01:51 2024 -0700

    rm op_cond args

    Signed-off-by: James Cherry <[email protected]>

commit 351ed53925c7cc9815f75c34a0320b0dc50445d4
Author: James Cherry <[email protected]>
Date:   Wed Jan 31 17:35:15 2024 -0700

    rm GraphDelayCalc::loadPins()

    Signed-off-by: James Cherry <[email protected]>

commit 3341c7caff595dab0b7519ab5103958aadfe1510
Author: James Cherry <[email protected]>
Date:   Wed Jan 31 17:31:56 2024 -0700

    read_spef arg check

    Signed-off-by: James Cherry <[email protected]>

commit 7d0c1e78b42e33d5298efefa87a982f28f51bc57
Author: James Cherry <[email protected]>
Date:   Wed Jan 31 10:53:35 2024 -0700

    arnoldi use parasitics api

    Signed-off-by: James Cherry <[email protected]>

commit 86b39ac10e5c6556a9b0b5b7bce016884cd935ee
Author: James Cherry <[email protected]>
Date:   Wed Jan 31 10:30:47 2024 -0700

    range iter

    Signed-off-by: James Cherry <[email protected]>

commit 469fad36af69cc8b76e4dfc88a085962795d7c46
Author: James Cherry <[email protected]>
Date:   Tue Jan 30 16:43:46 2024 -0700

    read_spef -reduce

    Signed-off-by: James Cherry <[email protected]>

commit 2b88aa471f083ae895f6277c2c844e308451fff9
Author: James Cherry <[email protected]>
Date:   Mon Jan 29 20:31:47 2024 -0700

    Paraasitics::connectionPin() -> pin()

    Signed-off-by: James Cherry <[email protected]>

commit 7b9ff7e228b215b3121b7e7189d9c0c18ced3ef3
Author: James Cherry <[email protected]>
Date:   Mon Jan 29 17:12:32 2024 -0700

    ParasiticNode::isExternal()

    Signed-off-by: James Cherry <[email protected]>

commit 889c27af846ed1cdf76295da5262836378ab9162
Author: James Cherry <[email protected]>
Date:   Mon Jan 29 11:17:59 2024 -0700

    rm redundant op_cond arg

    Signed-off-by: James Cherry <[email protected]>

commit 7d7ce5e7809bc80f36dd81cb05615a87433ed315
Author: James Cherry <[email protected]>
Date:   Mon Jan 29 11:03:42 2024 -0700

    mv estimatePiElmore to Parasitics

    Signed-off-by: James Cherry <[email protected]>

commit 04e1757b3c8b4e9f5cffbe3b03214fc065fb1c2c
Author: James Cherry <[email protected]>
Date:   Mon Jan 29 09:09:28 2024 -0700

    ParasiticNode un-virtual

    Signed-off-by: James Cherry <[email protected]>

commit 016ce50f82cbb68f9536d3ed5fd511b2f82f4439
Author: James Cherry <[email protected]>
Date:   Sun Jan 28 17:26:04 2024 -0700

    parasitics coupling cap api

    Signed-off-by: James Cherry <[email protected]>

commit 1748629fb462b24b43002ecd3fe1679d367752f4
Author: James Cherry <[email protected]>
Date:   Sun Jan 28 11:12:46 2024 -0700

    Parasitics::value rm ap arg

    Signed-off-by: James Cherry <[email protected]>

commit 1272cb86bcae5960c9af7d589f99f1488aa0b322
Author: James Cherry <[email protected]>
Date:   Sun Jan 28 11:10:57 2024 -0700

    read_spef rm -quiet arg

    Signed-off-by: James Cherry <[email protected]>

commit 3d86a9d86115dde5f20eb4bb8ca15f0c85de5810
Author: James Cherry <[email protected]>
Date:   Sun Jan 28 11:01:24 2024 -0700

    reduce min_max arg

    Signed-off-by: James Cherry <[email protected]>

commit f7abfd5e72e0f74b9ffabf6306bbf809b62d4e98
Author: James Cherry <[email protected]>
Date:   Sun Jan 28 10:59:29 2024 -0700

    rm spef_reader

    Signed-off-by: James Cherry <[email protected]>

commit e3550523b1964b2137419240f748a0b44c3322b6
Author: James Cherry <[email protected]>
Date:   Sun Jan 28 10:58:24 2024 -0700

    reducers rm op_cond arg

    Signed-off-by: James Cherry <[email protected]>

commit cec793accb3db5c41cdb51f85c8530ffc1e085db
Author: James Cherry <[email protected]>
Date:   Sun Jan 28 10:08:45 2024 -0700

    rm NullParastics

    Signed-off-by: James Cherry <[email protected]>

commit 6596d35f6da51cbacb2c21588715773d3b5edb64
Author: James Cherry <[email protected]>
Date:   Sun Jan 28 10:03:29 2024 -0700

    ArcDelayCalc::reduceParasitic

    Signed-off-by: James Cherry <[email protected]>

Signed-off-by: James Cherry <[email protected]>
  • Loading branch information
jjcherry56 committed Feb 8, 2024
1 parent cc9eb1f commit 902a1bf
Show file tree
Hide file tree
Showing 49 changed files with 1,848 additions and 3,161 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ set(STA_SOURCE

parasitics/ConcreteParasitics.cc
parasitics/EstimateParasitics.cc
parasitics/NullParasitics.cc
parasitics/Parasitics.cc
parasitics/ReduceParasitics.cc
parasitics/ReportParasiticAnnotation.cc
Expand Down
2 changes: 2 additions & 0 deletions dcalc/Arnoldi.hh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ public:
rcmodel();
virtual ~rcmodel();
virtual float capacitance() const;
virtual PinSet unannotatedLoads(const Pin *drvr_pin,
const Parasitics *parasitics) const;

const Pin **pinV; // [n]
};
Expand Down
85 changes: 47 additions & 38 deletions dcalc/ArnoldiDelayCalc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "TimingModel.hh"
#include "TimingArc.hh"
#include "TableModel.hh"
#include "PortDirection.hh"
#include "Network.hh"
#include "Graph.hh"
#include "Parasitics.hh"
Expand Down Expand Up @@ -117,7 +118,10 @@ class ArnoldiDelayCalc : public LumpedCapDelayCalc
Parasitic *findParasitic(const Pin *drvr_pin,
const RiseFall *rf,
const DcalcAnalysisPt *dcalc_ap) override;
ReducedParasiticType reducedParasiticType() const override;
Parasitic *reduceParasitic(const Parasitic *parasitic_network,
const Pin *drvr_pin,
const RiseFall *rf,
const DcalcAnalysisPt *dcalc_ap) override;
ArcDcalcResult inputPortDelay(const Pin *port_pin,
float in_slew,
const RiseFall *rf,
Expand All @@ -140,6 +144,7 @@ class ArnoldiDelayCalc : public LumpedCapDelayCalc
const LoadPinIndexMap &load_pin_index_map,
const DcalcAnalysisPt *dcalc_ap,
int digits) override;
void finishDrvrPin() override;
void delay_work_set_thresholds(delay_work *D,
double lo,
double hi,
Expand Down Expand Up @@ -219,6 +224,7 @@ class ArnoldiDelayCalc : public LumpedCapDelayCalc
int pin_n_;
ArnoldiReduce *reduce_;
delay_work *delay_work_;
vector<rcmodel*> unsaved_parasitics_;
};

ArcDelayCalc *
Expand Down Expand Up @@ -259,49 +265,53 @@ ArnoldiDelayCalc::findParasitic(const Pin *drvr_pin,
Parasitic *parasitic = nullptr;
const Corner *corner = dcalc_ap->corner();
// set_load net has precedence over parasitics.
if (!sdc_->drvrPinHasWireCap(drvr_pin, corner)) {
const ParasiticAnalysisPt *parasitic_ap = dcalc_ap->parasiticAnalysisPt();
Parasitic *parasitic_network =
parasitics_->findParasiticNetwork(drvr_pin, parasitic_ap);
bool delete_parasitic_network = false;

const MinMax *cnst_min_max = dcalc_ap->constraintMinMax();
const OperatingConditions *op_cond = dcalc_ap->operatingConditions();
if (parasitic_network == nullptr) {
Wireload *wireload = sdc_->wireload(cnst_min_max);
if (wireload) {
float pin_cap, wire_cap, fanout;
bool has_wire_cap;
graph_delay_calc_->netCaps(drvr_pin, drvr_rf, dcalc_ap,
pin_cap, wire_cap, fanout, has_wire_cap);
parasitic_network = parasitics_->makeWireloadNetwork(drvr_pin, wireload,
fanout, op_cond,
parasitic_ap);
delete_parasitic_network = true;
}
if (sdc_->drvrPinHasWireCap(drvr_pin, corner)
|| network_->direction(drvr_pin)->isInternal())
return nullptr;
const ParasiticAnalysisPt *parasitic_ap = dcalc_ap->parasiticAnalysisPt();
Parasitic *parasitic_network =
parasitics_->findParasiticNetwork(drvr_pin, parasitic_ap);
const MinMax *min_max = dcalc_ap->constraintMinMax();
if (parasitic_network == nullptr) {
Wireload *wireload = sdc_->wireload(min_max);
if (wireload) {
float pin_cap, wire_cap, fanout;
bool has_wire_cap;
graph_delay_calc_->netCaps(drvr_pin, drvr_rf, dcalc_ap,
pin_cap, wire_cap, fanout, has_wire_cap);
parasitic_network = parasitics_->makeWireloadNetwork(drvr_pin, wireload,
fanout, min_max,
parasitic_ap);
}
}

if (parasitic_network) {
parasitic = reduce_->reduceToArnoldi(parasitic_network,
drvr_pin,
parasitic_ap->couplingCapFactor(),
drvr_rf, op_cond, corner,
cnst_min_max, parasitic_ap);
if (delete_parasitic_network) {
Net *net = network_->net(drvr_pin);
parasitics_->deleteParasiticNetwork(net, parasitic_ap);
}
// Arnoldi parasitics are their own class that are not saved in the parasitic db.
unsaved_parasitics_.push_back(parasitic);
}
if (parasitic_network) {
rcmodel *rcmodel = reduce_->reduceToArnoldi(parasitic_network, drvr_pin,
parasitic_ap->couplingCapFactor(),
drvr_rf, corner, min_max, parasitic_ap);
// Arnoldi parasitics are their own class that are not saved in the parasitic db.
unsaved_parasitics_.push_back(rcmodel);
parasitic = rcmodel;
}
return parasitic;
}

ReducedParasiticType
ArnoldiDelayCalc::reducedParasiticType() const
Parasitic *
ArnoldiDelayCalc::reduceParasitic(const Parasitic *,
const Pin *,
const RiseFall *,
const DcalcAnalysisPt *)
{
// Decline because reduced arnoldi parasitics are not stored in the parasitics db.
return nullptr;
}

void
ArnoldiDelayCalc::finishDrvrPin()
{
return ReducedParasiticType::arnoldi;
for (auto parasitic : unsaved_parasitics_)
delete parasitic;
unsaved_parasitics_.clear();
}

ArcDcalcResult
Expand Down Expand Up @@ -1304,7 +1314,6 @@ ArnoldiDelayCalc::ra_get_r(delay_work *D,
r = tlohi/(c_log*c1);
if (rdelay>0.0 && r > rdelay)
r = rdelay;
// else printf("from rdelay %g to r %g\n",rdelay,r);
return r;
}

Expand Down
146 changes: 79 additions & 67 deletions dcalc/ArnoldiReduce.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ rcmodel::capacitance() const
return ctot;
}

PinSet
rcmodel::unannotatedLoads(const Pin *,
const Parasitics *) const
{
// This should never be called because the rcmodel is not saved in the Parasitics.
return PinSet();
}

struct ts_point
{
ParasiticNode *node_;
Expand All @@ -62,7 +70,7 @@ struct ts_point

struct ts_edge
{
ConcreteParasiticResistor *resistor_;
ParasiticResistor *resistor_;
ts_point *from;
ts_point *to;
};
Expand Down Expand Up @@ -131,23 +139,21 @@ ArnoldiReduce::~ArnoldiReduce()
free(ts_pointV);
}

Parasitic *
rcmodel *
ArnoldiReduce::reduceToArnoldi(Parasitic *parasitic,
const Pin *drvr_pin,
float coupling_cap_factor,
const RiseFall *rf,
const OperatingConditions *op_cond,
const Corner *corner,
const MinMax *cnst_min_max,
const MinMax *min_max,
const ParasiticAnalysisPt *ap)
{
parasitic_network_ = reinterpret_cast<ConcreteParasiticNetwork*>(parasitic);
drvr_pin_ = drvr_pin;
coupling_cap_factor_ = coupling_cap_factor;
rf_ = rf;
op_cond_ = op_cond;
corner_ = corner;
cnst_min_max_ = cnst_min_max;
min_max_ = min_max;
ap_ = ap;
loadWork();
return makeRcmodelDrv();
Expand All @@ -158,18 +164,21 @@ ArnoldiReduce::loadWork()
{
pt_map_.clear();

int resistor_count = 0;
ConcreteParasiticDeviceSet devices;
parasitic_network_->devices(&devices);
ConcreteParasiticDeviceSet::Iterator device_iter(devices);
while (device_iter.hasNext()) {
ParasiticDevice *device = device_iter.next();
if (parasitics_->isResistor(device))
resistor_count++;
const ParasiticResistorSeq &resistors = parasitics_->resistors(parasitic_network_);
int resistor_count = resistors.size();

termN = 0;
int subnode_count = 0;
ParasiticNodeSeq nodes = parasitics_->nodes(parasitic_network_);
for (ParasiticNode *node : nodes) {
if (!parasitics_->isExternal(node)) {
const Pin *pin = parasitics_->pin(node);
if (pin)
termN++;
else
subnode_count++;
}
}

termN = parasitic_network_->pinNodes()->size();
int subnode_count = parasitic_network_->subNodes()->size();
ts_pointN = subnode_count + 1 + termN;
ts_edgeN = resistor_count;
allocPoints();
Expand All @@ -191,50 +200,42 @@ ArnoldiReduce::loadWork()
pend = pterm0;
e = e0;
int index = 0;
ConcreteParasiticSubNodeMap::Iterator
sub_node_iter(parasitic_network_->subNodes());
while (sub_node_iter.hasNext()) {
ConcreteParasiticSubNode *node = sub_node_iter.next();
pt_map_[node] = index;
p = p0 + index;
p->node_ = node;
p->eN = 0;
p->is_term = false;
index++;
}

ConcreteParasiticPinNodeMap::Iterator
pin_node_iter(parasitic_network_->pinNodes());
while (pin_node_iter.hasNext()) {
ConcreteParasiticPinNode *node = pin_node_iter.next();
p = pend++;
pt_map_[node] = p - p0;
p->node_ = node;
p->eN = 0;
p->is_term = true;
tindex = p - pterm0;
p->tindex = tindex;
const Pin *pin = parasitics_->connectionPin(node);
pinV[tindex] = pin;
for (ParasiticNode *node : nodes) {
if (!parasitics_->isExternal(node)) {
const Pin *pin = parasitics_->pin(node);
if (pin) {
p = pend++;
pt_map_[node] = p - p0;
p->node_ = node;
p->eN = 0;
p->is_term = true;
tindex = p - pterm0;
p->tindex = tindex;
pinV[tindex] = pin;
}
else {
pt_map_[node] = index;
p = p0 + index;
p->node_ = node;
p->eN = 0;
p->is_term = false;
index++;
}
}
}

ts_edge **eV = ts_eV;
ConcreteParasiticDeviceSet::Iterator device_iter2(devices);
while (device_iter2.hasNext()) {
ParasiticDevice *device = device_iter2.next();
if (parasitics_->isResistor(device)) {
ConcreteParasiticResistor *resistor =
reinterpret_cast<ConcreteParasiticResistor*>(device);
ts_point *pt1 = findPt(resistor->node1());
ts_point *pt2 = findPt(resistor->node2());
e->from = pt1;
e->to = pt2;
e->resistor_ = resistor;
pt1->eN++;
if (e->from != e->to)
pt2->eN++;
e++;
}
for (ParasiticResistor *resistor : resistors) {
ts_point *pt1 = findPt(parasitics_->node1(resistor));
ts_point *pt2 = findPt(parasitics_->node2(resistor));
e->from = pt1;
e->to = pt2;
e->resistor_ = resistor;
pt1->eN++;
if (e->from != e->to)
pt2->eN++;
e++;
}

for (p=p0;p!=pend;p++) {
Expand Down Expand Up @@ -313,17 +314,15 @@ ArnoldiReduce::findPt(ParasiticNode *node)
rcmodel *
ArnoldiReduce::makeRcmodelDrv()
{
ParasiticNode *drv_node = parasitics_->findNode(parasitic_network_,
drvr_pin_);
ParasiticNode *drv_node = parasitics_->findNode(parasitic_network_, drvr_pin_);
ts_point *pdrv = findPt(drv_node);
makeRcmodelDfs(pdrv);
getRC();
if (ctot_ < 1e-22) // 1e-10ps
return nullptr;
setTerms(pdrv);
makeRcmodelFromTs();
rcmodel *mod = makeRcmodelFromW();
return mod;
return makeRcmodelFromW();
}

#define ts_orient( pp, ee) \
Expand Down Expand Up @@ -415,7 +414,7 @@ ArnoldiReduce::getRC()
p->r = 0.0;
if (p->node_) {
ParasiticNode *node = p->node_;
double cap = parasitics_->nodeGndCap(node, ap_)
double cap = parasitics_->nodeGndCap(node)
+ pinCapacitance(node);
if (cap > 0.0) {
p->c = cap;
Expand All @@ -424,7 +423,7 @@ ArnoldiReduce::getRC()
else
p->c = 0.0;
if (p->in_edge && p->in_edge->resistor_)
p->r = parasitics_->value(p->in_edge->resistor_, ap_);
p->r = parasitics_->value(p->in_edge->resistor_);
if (!(p->r>=0.0 && p->r<100e+3)) { // 0 < r < 100kohm
debugPrint(debug_, "arnoldi", 1,
"R value %g out of range, drvr pin %s",
Expand All @@ -433,20 +432,33 @@ ArnoldiReduce::getRC()
}
}
}
for (ParasiticCapacitor *capacitor : parasitics_->capacitors(parasitic_network_)) {
float cap = parasitics_->value(capacitor) * ap_->couplingCapFactor();
ParasiticNode *node1 = parasitics_->node1(capacitor);
if (!parasitics_->isExternal(node1)) {
ts_point *pt = findPt(node1);
pt->c += cap;
}
ParasiticNode *node2 = parasitics_->node2(capacitor);
if (!parasitics_->isExternal(node2)) {
ts_point *pt = findPt(node2);
pt->c += cap;
}
}
}

float
ArnoldiReduce::pinCapacitance(ParasiticNode *node)
{
const Pin *pin = parasitics_->connectionPin(node);
const Pin *pin = parasitics_->pin(node);
float pin_cap = 0.0;
if (pin) {
Port *port = network_->port(pin);
LibertyPort *lib_port = network_->libertyPort(port);
if (lib_port)
pin_cap = sdc_->pinCapacitance(pin,rf_, op_cond_, corner_, cnst_min_max_);
pin_cap = sdc_->pinCapacitance(pin,rf_, corner_, min_max_);
else if (network_->isTopLevelPort(pin))
pin_cap = sdc_->portExtCap(port, rf_, corner_, cnst_min_max_);
pin_cap = sdc_->portExtCap(port, rf_, corner_, min_max_);
}
return pin_cap;
}
Expand Down
Loading

0 comments on commit 902a1bf

Please sign in to comment.