Skip to content

Commit b7d5429

Browse files
committed
In hierarchicalConnect(), removed hierarchical delimiter in connection_name.
It prevents weird terminal name with the delimiter. Signed-off-by: Jaehyun Kim <[email protected]>
1 parent 4036110 commit b7d5429

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/dbSta/src/dbNetwork.cc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3623,8 +3623,16 @@ void dbNetwork::hierarchicalConnect(dbITerm* source_pin,
36233623
{
36243624
assert(source_pin != nullptr);
36253625
assert(dest_pin != nullptr);
3626-
// Connection name should be a base name (not a full name).
3627-
assert(strchr(connection_name, block()->getHierarchyDelimiter()) == nullptr);
3626+
3627+
// If connect_name contains the hierarchy delimiter, use the partial string
3628+
// after the last occurrence of the hierarchy delimiter.
3629+
// This prevents a very long term/net name creation when the connection_name
3630+
// begins with a back-slackslash as "\soc/module1/instance_a/.../clk_port"
3631+
const char* last_hier_delimiter
3632+
= strrchr(connection_name, block()->getHierarchyDelimiter());
3633+
if (last_hier_delimiter != nullptr) {
3634+
connection_name = last_hier_delimiter + 1;
3635+
}
36283636

36293637
dlogHierConnStart(source_pin, dest_pin, connection_name);
36303638

0 commit comments

Comments
 (0)