saif: fix false negatives when searching for a child instance (#231)

This commit is contained in:
Mateusz Gancarz 2025-04-08 12:34:07 -07:00 committed by GitHub
parent 4781e5b692
commit 5bb4d58d69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -131,7 +131,7 @@ SaifReader::instancePush(const char *instance_name)
bool first = true; bool first = true;
for (string &inst : saif_scope_) { for (string &inst : saif_scope_) {
if (!first) if (!first)
saif_scope += network_->pathDivider(); saif_scope += sdc_network_->pathDivider();
saif_scope += inst; saif_scope += inst;
first = false; first = false;
} }
@ -140,8 +140,8 @@ SaifReader::instancePush(const char *instance_name)
} }
else { else {
// Inside annotation scope. // Inside annotation scope.
Instance *parent = path_.empty() ? network_->topInstance() : path_.back(); Instance *parent = path_.empty() ? sdc_network_->topInstance() : path_.back();
Instance *child = network_->findChild(parent, instance_name); Instance *child = sdc_network_->findChild(parent, instance_name);
path_.push_back(child); path_.push_back(child);
} }
stringDelete(instance_name); stringDelete(instance_name);
@ -163,7 +163,7 @@ SaifReader::setNetDurations(const char *net_name,
SaifStateDurations &durations) SaifStateDurations &durations)
{ {
if (in_scope_level_ > 0) { if (in_scope_level_ > 0) {
Instance *parent = path_.empty() ? network_->topInstance() : path_.back(); Instance *parent = path_.empty() ? sdc_network_->topInstance() : path_.back();
if (parent) { if (parent) {
string unescaped_name = unescaped(net_name); string unescaped_name = unescaped(net_name);
const Pin *pin = sdc_network_->findPin(parent, unescaped_name.c_str()); const Pin *pin = sdc_network_->findPin(parent, unescaped_name.c_str());