@@ -639,46 +639,95 @@ std::pair<int32_t, int32_t> HGCalCell::cellType(
639639 cellt = HGCalCell::LDPartial1415Cell;
640640 } else if (u == 15 && v == 15 ) {
641641 cellt = HGCalCell::LDPartial1515Cell;
642+ } else if (u == 1 && v == 8 ) {
643+ cellt = HGCalCell::halfCell;
644+ cellx = HGCalCell::leftCell;
645+ } else if (u == 15 && v == 11 ) {
646+ if (partialType == HGCalTypes::WaferLDLeft) {
647+ cellt = HGCalCell::extHalfExtCell;
648+ cellx = HGCalCell::leftCell;
649+ } else if (partialType == HGCalTypes::WaferLDRight) {
650+ cellt = HGCalCell::extHalfExtCell;
651+ cellx = HGCalCell::rightCell;
652+ } else {
653+ cellt = HGCalCell::extExtCellCenCut;
654+ }
655+ } else if ((u == 0 ) && (v == 3 || v == 4 )) {
656+ if (v == 3 ) {
657+ cellt = HGCalCell::extTrunCellEdgeCut;
658+ cellx = HGCalCell::leftCell;
659+ } else if (v == 4 ) {
660+ cellt = HGCalCell::extTrunCellEdgeCut;
661+ cellx = HGCalCell::rightCell;
662+ }
642663 } else if (u == 7 ) {
643- cellt = HGCalCell::extendedCell;
644- cellx = HGCalCell::topCell;
645- } else if (u == 8 ) {
646- cellt = HGCalCell::truncatedCell;
647- cellx = HGCalCell::bottomCell;
648- } else if ((partialType == HGCalTypes::WaferLDLeft) || (partialType == HGCalTypes::WaferLDRight) ||
649- (partialType == HGCalTypes::WaferLDFive) || (partialType == HGCalTypes::WaferLDThree)) {
650- if (((u == 15 && v == 11 ) || (u == 7 && v == 7 )) &&
651- ((partialType == HGCalTypes::WaferLDLeft) || (partialType == HGCalTypes::WaferLDRight))) {
652- cellt = HGCalCell::halfExtCell;
653- if (partialType == HGCalTypes::WaferLDLeft) {
654- cellx = HGCalCell::leftCell;
655- } else {
656- cellx = HGCalCell::rightCell;
657- }
658- } else if ((u == 7 && v == 11 ) &&
659- ((partialType == HGCalTypes::WaferLDFive) || (partialType == HGCalTypes::WaferLDThree))) {
660- cellt = HGCalCell::halfExtCell;
661- if (partialType == HGCalTypes::WaferLDFive) {
662- cellx = HGCalCell::leftCell;
663- } else {
664- cellx = HGCalCell::rightCell;
665- }
666- } else if (2 * v - u == 7 ) {
667- cellt = HGCalCell::halfCell;
664+ if (v == 7 ) {
668665 if (partialType == HGCalTypes::WaferLDLeft) {
666+ cellt = HGCalCell::intHalfExtCell;
669667 cellx = HGCalCell::leftCell;
670668 } else if (partialType == HGCalTypes::WaferLDRight) {
669+ cellt = HGCalCell::intHalfExtCell;
671670 cellx = HGCalCell::rightCell;
671+ } else {
672+ cellt = HGCalCell::intExtCellCenCut;
672673 }
673- } else if (2 * v - u == 15 ) {
674+ } else if (v == 11 ) {
674675 if (partialType == HGCalTypes::WaferLDFive) {
676+ cellt = HGCalCell::intHalfExtCell;
675677 cellx = HGCalCell::leftCell;
676678 } else if (partialType == HGCalTypes::WaferLDThree) {
679+ cellt = HGCalCell::intHalfExtCell;
677680 cellx = HGCalCell::rightCell;
681+ } else {
682+ cellt = HGCalCell::intExtCellCenCut;
678683 }
684+ } else {
685+ cellt = HGCalCell::intExtCell;
686+ }
687+ } else if (u == 8 ) {
688+ if (v == 7 || v == 11 ) {
689+ cellt = HGCalCell::intTrunCellEdgeCut;
690+ cellx = HGCalCell::leftCell;
691+ } else if (v == 8 || v == 12 ) {
692+ cellt = HGCalCell::intTrunCellEdgeCut;
693+ cellx = HGCalCell::rightCell;
694+ } else {
695+ cellt = HGCalCell::intTrunCell;
696+ }
697+ } else if (2 * v - u == 7 ) {
698+ if (partialType == HGCalTypes::WaferLDLeft) {
699+ cellt = HGCalCell::halfCell;
700+ cellx = HGCalCell::leftCell;
701+ } else if (partialType == HGCalTypes::WaferLDRight) {
702+ cellt = HGCalCell::halfCell;
703+ cellx = HGCalCell::rightCell;
704+ } else {
705+ cellt = HGCalCell::fullCellCenCut;
706+ cellx = HGCalCell::centralCell;
707+ }
708+ } else if (2 * v - u == 15 ) {
709+ if (partialType == HGCalTypes::WaferLDFive) {
679710 cellt = HGCalCell::halfCell;
680- std::cout << u << " :" << v << " 1" << std::endl;
711+ cellx = HGCalCell::leftCell;
712+ } else if (partialType == HGCalTypes::WaferLDThree) {
713+ cellt = HGCalCell::halfCell;
714+ cellx = HGCalCell::rightCell;
715+ } else {
716+ cellt = HGCalCell::fullCellCenCut;
717+ cellx = HGCalCell::centralCell;
681718 }
719+ } else if (2 * v - u == 6 ) {
720+ cellt = HGCalCell::fullCellEdgeCut;
721+ cellx = HGCalCell::leftCell;
722+ } else if (2 * v - u == 8 ) {
723+ cellt = HGCalCell::fullCellEdgeCut;
724+ cellx = HGCalCell::rightCell;
725+ } else if (2 * v - u == 14 ) {
726+ cellt = HGCalCell::fullCellEdgeCut;
727+ cellx = HGCalCell::leftCell;
728+ } else if (2 * v - u == 16 ) {
729+ cellt = HGCalCell::fullCellEdgeCut;
730+ cellx = HGCalCell::rightCell;
682731 }
683732 } else if ((partialType >= HGCalTypes::WaferPartHDOffset) &&
684733 (partialType < (HGCalTypes::WaferPartHDOffset + HGCalTypes::WaferPartHDCount))) {
@@ -696,41 +745,101 @@ std::pair<int32_t, int32_t> HGCalCell::cellType(
696745 } else {
697746 cellx = HGCalCell::rightCell;
698747 }
748+ } else if (u == 0 && v == 2 ) {
749+ if (partialType == HGCalTypes::WaferHDLeft) {
750+ cellt = HGCalCell::extHalfTrunCell;
751+ cellx = HGCalCell::leftCell;
752+ } else {
753+ cellt = HGCalCell::extTrunCellCenCut;
754+ }
755+ } else if (u == 0 && v == 9 ) {
756+ if (partialType == HGCalTypes::WaferHDFive) {
757+ cellt = HGCalCell::extHalfTrunCell;
758+ cellx = HGCalCell::leftCell;
759+ } else if (partialType == HGCalTypes::WaferHDRight) {
760+ cellt = HGCalCell::extHalfExtCell;
761+ cellx = HGCalCell::rightCell;
762+ } else {
763+ cellt = HGCalCell::extExtCellCenCut;
764+ }
765+ } else if ((u == 23 ) && (v == 13 || v == 14 )) {
766+ if (v == 13 ) {
767+ cellt = HGCalCell::extExtCellEdgeCut;
768+ cellx = HGCalCell::leftCell;
769+ } else if (v == 14 ) {
770+ cellt = HGCalCell::extExtCellEdgeCut;
771+ cellx = HGCalCell::rightCell;
772+ }
773+ } else if ((u == 23 ) && (v == 20 || v == 21 )) {
774+ if (v == 20 ) {
775+ cellt = HGCalCell::extExtCellEdgeCut;
776+ cellx = HGCalCell::leftCell;
777+ } else if (v == 21 ) {
778+ cellt = HGCalCell::extExtCellEdgeCut;
779+ cellx = HGCalCell::rightCell;
780+ }
699781 } else if (u == 9 ) {
700- cellt = HGCalCell::truncatedCell;
701- cellx = HGCalCell::topCell;
782+ if (v == 6 || v == 13 ) {
783+ cellt = HGCalCell::intTrunCellEdgeCut;
784+ cellx = HGCalCell::leftCell;
785+ } else if (v == 7 || v == 14 ) {
786+ cellt = HGCalCell::intTrunCellEdgeCut;
787+ cellx = HGCalCell::rightCell;
788+ } else {
789+ cellt = HGCalCell::intTrunCell;
790+ }
702791 } else if (u == 10 ) {
703- cellt = HGCalCell::extendedCell;
704- cellx = HGCalCell::bottomCell;
705- } else if ((partialType == HGCalTypes::WaferHDLeft) || (partialType == HGCalTypes::WaferHDRight) ||
706- (partialType == HGCalTypes::WaferHDFive)) {
707- if ((u == 10 && v == 7 ) || (u == 10 && v == 14 )) {
708- cellt = HGCalCell::halfExtCell;
709- if ((partialType == HGCalTypes::WaferHDLeft) || (partialType == HGCalTypes::WaferHDFive)) {
710- cellx = HGCalCell::leftCell;
711- } else {
712- cellx = HGCalCell::rightCell;
713- }
714- } else if ((u == 0 && v == 2 ) || (u == 0 && v == 9 )) {
715- cellt = HGCalCell::halfTrunCell;
716- if ((partialType == HGCalTypes::WaferHDLeft) || (partialType == HGCalTypes::WaferHDFive)) {
717- cellx = HGCalCell::leftCell;
718- } else {
719- cellx = HGCalCell::rightCell;
720- }
721- } else if (2 * v - u == 4 ) {
722- cellt = HGCalCell::halfCell;
792+ if (v == 7 ) {
723793 if (partialType == HGCalTypes::WaferHDLeft) {
794+ cellt = HGCalCell::intHalfExtCell;
724795 cellx = HGCalCell::leftCell;
796+ } else {
797+ cellt = HGCalCell::intExtCellCenCut;
725798 }
726- } else if (2 * v - u == 18 ) {
727- cellt = HGCalCell::halfCell;
799+ } else if (v == 14 ) {
728800 if (partialType == HGCalTypes::WaferHDFive) {
801+ cellt = HGCalCell::intHalfExtCell;
729802 cellx = HGCalCell::leftCell;
730803 } else if (partialType == HGCalTypes::WaferHDRight) {
804+ cellt = HGCalCell::intHalfExtCell;
731805 cellx = HGCalCell::rightCell;
806+ } else {
807+ cellt = HGCalCell::intExtCellCenCut;
732808 }
809+ } else {
810+ cellt = HGCalCell::intExtCell;
811+ }
812+ } else if (2 * v - u == 4 ) {
813+ if (partialType == HGCalTypes::WaferHDLeft) {
814+ cellt = HGCalCell::halfCell;
815+ cellx = HGCalCell::leftCell;
816+ } else {
817+ cellt = HGCalCell::fullCellCenCut;
818+ cellx = HGCalCell::centralCell;
819+ }
820+ } else if (2 * v - u == 18 ) {
821+ if (partialType == HGCalTypes::WaferHDFive) {
822+ cellt = HGCalCell::halfCell;
823+ cellx = HGCalCell::leftCell;
824+ } else if (partialType == HGCalTypes::WaferHDRight) {
825+ cellt = HGCalCell::halfCell;
826+ cellx = HGCalCell::rightCell;
827+ } else {
828+ cellt = HGCalCell::fullCellCenCut;
829+ cellx = HGCalCell::centralCell;
733830 }
831+ } else if (2 * v - u == 3 ) {
832+ cellt = HGCalCell::fullCellEdgeCut;
833+ cellx = HGCalCell::leftCell;
834+ } else if (2 * v - u == 5 ) {
835+ cellt = HGCalCell::fullCellEdgeCut;
836+ cellx = HGCalCell::rightCell;
837+ } else if (2 * v - u == 17 ) {
838+ cellt = HGCalCell::fullCellEdgeCut;
839+ cellx = HGCalCell::leftCell;
840+ } else if (2 * v - u == 19 ) {
841+ cellt = HGCalCell::fullCellEdgeCut;
842+ cellx = HGCalCell::rightCell;
734843 }
735844 }
736845 return std::make_pair (cellx, cellt);
0 commit comments