File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -321,15 +321,23 @@ int Connect::getMaxEnclosureFromCutLayer(odb::dbTechLayer* layer,
321321 for (auto * rule : tech_vias_) {
322322 bool use = false ;
323323 int max_size = 0 ;
324+ int max_via_size = 0 ;
325+ int cnt_vias = 0 ;
324326 for (auto * box : rule->getBoxes ()) {
325- use |= box->getTechLayer () == layer;
326-
327327 odb::Rect rect = box->getBox ();
328+
329+ if (box->getTechLayer () == layer) {
330+ use = true ;
331+ cnt_vias += 1 ;
332+ max_via_size = std::max (max_via_size, static_cast <int >(rect.maxDXDY ()));
333+ }
334+
328335 max_size = std::max (max_size, static_cast <int >(rect.maxDXDY ()));
329336 }
330337
331- if (use) {
332- max_enclosure = std::max (max_enclosure, (max_size - min_width) / 2 );
338+ if (use && cnt_vias == 1 ) {
339+ max_enclosure
340+ = std::max (max_enclosure, (max_size - max_via_size - min_width) / 2 );
333341 }
334342 }
335343
You can’t perform that action at this time.
0 commit comments