Skip to content

Commit ca4e757

Browse files
committed
Merge branch 'master' into sta_mbff_changes
2 parents 37520c0 + 6599d47 commit ca4e757

66 files changed

Lines changed: 1357 additions & 1332 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ doc/messages.txt
3333

3434
# test artifacts
3535
*/test/*.log
36-
Testing/
36+
**/Testing/

dcalc/ArnoldiDelayCalc.cc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ class ArnoldiDelayCalc : public LumpedCapDelayCalc
236236
int pin_n_;
237237
ArnoldiReduce *reduce_;
238238
delay_work *delay_work_;
239-
std::vector<rcmodel*> unsaved_parasitics_;
240239
};
241240

242241
ArcDelayCalc *
@@ -247,6 +246,7 @@ makeArnoldiDelayCalc(StaState *sta)
247246

248247
ArnoldiDelayCalc::ArnoldiDelayCalc(StaState *sta) :
249248
LumpedCapDelayCalc(sta),
249+
rcmodel_(nullptr),
250250
reduce_(new ArnoldiReduce(sta)),
251251
delay_work_(delay_work_create())
252252
{
@@ -267,6 +267,7 @@ ArnoldiDelayCalc::~ArnoldiDelayCalc()
267267
free(_delayV);
268268
free(_slewV);
269269
delete reduce_;
270+
delete rcmodel_;
270271
}
271272

272273
Parasitic *
@@ -297,12 +298,11 @@ ArnoldiDelayCalc::findParasitic(const Pin *drvr_pin,
297298
}
298299

299300
if (parasitic_network) {
300-
rcmodel *rcmodel = reduce_->reduceToArnoldi(parasitic_network, drvr_pin,
301-
parasitics->couplingCapFactor(),
302-
drvr_rf, scene, min_max);
301+
rcmodel_ = reduce_->reduceToArnoldi(parasitic_network, drvr_pin,
302+
parasitics->couplingCapFactor(),
303+
drvr_rf, scene, min_max);
303304
// Arnoldi parasitics are their own class that are not saved in the parasitic db.
304-
unsaved_parasitics_.push_back(rcmodel);
305-
parasitic = rcmodel;
305+
parasitic = rcmodel_;
306306
}
307307
return parasitic;
308308
}
@@ -321,9 +321,8 @@ ArnoldiDelayCalc::reduceParasitic(const Parasitic *,
321321
void
322322
ArnoldiDelayCalc::finishDrvrPin()
323323
{
324-
for (auto parasitic : unsaved_parasitics_)
325-
delete parasitic;
326-
unsaved_parasitics_.clear();
324+
delete rcmodel_;
325+
rcmodel_ = nullptr;
327326
}
328327

329328
ArcDcalcResult

dcalc/CcsCeffDelayCalc.cc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -445,14 +445,13 @@ CcsCeffDelayCalc::findVlTime(double v,
445445
{
446446
double t_init = region_ramp_times_[0];
447447
double t_final = region_ramp_times_[region_count_];
448-
bool root_fail = false;
449-
double time = findRoot(
450-
[&](double t, double &y, double &dy) {
451-
vl(t, elmore, y, dy);
452-
y -= v;
453-
},
454-
t_init, t_final + elmore * 3.0, .001, 20, root_fail);
455-
vl_fail_ |= root_fail;
448+
auto [time, failed] =
449+
findRoot([&](double t, double &y, double &dy) {
450+
vl(t, elmore, y, dy);
451+
y -= v;
452+
},
453+
t_init, t_final + elmore * 3.0, .001, 20);
454+
vl_fail_ |= failed;
456455
return time;
457456
}
458457

0 commit comments

Comments
 (0)