Skip to content

Commit

Permalink
Merge pull request The-OpenROAD-Project#5609 from gadfort/psm-handle-…
Browse files Browse the repository at this point in the history
…pin-vias

psm: extract nodes from vias in pin shapes
  • Loading branch information
maliberty authored Aug 17, 2024
2 parents 984248a + b4ca342 commit 488648a
Showing 1 changed file with 27 additions and 12 deletions.
39 changes: 27 additions & 12 deletions src/psm/src/ir_network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,24 +283,39 @@ IRNetwork::generatePolygonsFromITerms(std::vector<TerminalNode*>& terminals)
}

if (geom->isVia()) {
continue;
}
for (const auto& [layer, shapes] : pin_shapes) {
std::vector<odb::Rect> 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<TerminalNode>(pin_shape, layer);
terminals.push_back(center.get());

has_routing_term = true;
connections_.push_back(std::make_unique<TermConnection>(
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<TerminalNode>(pin_shape, layer);
terminals.push_back(center.get());
has_routing_term = true;

connections_.push_back(
std::make_unique<TermConnection>(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<TerminalNode>(pin_shape, layer);
terminals.push_back(center.get());

connections_.push_back(
std::make_unique<TermConnection>(base_node.get(), center.get()));

nodes_[layer].push_back(std::move(center));
}
}
}

Expand Down

0 comments on commit 488648a

Please sign in to comment.