non-determinism in required times resolves orfs #3046

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2025-05-01 17:34:51 -07:00
parent c1102db00e
commit 7e5cf1326b
4 changed files with 23 additions and 54 deletions

View File

@ -217,15 +217,14 @@ private:
void findNext();
const Search *search_;
//bool filtered_;
bool filtered_;
const RiseFall *rf_;
const PathAnalysisPt *path_ap_;
const MinMax *min_max_;
Path *paths_;
size_t path_count_;
//size_t path_index_;
size_t path_index_;
Path *next_;
PathIndexMap::Iterator path_iter_;
};
} // namespace

View File

@ -115,7 +115,7 @@ typedef StringSet PathGroupNameSet;
typedef Vector<PathEnd*> PathEndSeq;
typedef Vector<Arrival> ArrivalSeq;
typedef Map<Vertex*, size_t> VertexPathCountMap;
typedef UnorderedMap<Tag*, size_t, TagMatchHash, TagMatchEqual> PathIndexMap;
typedef Map<Tag*, size_t, TagMatchLess> PathIndexMap;
typedef Vector<Slack> SlackSeq;
typedef Delay Crpr;
typedef Vector<Path*> PathSeq;

View File

@ -697,19 +697,18 @@ Path::lessAll(const Path *path1,
VertexPathIterator::VertexPathIterator(Vertex *vertex,
const StaState *sta) :
search_(sta->search()),
//filtered_(false),
filtered_(false),
rf_(nullptr),
path_ap_(nullptr),
min_max_(nullptr),
paths_(vertex->paths()),
path_count_(0),
//path_index_(0),
path_index_(0),
next_(nullptr)
{
TagGroup *tag_group = search_->tagGroup(vertex);
if (tag_group) {
path_count_ = tag_group->pathCount();
path_iter_.init(tag_group->pathIndexMap());
findNext();
}
}
@ -721,19 +720,18 @@ VertexPathIterator::VertexPathIterator(Vertex *vertex,
const PathAnalysisPt *path_ap,
const StaState *sta) :
search_(sta->search()),
//filtered_(true),
filtered_(true),
rf_(rf),
path_ap_(path_ap),
min_max_(nullptr),
paths_(vertex->paths()),
//path_count_(0),
//path_index_(0),
path_count_(0),
path_index_(0),
next_(nullptr)
{
TagGroup *tag_group = search_->tagGroup(vertex);
if (tag_group) {
path_count_ = tag_group->pathCount();
path_iter_.init(tag_group->pathIndexMap());
findNext();
}
}
@ -743,19 +741,18 @@ VertexPathIterator::VertexPathIterator(Vertex *vertex,
const MinMax *min_max,
const StaState *sta) :
search_(sta->search()),
//filtered_(true),
filtered_(true),
rf_(rf),
path_ap_(nullptr),
min_max_(min_max),
paths_(vertex->paths()),
//path_count_(0),
//path_index_(0),
path_count_(0),
path_index_(0),
next_(nullptr)
{
TagGroup *tag_group = search_->tagGroup(vertex);
if (tag_group) {
path_count_ = tag_group->pathCount();
path_iter_.init(tag_group->pathIndexMap());
findNext();
}
}
@ -766,34 +763,22 @@ VertexPathIterator::VertexPathIterator(Vertex *vertex,
const MinMax *min_max,
const StaState *sta) :
search_(sta->search()),
//filtered_(true),
filtered_(true),
rf_(rf),
path_ap_(path_ap),
min_max_(min_max),
paths_(vertex->paths()),
//path_count_(0),
//path_index_(0),
path_count_(0),
path_index_(0),
next_(nullptr)
{
TagGroup *tag_group = search_->tagGroup(vertex);
if (tag_group) {
path_count_ = tag_group->pathCount();
path_iter_.init(tag_group->pathIndexMap());
findNext();
}
}
VertexPathIterator::~VertexPathIterator()
{
}
bool
VertexPathIterator::hasNext()
{
return next_ != nullptr;
}
#if 0
void
VertexPathIterator::findNext()
{
@ -818,26 +803,15 @@ VertexPathIterator::findNext()
}
next_ = nullptr;
}
#endif
void
VertexPathIterator::findNext()
VertexPathIterator::~VertexPathIterator()
{
while (path_iter_.hasNext()) {
Tag *tag;
size_t path_index;
path_iter_.next(tag, path_index);
if ((rf_ == nullptr
|| tag->rfIndex() == rf_->index())
&& (path_ap_ == nullptr
|| tag->pathAPIndex() == path_ap_->index())
&& (min_max_ == nullptr
|| tag->pathAnalysisPt(search_)->pathMinMax() == min_max_)) {
next_ = &paths_[path_index];
return;
}
}
next_ = nullptr;
}
bool
VertexPathIterator::hasNext()
{
return next_ != nullptr;
}
Path *

View File

@ -131,9 +131,7 @@ TagGroupBldr::TagGroupBldr(bool match_crpr_clk_pin,
default_path_count_(sta->corners()->count()
* RiseFall::index_count
* MinMax::index_count),
path_index_map_(default_path_count_,
TagMatchHash(match_crpr_clk_pin, sta),
TagMatchEqual(match_crpr_clk_pin, sta)),
path_index_map_(TagMatchLess(match_crpr_clk_pin, sta)),
paths_(default_path_count_),
has_clk_tag_(false),
has_genclk_src_tag_(false),
@ -284,9 +282,7 @@ TagGroupBldr::makeTagGroup(TagGroupIndex index,
PathIndexMap *
TagGroupBldr::makePathIndexMap(const StaState *sta)
{
PathIndexMap *path_index_map = new PathIndexMap(path_index_map_.size(),
TagMatchHash(true, sta),
TagMatchEqual(true, sta));
PathIndexMap *path_index_map = new PathIndexMap(TagMatchLess(true, sta));
size_t path_index = 0;
for (auto const [tag, path_index1] : path_index_map_) {