@@ -915,38 +915,56 @@ bool Opendp::checkPixels(const Node* cell,
915915 return false ;
916916 }
917917 }
918- if (disallow_one_site_gaps_) {
919- // here we need to check for abutting first, if there is an abutting
920- // cell then we continue as there is nothing wrong with it if there is
921- // no abutting cell, we will then check cells at 1+ distances we only
922- // need to check on the left and right sides
923- const GridX x_begin = max (GridX{0 }, x - 1 );
924- const GridY y_begin = max (GridY{0 }, y - 1 );
925- // inclusive search, so we don't add 1 to the end
926- const GridX x_finish = min (x_end, grid_->getRowSiteCount () - 1 );
927- const GridY y_finish = min (y_end, grid_->getRowCount () - 1 );
928-
929- auto isAbutted = [this ](const GridX x, const GridY y) {
930- const Pixel* pixel = grid_->gridPixel (x, y);
931- return (pixel == nullptr || pixel->cell );
932- };
933-
934- auto cellAtSite = [this ](const GridX x, const GridY y) {
935- const Pixel* pixel = grid_->gridPixel (x, y);
936- return (pixel != nullptr && pixel->cell );
937- };
938- for (GridY y = y_begin; y <= y_finish; ++y) {
939- // left side
940- if (!isAbutted (x_begin, y) && cellAtSite (x_begin - 1 , y)) {
941- return false ;
942- }
943- // right side
944- if (!isAbutted (x_finish, y) && cellAtSite (x_finish + 1 , y)) {
945- return false ;
946- }
918+ }
919+
920+ if (disallow_one_site_gaps_) {
921+ // here we need to check for abutting first, if there is an abutting
922+ // cell then we continue as there is nothing wrong with it if there is
923+ // no abutting cell, we will then check cells at 1+ distances we only
924+ // need to check on the left and right sides
925+ const GridX x_begin = max (GridX{0 }, x - 1 );
926+ const GridY y_begin = max (GridY{0 }, y);
927+ // inclusive search, so we don't add 1 to the end
928+ const GridX x_finish = min (x_end, grid_->getRowSiteCount () - 1 );
929+ const GridY y_finish = min (y_end, grid_->getRowCount () - 1 );
930+
931+ auto isAbutted = [this ](const GridX x, const GridY y) {
932+ const Pixel* pixel = grid_->gridPixel (x, y);
933+ return (pixel == nullptr || pixel->cell );
934+ };
935+
936+ auto cellAtSite = [this ](const GridX x, const GridY y) {
937+ const Pixel* pixel = grid_->gridPixel (x, y);
938+ return (pixel != nullptr && pixel->cell );
939+ };
940+ for (GridY y = y_begin; y < y_finish; ++y) {
941+ // left side
942+ if (!isAbutted (x_begin, y) && cellAtSite (x_begin - 1 , y)) {
943+ debugPrint (logger_,
944+ DPL,
945+ " one_site_gap" ,
946+ 1 ,
947+ " One site gap left of {} at ({}, {})" ,
948+ cell->name (),
949+ x,
950+ y);
951+ return false ;
952+ }
953+ // right side
954+ if (!isAbutted (x_finish, y) && cellAtSite (x_finish + 1 , y)) {
955+ debugPrint (logger_,
956+ DPL,
957+ " one_site_gap" ,
958+ 1 ,
959+ " One site gap right of {} at ({}, {})" ,
960+ cell->name (),
961+ x,
962+ y);
963+ return false ;
947964 }
948965 }
949966 }
967+
950968 const auto orient = grid_->getSiteOrientation (x, y, site).value ();
951969 return drc_engine_->checkDRC (cell, x, y, orient);
952970}
0 commit comments