Skip to content

Commit c2f66ae

Browse files
authored
Merge pull request #863 from os-fpga/checker_improve_runtime_1
checker: improve runtime step 1
2 parents 111eae0 + 326a76c commit c2f66ae

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

planning/src/file_io/pln_blif_file.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,18 +1326,19 @@ bool BLIF_file::createNodes() noexcept {
13261326
int BLIF_file::BNode::in_contact(const string& x) const noexcept {
13271327
if (x.empty() or data_.empty()) return -1;
13281328
size_t dsz = data_.size();
1329-
if (dsz == 1) return x == data_.front();
1330-
for (size_t i = 0; i < dsz - 1; i++) {
1331-
assert(not data_[i].empty());
1332-
CStr cs = data_[i].c_str();
1333-
CStr p = ::strrchr(cs, '=');
1334-
if (p)
1335-
p++;
1336-
else
1337-
p = cs;
1338-
if (x == p) // compare the part afer '='
1329+
if (dsz == 1)
1330+
return x == data_.front();
1331+
size_t ssz =inSigs_.size();
1332+
if (!ssz)
1333+
return -1;
1334+
assert(ssz < dsz);
1335+
for (size_t i = 0; i < ssz; i++) {
1336+
const string& sig = inSigs_[i];
1337+
assert(not sig.empty());
1338+
if (x == sig)
13391339
return i;
13401340
}
1341+
13411342
return -1;
13421343
}
13431344

planning/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
static const char* _pln_VERSION_STR = "pln0341";
1+
static const char* _pln_VERSION_STR = "pln0342";
22

33
#include "RS/rsEnv.h"
44
#include "util/pln_log.h"

0 commit comments

Comments
 (0)