Skip to content

Commit eb8ab08

Browse files
committed
Merge remote-tracking branch 'parallax/master'
2 parents 65dc4e7 + f79f442 commit eb8ab08

File tree

6 files changed

+40
-16
lines changed

6 files changed

+40
-16
lines changed

.clang-format

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@ AllowShortLoopsOnASingleLine: false
1212
AlwaysBreakAfterReturnType: TopLevel
1313
BinPackArguments: false
1414
# fails
15-
BinPackParameters: false
15+
BinPackParameters: AlwaysOnePerLine
1616
BraceWrapping:
1717
AfterClass: true
1818
AfterStruct: true
1919
AfterFunction: true
2020
BeforeElse: true
21+
BreakBeforeBinaryOperators: NonAssignment
2122
BreakBeforeBraces: Custom
2223
# fails if all initializers fit on one line
2324
BreakConstructorInitializers: AfterColon
24-
ColumnLimit: 0
25+
ColumnLimit: 90
2526
# fails
26-
ConstructorInitializerAllOnOneLineOrOnePerLine: false
2727
ConstructorInitializerIndentWidth: 2
2828
IncludeBlocks: Preserve
29+
PackConstructorInitializers: Never
2930
PointerAlignment: Right
31+
SortIncludes: Never

liberty/LibertyReader.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5706,7 +5706,7 @@ LibertyReader::visitPgType(LibertyAttr *attr)
57065706
PwrGndType type = findPwrGndType(type_name);
57075707
PortDirection *dir = PortDirection::unknown();
57085708
switch (type) {
5709-
case PwrGndType::primary_ground:;
5709+
case PwrGndType::primary_ground:
57105710
case PwrGndType::backup_ground:
57115711
case PwrGndType::internal_ground:
57125712
dir = PortDirection::ground();

power/Power.cc

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -489,13 +489,16 @@ PropActivityVisitor::visit(Vertex *vertex)
489489
}
490490
if (network_->isDriver(pin)) {
491491
LibertyPort *port = network_->libertyPort(pin);
492-
if (port) {
493-
LibertyCell *test_cell = port->libertyCell()->testCell();
494-
if (test_cell)
495-
port = test_cell->findLibertyPort(port->name());
496-
}
497492
if (port) {
498493
FuncExpr *func = port->function();
494+
if (func == nullptr) {
495+
LibertyCell *test_cell = port->libertyCell()->testCell();
496+
if (test_cell) {
497+
port = test_cell->findLibertyPort(port->name());
498+
if (port)
499+
func = port->function();
500+
}
501+
}
499502
if (func) {
500503
PwrActivity activity = power_->evalActivity(func, inst);
501504
changed = setActivityCheck(pin, activity);
@@ -777,10 +780,24 @@ Power::seedRegOutputActivities(const Instance *inst,
777780
BfsFwdIterator &bfs)
778781
{
779782
LibertyCell *cell = network_->libertyCell(inst);
780-
LibertyCell *test_cell = cell->testCell();
781-
const SequentialSeq &seqs = test_cell
782-
? test_cell->sequentials()
783-
: cell->sequentials();
783+
const SequentialSeq &seqs = cell->sequentials();
784+
if (!seqs.empty())
785+
seedRegOutputActivities(inst, nullptr, seqs, bfs);
786+
else {
787+
LibertyCell *test_cell = cell->testCell();
788+
if (test_cell) {
789+
const SequentialSeq &seqs = test_cell->sequentials();
790+
seedRegOutputActivities(inst, test_cell, seqs, bfs);
791+
}
792+
}
793+
}
794+
795+
void
796+
Power::seedRegOutputActivities(const Instance *inst,
797+
const LibertyCell *test_cell,
798+
const SequentialSeq &seqs,
799+
BfsFwdIterator &bfs)
800+
{
784801
for (Sequential *seq : seqs) {
785802
seedRegOutputActivities(inst, seq, seq->output(), false);
786803
seedRegOutputActivities(inst, seq, seq->outputInv(), true);
@@ -791,7 +808,7 @@ Power::seedRegOutputActivities(const Instance *inst,
791808
Pin *pin = pin_iter->next();
792809
LibertyPort *port = network_->libertyPort(pin);
793810
if (test_cell)
794-
port = test_cell->findLibertyPort(port->name());
811+
port = test_cell->findLibertyPort(port->name());
795812
if (port) {
796813
FuncExpr *func = port->function();
797814
Vertex *vertex = graph_->pinDrvrVertex(pin);

power/Power.hh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ protected:
191191
bool invert);
192192
void seedRegOutputActivities(const Instance *inst,
193193
BfsFwdIterator &bfs);
194+
void seedRegOutputActivities(const Instance *inst,
195+
const LibertyCell *test_cell,
196+
const SequentialSeq &seqs,
197+
BfsFwdIterator &bfs);
194198
PwrActivity evalActivity(FuncExpr *expr,
195199
const Instance *inst);
196200
PwrActivity evalActivity(FuncExpr *expr,

search/PathEnum.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,8 @@ PathEnum::makeDivertedPath(Path *path,
636636
after_div_copy = copy;
637637
if (first)
638638
div_path = copy;
639-
else if (network_->isLatchData(p->pin(this)))
639+
else if (found_div
640+
&& network_->isLatchData(p->pin(this)))
640641
break;
641642
if (p == before_div) {
642643
// Replaced on next pass.

tcl/TclTypeHelpers.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ tclArgError(Tcl_Interp *interp,
101101
try {
102102
Sta::sta()->report()->error(id, msg, arg);
103103
} catch (const std::exception &e) {
104-
Tcl_SetResult(interp, const_cast<char*>(e.what()), TCL_STATIC);
104+
Tcl_SetResult(interp, const_cast<char*>(e.what()), TCL_VOLATILE);
105105
}
106106
}
107107

0 commit comments

Comments
 (0)