unique_lock -> lock_guard
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
6c1322b6ee
commit
7358e2698e
|
|
@ -610,7 +610,7 @@ GraphDelayCalc::enqueueTimingChecksEdges(Vertex *vertex)
|
||||||
{
|
{
|
||||||
if (vertex->hasChecks()) {
|
if (vertex->hasChecks()) {
|
||||||
VertexInEdgeIterator edge_iter(vertex, graph_);
|
VertexInEdgeIterator edge_iter(vertex, graph_);
|
||||||
UniqueLock lock(invalid_edge_lock_);
|
LockGuard lock(invalid_edge_lock_);
|
||||||
while (edge_iter.hasNext()) {
|
while (edge_iter.hasNext()) {
|
||||||
Edge *edge = edge_iter.next();
|
Edge *edge = edge_iter.next();
|
||||||
if (edge->role()->isTimingCheck())
|
if (edge->role()->isTimingCheck())
|
||||||
|
|
@ -619,7 +619,7 @@ GraphDelayCalc::enqueueTimingChecksEdges(Vertex *vertex)
|
||||||
}
|
}
|
||||||
if (vertex->isCheckClk()) {
|
if (vertex->isCheckClk()) {
|
||||||
VertexOutEdgeIterator edge_iter(vertex, graph_);
|
VertexOutEdgeIterator edge_iter(vertex, graph_);
|
||||||
UniqueLock lock(invalid_edge_lock_);
|
LockGuard lock(invalid_edge_lock_);
|
||||||
while (edge_iter.hasNext()) {
|
while (edge_iter.hasNext()) {
|
||||||
Edge *edge = edge_iter.next();
|
Edge *edge = edge_iter.next();
|
||||||
if (edge->role()->isTimingCheck())
|
if (edge->role()->isTimingCheck())
|
||||||
|
|
@ -630,7 +630,7 @@ GraphDelayCalc::enqueueTimingChecksEdges(Vertex *vertex)
|
||||||
// Latch D->Q arcs have to be re-evaled if level(D) > level(E)
|
// Latch D->Q arcs have to be re-evaled if level(D) > level(E)
|
||||||
// because levelization does not traverse D->Q arcs to break loops.
|
// because levelization does not traverse D->Q arcs to break loops.
|
||||||
VertexOutEdgeIterator edge_iter(vertex, graph_);
|
VertexOutEdgeIterator edge_iter(vertex, graph_);
|
||||||
UniqueLock lock(invalid_edge_lock_);
|
LockGuard lock(invalid_edge_lock_);
|
||||||
while (edge_iter.hasNext()) {
|
while (edge_iter.hasNext()) {
|
||||||
Edge *edge = edge_iter.next();
|
Edge *edge = edge_iter.next();
|
||||||
if (edge->role() == TimingRole::latchDtoQ())
|
if (edge->role() == TimingRole::latchDtoQ())
|
||||||
|
|
@ -661,7 +661,7 @@ GraphDelayCalc::findMultiDrvrNet(Vertex *drvr_vertex)
|
||||||
{
|
{
|
||||||
// Avoid locking for single driver nets.
|
// Avoid locking for single driver nets.
|
||||||
if (hasMultiDrvrs(drvr_vertex)) {
|
if (hasMultiDrvrs(drvr_vertex)) {
|
||||||
UniqueLock lock(multi_drvr_lock_);
|
LockGuard lock(multi_drvr_lock_);
|
||||||
MultiDrvrNet *multi_drvr = multiDrvrNet(drvr_vertex);
|
MultiDrvrNet *multi_drvr = multiDrvrNet(drvr_vertex);
|
||||||
if (multi_drvr)
|
if (multi_drvr)
|
||||||
return multi_drvr;
|
return multi_drvr;
|
||||||
|
|
|
||||||
|
|
@ -576,7 +576,7 @@ Graph::makeArrivals(Vertex *vertex,
|
||||||
Arrival *arrivals;
|
Arrival *arrivals;
|
||||||
ArrivalId id;
|
ArrivalId id;
|
||||||
{
|
{
|
||||||
UniqueLock lock(arrivals_lock_);
|
LockGuard lock(arrivals_lock_);
|
||||||
arrivals_.make(count, arrivals, id);
|
arrivals_.make(count, arrivals, id);
|
||||||
}
|
}
|
||||||
vertex->setArrivals(id);
|
vertex->setArrivals(id);
|
||||||
|
|
@ -594,7 +594,7 @@ Graph::deleteArrivals(Vertex *vertex,
|
||||||
uint32_t count)
|
uint32_t count)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
UniqueLock lock(arrivals_lock_);
|
LockGuard lock(arrivals_lock_);
|
||||||
arrivals_.destroy(vertex->arrivals(), count);
|
arrivals_.destroy(vertex->arrivals(), count);
|
||||||
}
|
}
|
||||||
vertex->setArrivals(arrival_null);
|
vertex->setArrivals(arrival_null);
|
||||||
|
|
@ -609,7 +609,7 @@ Graph::makeRequireds(Vertex *vertex,
|
||||||
Required *requireds;
|
Required *requireds;
|
||||||
ArrivalId id;
|
ArrivalId id;
|
||||||
{
|
{
|
||||||
UniqueLock lock(requireds_lock_);
|
LockGuard lock(requireds_lock_);
|
||||||
requireds_.make(count, requireds, id);
|
requireds_.make(count, requireds, id);
|
||||||
}
|
}
|
||||||
vertex->setRequireds(id);
|
vertex->setRequireds(id);
|
||||||
|
|
@ -627,7 +627,7 @@ Graph::deleteRequireds(Vertex *vertex,
|
||||||
uint32_t count)
|
uint32_t count)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
UniqueLock lock(requireds_lock_);
|
LockGuard lock(requireds_lock_);
|
||||||
requireds_.destroy(vertex->requireds(), count);
|
requireds_.destroy(vertex->requireds(), count);
|
||||||
}
|
}
|
||||||
vertex->setRequireds(arrival_null);
|
vertex->setRequireds(arrival_null);
|
||||||
|
|
@ -647,7 +647,7 @@ Graph::makePrevPaths(Vertex *vertex,
|
||||||
PathVertexRep *prev_paths;
|
PathVertexRep *prev_paths;
|
||||||
PrevPathId id;
|
PrevPathId id;
|
||||||
{
|
{
|
||||||
UniqueLock lock(prev_paths_lock_);
|
LockGuard lock(prev_paths_lock_);
|
||||||
prev_paths_.make(count, prev_paths, id);
|
prev_paths_.make(count, prev_paths, id);
|
||||||
}
|
}
|
||||||
vertex->setPrevPaths(id);
|
vertex->setPrevPaths(id);
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
namespace sta {
|
namespace sta {
|
||||||
|
|
||||||
typedef std::unique_lock<std::mutex> UniqueLock;
|
// Hide a bit of the std verbosity.
|
||||||
|
typedef std::lock_guard<std::mutex> LockGuard;
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
||||||
|
|
@ -920,7 +920,7 @@ ConcreteParasitics::deleteReducedParasitics(const Pin *pin)
|
||||||
void
|
void
|
||||||
ConcreteParasitics::deleteDrvrReducedParasitics(const Pin *drvr_pin)
|
ConcreteParasitics::deleteDrvrReducedParasitics(const Pin *drvr_pin)
|
||||||
{
|
{
|
||||||
UniqueLock lock(lock_);
|
LockGuard lock(lock_);
|
||||||
ConcreteParasitic **parasitics = drvr_parasitic_map_[drvr_pin];
|
ConcreteParasitic **parasitics = drvr_parasitic_map_[drvr_pin];
|
||||||
if (parasitics) {
|
if (parasitics) {
|
||||||
int ap_count = corners_->parasiticAnalysisPtCount();
|
int ap_count = corners_->parasiticAnalysisPtCount();
|
||||||
|
|
@ -936,7 +936,7 @@ void
|
||||||
ConcreteParasitics::deleteDrvrReducedParasitics(const Pin *drvr_pin,
|
ConcreteParasitics::deleteDrvrReducedParasitics(const Pin *drvr_pin,
|
||||||
const ParasiticAnalysisPt *ap)
|
const ParasiticAnalysisPt *ap)
|
||||||
{
|
{
|
||||||
UniqueLock lock(lock_);
|
LockGuard lock(lock_);
|
||||||
ConcreteParasitic **parasitics = drvr_parasitic_map_[drvr_pin];
|
ConcreteParasitic **parasitics = drvr_parasitic_map_[drvr_pin];
|
||||||
if (parasitics) {
|
if (parasitics) {
|
||||||
int ap_index = ap->index();
|
int ap_index = ap->index();
|
||||||
|
|
@ -961,7 +961,7 @@ ConcreteParasitics::findPiElmore(const Pin *drvr_pin,
|
||||||
{
|
{
|
||||||
if (!drvr_parasitic_map_.empty()) {
|
if (!drvr_parasitic_map_.empty()) {
|
||||||
int ap_rf_index = parasiticAnalysisPtIndex(ap, rf);
|
int ap_rf_index = parasiticAnalysisPtIndex(ap, rf);
|
||||||
UniqueLock lock(lock_);
|
LockGuard lock(lock_);
|
||||||
ConcreteParasitic **parasitics = drvr_parasitic_map_.findKey(drvr_pin);
|
ConcreteParasitic **parasitics = drvr_parasitic_map_.findKey(drvr_pin);
|
||||||
if (parasitics) {
|
if (parasitics) {
|
||||||
ConcreteParasitic *parasitic = parasitics[ap_rf_index];
|
ConcreteParasitic *parasitic = parasitics[ap_rf_index];
|
||||||
|
|
@ -980,7 +980,7 @@ ConcreteParasitics::makePiElmore(const Pin *drvr_pin,
|
||||||
float rpi,
|
float rpi,
|
||||||
float c1)
|
float c1)
|
||||||
{
|
{
|
||||||
UniqueLock lock(lock_);
|
LockGuard lock(lock_);
|
||||||
ConcreteParasitic **parasitics = drvr_parasitic_map_.findKey(drvr_pin);
|
ConcreteParasitic **parasitics = drvr_parasitic_map_.findKey(drvr_pin);
|
||||||
if (parasitics == nullptr) {
|
if (parasitics == nullptr) {
|
||||||
int ap_count = corners_->parasiticAnalysisPtCount();
|
int ap_count = corners_->parasiticAnalysisPtCount();
|
||||||
|
|
@ -1077,7 +1077,7 @@ ConcreteParasitics::findPiPoleResidue(const Pin *drvr_pin,
|
||||||
{
|
{
|
||||||
if (!drvr_parasitic_map_.empty()) {
|
if (!drvr_parasitic_map_.empty()) {
|
||||||
int ap_rf_index = parasiticAnalysisPtIndex(ap, rf);
|
int ap_rf_index = parasiticAnalysisPtIndex(ap, rf);
|
||||||
UniqueLock lock(lock_);
|
LockGuard lock(lock_);
|
||||||
ConcreteParasitic **parasitics = drvr_parasitic_map_.findKey(drvr_pin);
|
ConcreteParasitic **parasitics = drvr_parasitic_map_.findKey(drvr_pin);
|
||||||
if (parasitics) {
|
if (parasitics) {
|
||||||
ConcreteParasitic *parasitic = parasitics[ap_rf_index];
|
ConcreteParasitic *parasitic = parasitics[ap_rf_index];
|
||||||
|
|
@ -1100,7 +1100,7 @@ ConcreteParasitics::makePiPoleResidue(const Pin *drvr_pin,
|
||||||
float rpi,
|
float rpi,
|
||||||
float c1)
|
float c1)
|
||||||
{
|
{
|
||||||
UniqueLock lock(lock_);
|
LockGuard lock(lock_);
|
||||||
ConcreteParasitic **parasitics = drvr_parasitic_map_.findKey(drvr_pin);
|
ConcreteParasitic **parasitics = drvr_parasitic_map_.findKey(drvr_pin);
|
||||||
if (parasitics == nullptr) {
|
if (parasitics == nullptr) {
|
||||||
int ap_count = corners_->parasiticAnalysisPtCount();
|
int ap_count = corners_->parasiticAnalysisPtCount();
|
||||||
|
|
@ -1194,7 +1194,7 @@ ConcreteParasitics::findParasiticNetwork(const Net *net,
|
||||||
const ParasiticAnalysisPt *ap) const
|
const ParasiticAnalysisPt *ap) const
|
||||||
{
|
{
|
||||||
if (!parasitic_network_map_.empty()) {
|
if (!parasitic_network_map_.empty()) {
|
||||||
UniqueLock lock(lock_);
|
LockGuard lock(lock_);
|
||||||
if (!parasitic_network_map_.empty()) {
|
if (!parasitic_network_map_.empty()) {
|
||||||
ConcreteParasiticNetwork **parasitics=parasitic_network_map_.findKey(net);
|
ConcreteParasiticNetwork **parasitics=parasitic_network_map_.findKey(net);
|
||||||
if (parasitics) {
|
if (parasitics) {
|
||||||
|
|
@ -1213,7 +1213,7 @@ ConcreteParasitics::findParasiticNetwork(const Pin *pin,
|
||||||
const ParasiticAnalysisPt *ap) const
|
const ParasiticAnalysisPt *ap) const
|
||||||
{
|
{
|
||||||
if (!parasitic_network_map_.empty()) {
|
if (!parasitic_network_map_.empty()) {
|
||||||
UniqueLock lock(lock_);
|
LockGuard lock(lock_);
|
||||||
if (!parasitic_network_map_.empty()) {
|
if (!parasitic_network_map_.empty()) {
|
||||||
// Only call findParasiticNet if parasitics exist.
|
// Only call findParasiticNet if parasitics exist.
|
||||||
const Net *net = findParasiticNet(pin);
|
const Net *net = findParasiticNet(pin);
|
||||||
|
|
@ -1234,7 +1234,7 @@ ConcreteParasitics::makeParasiticNetwork(const Net *net,
|
||||||
bool includes_pin_caps,
|
bool includes_pin_caps,
|
||||||
const ParasiticAnalysisPt *ap)
|
const ParasiticAnalysisPt *ap)
|
||||||
{
|
{
|
||||||
UniqueLock lock(lock_);
|
LockGuard lock(lock_);
|
||||||
ConcreteParasiticNetwork **parasitics = parasitic_network_map_.findKey(net);
|
ConcreteParasiticNetwork **parasitics = parasitic_network_map_.findKey(net);
|
||||||
if (parasitics == nullptr) {
|
if (parasitics == nullptr) {
|
||||||
int ap_count = corners_->parasiticAnalysisPtCount();
|
int ap_count = corners_->parasiticAnalysisPtCount();
|
||||||
|
|
@ -1260,7 +1260,7 @@ ConcreteParasitics::deleteParasiticNetwork(const Net *net,
|
||||||
const ParasiticAnalysisPt *ap)
|
const ParasiticAnalysisPt *ap)
|
||||||
{
|
{
|
||||||
if (!parasitic_network_map_.empty()) {
|
if (!parasitic_network_map_.empty()) {
|
||||||
UniqueLock lock(lock_);
|
LockGuard lock(lock_);
|
||||||
ConcreteParasiticNetwork **parasitics = parasitic_network_map_.findKey(net);
|
ConcreteParasiticNetwork **parasitics = parasitic_network_map_.findKey(net);
|
||||||
if (parasitics) {
|
if (parasitics) {
|
||||||
int ap_index = ap->index();
|
int ap_index = ap->index();
|
||||||
|
|
@ -1287,7 +1287,7 @@ void
|
||||||
ConcreteParasitics::deleteParasiticNetworks(const Net *net)
|
ConcreteParasitics::deleteParasiticNetworks(const Net *net)
|
||||||
{
|
{
|
||||||
if (!parasitic_network_map_.empty()) {
|
if (!parasitic_network_map_.empty()) {
|
||||||
UniqueLock lock(lock_);
|
LockGuard lock(lock_);
|
||||||
ConcreteParasiticNetwork **parasitics = parasitic_network_map_.findKey(net);
|
ConcreteParasiticNetwork **parasitics = parasitic_network_map_.findKey(net);
|
||||||
if (parasitics) {
|
if (parasitics) {
|
||||||
int ap_count = corners_->parasiticAnalysisPtCount();
|
int ap_count = corners_->parasiticAnalysisPtCount();
|
||||||
|
|
|
||||||
|
|
@ -2338,7 +2338,7 @@ CycleAccting *
|
||||||
Sdc::cycleAccting(const ClockEdge *src,
|
Sdc::cycleAccting(const ClockEdge *src,
|
||||||
const ClockEdge *tgt)
|
const ClockEdge *tgt)
|
||||||
{
|
{
|
||||||
UniqueLock lock(cycle_acctings_lock_);
|
LockGuard lock(cycle_acctings_lock_);
|
||||||
return cycle_acctings_.cycleAccting(src, tgt);
|
return cycle_acctings_.cycleAccting(src, tgt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,7 @@ BfsIterator::enqueue(Vertex *vertex)
|
||||||
debugPrint(debug_, "bfs", 2, "enqueue %s", vertex->name(sdc_network_));
|
debugPrint(debug_, "bfs", 2, "enqueue %s", vertex->name(sdc_network_));
|
||||||
if (!vertex->bfsInQueue(bfs_index_)) {
|
if (!vertex->bfsInQueue(bfs_index_)) {
|
||||||
Level level = vertex->level();
|
Level level = vertex->level();
|
||||||
UniqueLock lock(queue_lock_);
|
LockGuard lock(queue_lock_);
|
||||||
if (!vertex->bfsInQueue(bfs_index_)) {
|
if (!vertex->bfsInQueue(bfs_index_)) {
|
||||||
vertex->setBfsInQueue(bfs_index_, true);
|
vertex->setBfsInQueue(bfs_index_, true);
|
||||||
queue_[level].push_back(vertex);
|
queue_[level].push_back(vertex);
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ PathGroup::savable(PathEnd *path_end)
|
||||||
void
|
void
|
||||||
PathGroup::insert(PathEnd *path_end)
|
PathGroup::insert(PathEnd *path_end)
|
||||||
{
|
{
|
||||||
UniqueLock lock(lock_);
|
LockGuard lock(lock_);
|
||||||
path_ends_.push_back(path_end);
|
path_ends_.push_back(path_end);
|
||||||
if (group_count_ != group_count_max
|
if (group_count_ != group_count_max
|
||||||
&& static_cast<int>(path_ends_.size()) > group_count_ * 2)
|
&& static_cast<int>(path_ends_.size()) > group_count_ * 2)
|
||||||
|
|
@ -190,7 +190,7 @@ PathGroup::sort()
|
||||||
void
|
void
|
||||||
PathGroup::clear()
|
PathGroup::clear()
|
||||||
{
|
{
|
||||||
UniqueLock lock(lock_);
|
LockGuard lock(lock_);
|
||||||
threshold_ = min_max_->initValue();
|
threshold_ = min_max_->initValue();
|
||||||
path_ends_.clear();
|
path_ends_.clear();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -748,7 +748,7 @@ Search::arrivalInvalid(Vertex *vertex)
|
||||||
vertex->name(sdc_network_));
|
vertex->name(sdc_network_));
|
||||||
if (!arrival_iter_->inQueue(vertex)) {
|
if (!arrival_iter_->inQueue(vertex)) {
|
||||||
// Lock for StaDelayCalcObserver called by delay calc threads.
|
// Lock for StaDelayCalcObserver called by delay calc threads.
|
||||||
UniqueLock lock(invalid_arrivals_lock_);
|
LockGuard lock(invalid_arrivals_lock_);
|
||||||
invalid_arrivals_->insert(vertex);
|
invalid_arrivals_->insert(vertex);
|
||||||
}
|
}
|
||||||
tnsInvalid(vertex);
|
tnsInvalid(vertex);
|
||||||
|
|
@ -818,7 +818,7 @@ Search::requiredInvalid(Vertex *vertex)
|
||||||
vertex->name(sdc_network_));
|
vertex->name(sdc_network_));
|
||||||
if (!required_iter_->inQueue(vertex)) {
|
if (!required_iter_->inQueue(vertex)) {
|
||||||
// Lock for StaDelayCalcObserver called by delay calc threads.
|
// Lock for StaDelayCalcObserver called by delay calc threads.
|
||||||
UniqueLock lock(invalid_arrivals_lock_);
|
LockGuard lock(invalid_arrivals_lock_);
|
||||||
invalid_requireds_->insert(vertex);
|
invalid_requireds_->insert(vertex);
|
||||||
}
|
}
|
||||||
tnsInvalid(vertex);
|
tnsInvalid(vertex);
|
||||||
|
|
@ -1379,7 +1379,7 @@ Search::enqueueLatchDataOutputs(Vertex *vertex)
|
||||||
Edge *out_edge = out_edge_iter.next();
|
Edge *out_edge = out_edge_iter.next();
|
||||||
if (latches_->isLatchDtoQ(out_edge)) {
|
if (latches_->isLatchDtoQ(out_edge)) {
|
||||||
Vertex *out_vertex = out_edge->to(graph_);
|
Vertex *out_vertex = out_edge->to(graph_);
|
||||||
UniqueLock lock(pending_latch_outputs_lock_);
|
LockGuard lock(pending_latch_outputs_lock_);
|
||||||
pending_latch_outputs_->insert(out_vertex);
|
pending_latch_outputs_->insert(out_vertex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2623,7 +2623,7 @@ TagGroup *
|
||||||
Search::findTagGroup(TagGroupBldr *tag_bldr)
|
Search::findTagGroup(TagGroupBldr *tag_bldr)
|
||||||
{
|
{
|
||||||
TagGroup probe(tag_bldr);
|
TagGroup probe(tag_bldr);
|
||||||
UniqueLock lock(tag_group_lock_);
|
LockGuard lock(tag_group_lock_);
|
||||||
TagGroup *tag_group = tag_group_set_->findKey(&probe);
|
TagGroup *tag_group = tag_group_set_->findKey(&probe);
|
||||||
if (tag_group == nullptr) {
|
if (tag_group == nullptr) {
|
||||||
TagGroupIndex tag_group_index;
|
TagGroupIndex tag_group_index;
|
||||||
|
|
@ -2853,7 +2853,7 @@ Search::findTag(const RiseFall *rf,
|
||||||
{
|
{
|
||||||
Tag probe(0, rf->index(), path_ap->index(), clk_info, is_clk, input_delay,
|
Tag probe(0, rf->index(), path_ap->index(), clk_info, is_clk, input_delay,
|
||||||
is_segment_start, states, false, this);
|
is_segment_start, states, false, this);
|
||||||
UniqueLock lock(tag_lock_);
|
LockGuard lock(tag_lock_);
|
||||||
Tag *tag = tag_set_->findKey(&probe);
|
Tag *tag = tag_set_->findKey(&probe);
|
||||||
if (tag == nullptr) {
|
if (tag == nullptr) {
|
||||||
ExceptionStateSet *new_states = !own_states && states
|
ExceptionStateSet *new_states = !own_states && states
|
||||||
|
|
@ -2944,7 +2944,7 @@ Search::findClkInfo(const ClockEdge *clk_edge,
|
||||||
ClkInfo probe(clk_edge, clk_src, is_propagated, gen_clk_src, gen_clk_src_path,
|
ClkInfo probe(clk_edge, clk_src, is_propagated, gen_clk_src, gen_clk_src_path,
|
||||||
pulse_clk_sense, insertion, latency, uncertainties,
|
pulse_clk_sense, insertion, latency, uncertainties,
|
||||||
path_ap->index(), crpr_clk_path_rep, this);
|
path_ap->index(), crpr_clk_path_rep, this);
|
||||||
UniqueLock lock(clk_info_lock_);
|
LockGuard lock(clk_info_lock_);
|
||||||
ClkInfo *clk_info = clk_info_set_->findKey(&probe);
|
ClkInfo *clk_info = clk_info_set_->findKey(&probe);
|
||||||
if (clk_info == nullptr) {
|
if (clk_info == nullptr) {
|
||||||
clk_info = new ClkInfo(clk_edge, clk_src,
|
clk_info = new ClkInfo(clk_edge, clk_src,
|
||||||
|
|
@ -3718,7 +3718,7 @@ Search::tnsInvalid(Vertex *vertex)
|
||||||
&& isEndpoint(vertex)) {
|
&& isEndpoint(vertex)) {
|
||||||
debugPrint(debug_, "tns", 2, "tns invalid %s",
|
debugPrint(debug_, "tns", 2, "tns invalid %s",
|
||||||
vertex->name(sdc_network_));
|
vertex->name(sdc_network_));
|
||||||
UniqueLock lock(tns_lock_);
|
LockGuard lock(tns_lock_);
|
||||||
invalid_tns_->insert(vertex);
|
invalid_tns_->insert(vertex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ Sim::functionSense(const FuncExpr *expr,
|
||||||
expr->asString());
|
expr->asString());
|
||||||
bool increasing, decreasing;
|
bool increasing, decreasing;
|
||||||
{
|
{
|
||||||
UniqueLock lock(bdd_lock_);
|
LockGuard lock(bdd_lock_);
|
||||||
DdNode *bdd = funcBddSim(expr, inst);
|
DdNode *bdd = funcBddSim(expr, inst);
|
||||||
DdManager *cudd_mgr = bdd_.cuddMgr();
|
DdManager *cudd_mgr = bdd_.cuddMgr();
|
||||||
LibertyPort *input_port = network_->libertyPort(input_pin);
|
LibertyPort *input_port = network_->libertyPort(input_pin);
|
||||||
|
|
@ -111,7 +111,7 @@ LogicValue
|
||||||
Sim::evalExpr(const FuncExpr *expr,
|
Sim::evalExpr(const FuncExpr *expr,
|
||||||
const Instance *inst)
|
const Instance *inst)
|
||||||
{
|
{
|
||||||
UniqueLock lock(bdd_lock_);
|
LockGuard lock(bdd_lock_);
|
||||||
DdNode *bdd = funcBddSim(expr, inst);
|
DdNode *bdd = funcBddSim(expr, inst);
|
||||||
LogicValue value = LogicValue::unknown;
|
LogicValue value = LogicValue::unknown;
|
||||||
DdManager *cudd_mgr = bdd_.cuddMgr();
|
DdManager *cudd_mgr = bdd_.cuddMgr();
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ WorstSlack::WorstSlack(const WorstSlack &worst_slack) :
|
||||||
void
|
void
|
||||||
WorstSlack::deleteVertexBefore(Vertex *vertex)
|
WorstSlack::deleteVertexBefore(Vertex *vertex)
|
||||||
{
|
{
|
||||||
UniqueLock lock(lock_);
|
LockGuard lock(lock_);
|
||||||
if (vertex == worst_vertex_) {
|
if (vertex == worst_vertex_) {
|
||||||
worst_vertex_ = nullptr;
|
worst_vertex_ = nullptr;
|
||||||
worst_slack_ = slack_init_;
|
worst_slack_ = slack_init_;
|
||||||
|
|
@ -269,7 +269,7 @@ WorstSlack::updateWorstSlack(Vertex *vertex,
|
||||||
|
|
||||||
// Locking is required because ArrivalVisitor is called by multiple
|
// Locking is required because ArrivalVisitor is called by multiple
|
||||||
// threads.
|
// threads.
|
||||||
UniqueLock lock(lock_);
|
LockGuard lock(lock_);
|
||||||
if (worst_vertex_
|
if (worst_vertex_
|
||||||
&& delayLess(slack, worst_slack_, this))
|
&& delayLess(slack, worst_slack_, this))
|
||||||
setWorstSlack(vertex, slack);
|
setWorstSlack(vertex, slack);
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ getTmpString(// Return values.
|
||||||
char *&str,
|
char *&str,
|
||||||
size_t &length)
|
size_t &length)
|
||||||
{
|
{
|
||||||
UniqueLock lock(string_lock_);
|
LockGuard lock(string_lock_);
|
||||||
if (tmp_string_next_ == tmp_string_count_)
|
if (tmp_string_next_ == tmp_string_count_)
|
||||||
tmp_string_next_ = 0;
|
tmp_string_next_ = 0;
|
||||||
str = tmp_strings_[tmp_string_next_];
|
str = tmp_strings_[tmp_string_next_];
|
||||||
|
|
@ -202,7 +202,7 @@ getTmpString(// Return values.
|
||||||
char *
|
char *
|
||||||
makeTmpString(size_t length)
|
makeTmpString(size_t length)
|
||||||
{
|
{
|
||||||
UniqueLock lock(string_lock_);
|
LockGuard lock(string_lock_);
|
||||||
if (tmp_string_next_ == tmp_string_count_)
|
if (tmp_string_next_ == tmp_string_count_)
|
||||||
tmp_string_next_ = 0;
|
tmp_string_next_ = 0;
|
||||||
char *tmp_str = tmp_strings_[tmp_string_next_];
|
char *tmp_str = tmp_strings_[tmp_string_next_];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue