Skip to content

Commit 85bd2af

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 8446184 + 26be609 commit 85bd2af

23 files changed

Lines changed: 1679 additions & 1499 deletions

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ project(STA VERSION 2.7.0
3939
option(CUDD_DIR "CUDD BDD package directory")
4040
option(USE_TCL_READLINE "Use TCL readline package" ON)
4141
option(ENABLE_TSAN "Compile with thread santizer enabled" OFF)
42+
option(ENABLE_ASAN "Compile with address santizer enabled" OFF)
4243

4344
# Turn on to debug compiler args.
4445
set(CMAKE_VERBOSE_MAKEFILE OFF)
@@ -544,6 +545,12 @@ if(ENABLE_TSAN)
544545
set(CMAKE_EXE_LINKER_FLAGS "-fsanitize=thread")
545546
endif()
546547

548+
if(ENABLE_ASAN)
549+
message(STATUS "Address sanitizer: ${ENABLE_ASAN}")
550+
set(CXX_FLAGS "${CXX_FLAGS};-fsanitize=address")
551+
set(CMAKE_EXE_LINKER_FLAGS "-fsanitize=address")
552+
endif()
553+
547554
target_compile_options(OpenSTA
548555
PRIVATE
549556
$<$<CXX_COMPILER_ID:GNU>:${CXX_FLAGS}>

dcalc/GraphDelayCalc.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ GraphDelayCalc::makeArcDcalcArgs(Vertex *drvr_vertex,
10121012
arc1 = arc;
10131013
}
10141014
else
1015-
findParallelEdge(drvr_vertex1, edge, arc, edge1, arc1);
1015+
findParallelEdge(drvr_vertex1, arc, edge1, arc1);
10161016
// Shockingly one fpga vendor connects outputs with no timing arcs together.
10171017
if (edge1) {
10181018
Vertex *from_vertex = edge1->from(graph_);
@@ -1036,7 +1036,6 @@ GraphDelayCalc::makeArcDcalcArgs(Vertex *drvr_vertex,
10361036
// primary driver drvr_edge/drvr_arc.
10371037
void
10381038
GraphDelayCalc::findParallelEdge(Vertex *vertex,
1039-
Edge *drvr_edge,
10401039
const TimingArc *drvr_arc,
10411040
// Return values.
10421041
Edge *&edge,
@@ -1047,11 +1046,10 @@ GraphDelayCalc::findParallelEdge(Vertex *vertex,
10471046
if (vertex_cell == drvr_cell) {
10481047
// Homogeneous drivers.
10491048
arc = drvr_arc;
1050-
LibertyPort *from_port = network_->libertyPort(drvr_edge->from(graph_)->pin());
10511049
VertexInEdgeIterator edge_iter(vertex, graph_);
10521050
while (edge_iter.hasNext()) {
10531051
edge = edge_iter.next();
1054-
if (network_->libertyPort(edge->from(graph_)->pin()) == from_port)
1052+
if (edge->timingArcSet() == arc->set())
10551053
return;
10561054
}
10571055
}

doc/OpenSTA.fodt

Lines changed: 1460 additions & 1438 deletions
Large diffs are not rendered by default.

doc/OpenSTA.pdf

2.07 KB
Binary file not shown.

graph/Graph.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "PortDirection.hh"
3636
#include "Network.hh"
3737
#include "DcalcAnalysisPt.hh"
38+
#include "FuncExpr.hh"
3839

3940
namespace sta {
4041

@@ -1293,6 +1294,11 @@ Edge::to_string(const StaState *sta) const
12931294
string str = from(graph)->to_string(sta);
12941295
str += " -> ";
12951296
str += to(graph)->to_string(sta);
1297+
FuncExpr *when = arc_set_->cond();
1298+
if (when) {
1299+
str += " ";
1300+
str += when->to_string();
1301+
}
12961302
return str;
12971303
}
12981304

include/sta/GraphDelayCalc.hh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ protected:
204204
const DcalcAnalysisPt *dcalc_ap,
205205
ArcDelayCalc *arc_delay_calc);
206206
void findParallelEdge(Vertex *vertex,
207-
Edge *drvr_edge,
208207
const TimingArc *drvr_arc,
209208
// Return values.
210209
Edge *&edge,

include/sta/Search.hh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@ public:
356356

357357
TagGroup *tagGroup(const Vertex *vertex) const;
358358
TagGroup *tagGroup(TagGroupIndex index) const;
359-
void reportArrivals(Vertex *vertex) const;
359+
void reportArrivals(Vertex *vertex,
360+
bool report_tag_index) const;
360361
Slack wnsSlack(Vertex *vertex,
361362
PathAPIndex path_ap_index);
362363
void levelsChangedBefore();
@@ -365,9 +366,6 @@ public:
365366
Vertex *vertex,
366367
TagGroupBldr *tag_bldr);
367368
void ensureDownstreamClkPins();
368-
// Check paths from inputs from the default arrival clock
369-
// (missing set_input_delay).
370-
virtual bool checkDefaultArrivalPaths() { return true; }
371369
bool matchesFilter(Path *path,
372370
const ClockEdge *to_clk_edge);
373371
CheckCrpr *checkCrpr() { return check_crpr_; }
@@ -410,6 +408,7 @@ public:
410408
TagGroupIndex tag_index);
411409
void checkPrevPaths() const;
412410
void deletePaths(Vertex *vertex);
411+
void deleteTagGroup(TagGroup *group);
413412

414413
protected:
415414
void init(StaState *sta);

sdc/ExceptionPath.cc

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2159,37 +2159,39 @@ ExpandedExceptionVisitor::expandThru(ExceptionFrom *expanded_from,
21592159
ExceptionThruSeq::Iterator &thru_iter,
21602160
ExceptionThruSeq *expanded_thrus)
21612161
{
2162-
if (thru_iter.hasNext()) {
2163-
ExceptionThru *thru = thru_iter.next();
2164-
const RiseFallBoth *rf = thru->transition();
2165-
if (thru->pins()) {
2166-
for (const Pin *pin : *thru->pins()) {
2167-
PinSet pins(network_);
2168-
pins.insert(pin);
2169-
ExceptionThru expanded_thru(&pins, nullptr, nullptr, rf, false, network_);
2170-
expanded_thrus->push_back(&expanded_thru);
2171-
expandThru(expanded_from, thru_iter, expanded_thrus);
2172-
expanded_thrus->pop_back();
2162+
if (exception_->thrus()) {
2163+
if (thru_iter.hasNext()) {
2164+
ExceptionThru *thru = thru_iter.next();
2165+
const RiseFallBoth *rf = thru->transition();
2166+
if (thru->pins()) {
2167+
for (const Pin *pin : *thru->pins()) {
2168+
PinSet pins(network_);
2169+
pins.insert(pin);
2170+
ExceptionThru expanded_thru(&pins, nullptr, nullptr, rf, false, network_);
2171+
expanded_thrus->push_back(&expanded_thru);
2172+
expandThru(expanded_from, thru_iter, expanded_thrus);
2173+
expanded_thrus->pop_back();
2174+
}
21732175
}
2174-
}
2175-
if (thru->nets()) {
2176-
for (const Net *net : *thru->nets()) {
2177-
NetSet nets(network_);
2178-
nets.insert(net);
2179-
ExceptionThru expanded_thru(nullptr, &nets, nullptr, rf, false, network_);
2180-
expanded_thrus->push_back(&expanded_thru);
2181-
expandThru(expanded_from, thru_iter, expanded_thrus);
2182-
expanded_thrus->pop_back();
2176+
if (thru->nets()) {
2177+
for (const Net *net : *thru->nets()) {
2178+
NetSet nets(network_);
2179+
nets.insert(net);
2180+
ExceptionThru expanded_thru(nullptr, &nets, nullptr, rf, false, network_);
2181+
expanded_thrus->push_back(&expanded_thru);
2182+
expandThru(expanded_from, thru_iter, expanded_thrus);
2183+
expanded_thrus->pop_back();
2184+
}
21832185
}
2184-
}
2185-
if (thru->instances()) {
2186-
for (const Instance *inst : *thru->instances()) {
2187-
InstanceSet insts(network_);
2188-
insts.insert(inst);
2189-
ExceptionThru expanded_thru(nullptr, nullptr, &insts, rf, false, network_);
2190-
expanded_thrus->push_back(&expanded_thru);
2191-
expandThru(expanded_from, thru_iter, expanded_thrus);
2192-
expanded_thrus->pop_back();
2186+
if (thru->instances()) {
2187+
for (const Instance *inst : *thru->instances()) {
2188+
InstanceSet insts(network_);
2189+
insts.insert(inst);
2190+
ExceptionThru expanded_thru(nullptr, nullptr, &insts, rf, false, network_);
2191+
expanded_thrus->push_back(&expanded_thru);
2192+
expandThru(expanded_from, thru_iter, expanded_thrus);
2193+
expanded_thrus->pop_back();
2194+
}
21932195
}
21942196
}
21952197
}

search/PathGroup.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,6 @@ PathGroups::makePathEnds(ExceptionTo *to,
546546
pushGroupPathEnds(path_ends);
547547
if (sort_by_slack) {
548548
sort(path_ends, PathEndLess(this));
549-
if (static_cast<int>(path_ends.size()) > group_path_count_)
550-
path_ends.resize(group_path_count_);
551549
}
552550

553551
if (unconstrained_paths

search/Search.cc

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -554,15 +554,20 @@ Search::deleteFilterTagGroups()
554554
for (TagGroupIndex i = 0; i < tag_group_next_; i++) {
555555
TagGroup *group = tag_groups_[i];
556556
if (group
557-
&& group->hasFilterTag()) {
558-
tag_group_set_->erase(group);
559-
tag_groups_[group->index()] = nullptr;
560-
tag_group_free_indices_.push_back(i);
561-
delete group;
562-
}
557+
&& group->hasFilterTag())
558+
deleteTagGroup(group);
563559
}
564560
}
565561

562+
void
563+
Search::deleteTagGroup(TagGroup *group)
564+
{
565+
tag_group_set_->erase(group);
566+
tag_groups_[group->index()] = nullptr;
567+
tag_group_free_indices_.push_back(group->index());
568+
delete group;
569+
}
570+
566571
void
567572
Search::deleteFilterTags()
568573
{
@@ -2222,7 +2227,8 @@ PathVisitor::visitFromPath(const Pin *from_pin,
22222227
}
22232228
}
22242229
else if (edge->role() == TimingRole::latchDtoQ()) {
2225-
if (min_max == MinMax::max()) {
2230+
if (min_max == MinMax::max()
2231+
&& clk) {
22262232
arc_delay = search_->deratedDelay(from_vertex, arc, edge, false, path_ap);
22272233
latches_->latchOutArrival(from_path, arc, edge, path_ap,
22282234
to_tag, arc_delay, to_arrival);
@@ -2777,6 +2783,15 @@ Search::setVertexArrivals(Vertex *vertex,
27772783
filtered_arrivals_->insert(vertex);
27782784
}
27792785
}
2786+
if (tag_group != prev_tag_group) {
2787+
LockGuard lock(tag_group_lock_);
2788+
tag_group->incrRefCount();
2789+
if (prev_tag_group) {
2790+
prev_tag_group->decrRefCount();
2791+
if (prev_tag_group->refCount() == 0)
2792+
deleteTagGroup(prev_tag_group);
2793+
}
2794+
}
27802795
}
27812796
}
27822797

@@ -2819,12 +2834,14 @@ ReportPathLess::operator()(const Path *path1,
28192834
}
28202835

28212836
void
2822-
Search::reportArrivals(Vertex *vertex) const
2837+
Search::reportArrivals(Vertex *vertex,
2838+
bool report_tag_index) const
28232839
{
28242840
report_->reportLine("Vertex %s", vertex->to_string(this).c_str());
28252841
TagGroup *tag_group = tagGroup(vertex);
28262842
if (tag_group) {
2827-
report_->reportLine("Group %u", tag_group->index());
2843+
if (report_tag_index)
2844+
report_->reportLine("Group %u", tag_group->index());
28282845
std::vector<const Path*> paths;
28292846
VertexPathIterator path_iter(vertex, this);
28302847
while (path_iter.hasNext()) {
@@ -2859,7 +2876,7 @@ Search::reportArrivals(Vertex *vertex) const
28592876
path_ap->pathMinMax()->to_string().c_str(),
28602877
delayAsString(path->arrival(), this),
28612878
req,
2862-
tag->to_string(true, false, this).c_str(),
2879+
tag->to_string(report_tag_index, false, this).c_str(),
28632880
prev_str.c_str());
28642881
}
28652882
}

0 commit comments

Comments
 (0)