mirror of
https://github.com/The-OpenROAD-Project/OpenSTA.git
synced 2026-08-22 14:06:56 +02:00
Merge branch 'master' of https://github.com/The-OpenROAD-Project-private/OpenSTA into secure-test-suite-cleanup
Signed-off-by: Jaehyun Kim <[email protected]>
This commit is contained in:
+9
-5
@@ -86,7 +86,9 @@ parseBusName(std::string_view name,
|
|||||||
if (brkt_index != std::string_view::npos) {
|
if (brkt_index != std::string_view::npos) {
|
||||||
char brkt_left_ch = brkts_left[brkt_index];
|
char brkt_left_ch = brkts_left[brkt_index];
|
||||||
size_t left = name.rfind(brkt_left_ch);
|
size_t left = name.rfind(brkt_left_ch);
|
||||||
if (left != std::string_view::npos) {
|
if (left != std::string_view::npos
|
||||||
|
&& left + 1 < len
|
||||||
|
&& isdigit(name[left + 1])) {
|
||||||
is_bus = true;
|
is_bus = true;
|
||||||
bus_name.append(name.data(), left);
|
bus_name.append(name.data(), left);
|
||||||
// Simple bus subscript.
|
// Simple bus subscript.
|
||||||
@@ -140,9 +142,14 @@ parseBusName(std::string_view name,
|
|||||||
if (brkt_index != std::string_view::npos) {
|
if (brkt_index != std::string_view::npos) {
|
||||||
char brkt_left_ch = brkts_left[brkt_index];
|
char brkt_left_ch = brkts_left[brkt_index];
|
||||||
size_t left = name.rfind(brkt_left_ch);
|
size_t left = name.rfind(brkt_left_ch);
|
||||||
if (left != std::string_view::npos) {
|
if (left != std::string_view::npos
|
||||||
|
&& left + 1 < len
|
||||||
|
&& (isdigit(name[left + 1]) || name[left + 1] == '*')) {
|
||||||
is_bus = true;
|
is_bus = true;
|
||||||
bus_name.append(name.data(), left);
|
bus_name.append(name.data(), left);
|
||||||
|
if (name[left + 1] == '*')
|
||||||
|
subscript_wild = true;
|
||||||
|
else {
|
||||||
// Check for bus range.
|
// Check for bus range.
|
||||||
size_t range = name.find(':', left);
|
size_t range = name.find(':', left);
|
||||||
if (range != std::string_view::npos) {
|
if (range != std::string_view::npos) {
|
||||||
@@ -150,9 +157,6 @@ parseBusName(std::string_view name,
|
|||||||
from = std::stoi(std::string(name.substr(left + 1)));
|
from = std::stoi(std::string(name.substr(left + 1)));
|
||||||
to = std::stoi(std::string(name.substr(range + 1)));
|
to = std::stoi(std::string(name.substr(range + 1)));
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
if (left + 1 < len && name[left + 1] == '*')
|
|
||||||
subscript_wild = true;
|
|
||||||
else
|
else
|
||||||
from = to = std::stoi(std::string(name.substr(left + 1)));
|
from = to = std::stoi(std::string(name.substr(left + 1)));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user