diff --git a/src/psm/src/ir_network.cpp b/src/psm/src/ir_network.cpp index 343d3e871ec..5e46a78e080 100644 --- a/src/psm/src/ir_network.cpp +++ b/src/psm/src/ir_network.cpp @@ -283,24 +283,39 @@ IRNetwork::generatePolygonsFromITerms(std::vector& terminals) } if (geom->isVia()) { - continue; - } + for (const auto& [layer, shapes] : pin_shapes) { + std::vector via_rects; + shapes.get_rectangles(via_rects); + for (const auto& pin_shape : via_rects) { + has_routing_term = true; - auto* layer = geom->getTechLayer(); + // create iterm nodes + auto center = std::make_unique(pin_shape, layer); + terminals.push_back(center.get()); - has_routing_term = true; + connections_.push_back(std::make_unique( + base_node.get(), center.get())); - odb::Rect pin_shape = geom->getBox(); - transform.apply(pin_shape); + nodes_[layer].push_back(std::move(center)); + } + } + } else { + auto* layer = geom->getTechLayer(); - // create iterm nodes - auto center = std::make_unique(pin_shape, layer); - terminals.push_back(center.get()); + has_routing_term = true; - connections_.push_back( - std::make_unique(base_node.get(), center.get())); + odb::Rect pin_shape = geom->getBox(); + transform.apply(pin_shape); - nodes_[layer].push_back(std::move(center)); + // create iterm nodes + auto center = std::make_unique(pin_shape, layer); + terminals.push_back(center.get()); + + connections_.push_back( + std::make_unique(base_node.get(), center.get())); + + nodes_[layer].push_back(std::move(center)); + } } }