Skip to content

Commit 7e40461

Browse files
authored
Merge pull request #9132 from gadfort/psm-minimize-runtime-floorplanning
psm: merge all nodes on shapes during floorplanning
2 parents 58f4386 + b15acb9 commit 7e40461

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/psm/src/ir_network.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -367,13 +367,6 @@ void IRNetwork::processPolygonToRectangles(
367367
std::vector<std::unique_ptr<Node>>& new_nodes,
368368
std::map<Shape*, std::set<Node*>>& terminal_connections)
369369
{
370-
const utl::DebugScopedTimer timer(
371-
logger_,
372-
utl::PSM,
373-
"timer",
374-
2,
375-
fmt::format("Convert polygons to nodes {}: {{}}", layer->getName()));
376-
377370
using boost::polygon::operators::operator+=;
378371

379372
auto get_layer_orientation
@@ -588,7 +581,8 @@ void IRNetwork::generateCutNodesForSBox(
588581
}
589582

590583
const int min_pitch = std::min(min_node_pitch_[bottom], min_node_pitch_[top]);
591-
const bool use_single_via = box->getBox().maxDXDY() < min_pitch;
584+
const bool use_single_via
585+
= floorplanning_ || box->getBox().maxDXDY() < min_pitch;
592586

593587
if (single_via || use_single_via) {
594588
const odb::Point via_center = box->getViaXY();
@@ -689,6 +683,11 @@ void IRNetwork::generateCutLayerNodes()
689683

690684
void IRNetwork::generateTopLayerFillerNodes()
691685
{
686+
if (floorplanning_) {
687+
// these are only needed if running for IR drop.
688+
return;
689+
}
690+
692691
const utl::DebugScopedTimer timer(
693692
logger_, utl::PSM, "timer", 1, "Generate top layer filler nodes: {}");
694693
// needed in case of vsrc
@@ -747,7 +746,9 @@ void IRNetwork::mergeNodes(NodePtrMap<Connection>& connection_map)
747746

748747
const auto node_trees = getNodeTree(layer);
749748
for (const auto& shape : shapes) {
750-
const int min_distance = min_node_pitch_[shape->getLayer()];
749+
const int min_distance = floorplanning_
750+
? (2 * shape->getShape().maxDXDY())
751+
: min_node_pitch_[shape->getLayer()];
751752
const auto shape_remove = shape->cleanupNodes(
752753
min_distance,
753754
node_trees,

0 commit comments

Comments
 (0)