Promote net names to higher in hierarchy when possible

This commit is contained in:
Jon Evans 2019-05-07 21:59:36 -04:00
parent 81993eef83
commit 1de5b83d82
1 changed files with 6 additions and 1 deletions

View File

@ -1613,7 +1613,12 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph )
CONNECTION_SUBGRAPH::PRIORITY priority =
CONNECTION_SUBGRAPH::GetDriverPriority( subgraph->m_driver );
if( priority >= CONNECTION_SUBGRAPH::PRIORITY_POWER_PIN )
// Upgrade driver to be this subgraph if this subgraph has a power pin or global
// Also upgrade if we found something with a shorter sheet path (higher in hierarchy)
// but with an equivalent priority
if( ( priority >= CONNECTION_SUBGRAPH::PRIORITY_POWER_PIN ) ||
( priority >= highest && subgraph->m_sheet.size() < aSubgraph->m_sheet.size() ) )
driver = subgraph;
}
}