DIRECTORY CD, CMos, CDInstances, CDBasics, CMosObjects, Recognizer, CStitching, CDOrient; CMosARecognizerImpl: CEDAR PROGRAM IMPORTS CMos, CDInstances, CMosObjects, Recognizer, CDBasics, CDOrient = BEGIN RegionList: TYPE = LIST OF REF CStitching.Region; ext: CD.Number = 2*CMos.lambda; cutExt: CD.Number = CMos.lambda; SingleRectInstances: PROC [active1, active2: CD.Layer, coveredList: RegionList, possibleInstListPtr: REF Recognizer.InstAndForbidLayerList] = BEGIN SELECT active1 FROM CMos.pol => IF active2 = CMos.ndif THEN SingleRectTransistors[coveredList, active2, possibleInstListPtr] ELSE IF active2 = CMos.pdif THEN SingleRectTransistors[coveredList, active2, possibleInstListPtr]; CMos.pdif => IF active2 = CMos.pol THEN SingleRectTransistors[coveredList, active1, possibleInstListPtr]; CMos.ndif => IF active2 = CMos.pol THEN SingleRectTransistors[coveredList, active1, possibleInstListPtr]; CMos.cut => IF active2 = CMos.met THEN SingleRectCutContacts[coveredList, possibleInstListPtr]; CMos.met => IF active2 = CMos.cut THEN SingleRectCutContacts[coveredList, possibleInstListPtr]; CMos.cut2 => IF active2 = CMos.met2 THEN SingleRectMmContacts[coveredList, possibleInstListPtr]; CMos.met2 => IF active2 = CMos.cut2 THEN SingleRectMmContacts[coveredList, possibleInstListPtr]; ENDCASE => NULL; END; SingleRectTransistors: PROC [coveredList: RegionList, difLayer: CD.Layer, possibleInstListPtr: REF Recognizer.InstAndForbidLayerList] = BEGIN SingleTransistorInstances: PROC [size1, size2, position: CD.Position, diff: CD.Layer, possibleInstListPtr: REF Recognizer.InstAndForbidLayerList] = BEGIN forbiddenLayerList: LIST OF CD.Layer _ LIST [CMos.cut, CMos.bur]; newObject: CD.Object; newInst: CD.Instance; newObject _ CMosObjects.CreateTransistor[size: size1, difLayer: diff]; newInst _ CDInstances.NewInstI[ob: newObject, orientation: CDOrient.original, location: position]; PlaceOnList[newInst, possibleInstListPtr, forbiddenLayerList]; newObject _ CMosObjects.CreateTransistor[size: size1, difLayer: diff]; newInst _ CDInstances.NewInstI[ob: newObject, orientation: CDOrient.rotate90, location: position]; PlaceOnList[newInst, possibleInstListPtr, forbiddenLayerList]; newObject _ CMosObjects.CreateTransistor[size: size2, difLayer: diff]; newInst _ CDInstances.NewInstI[ob: newObject, orientation: CDOrient.original, location: position]; PlaceOnList[newInst, possibleInstListPtr, forbiddenLayerList]; newObject _ CMosObjects.CreateTransistor[size: size2, difLayer: diff]; newInst _ CDInstances.NewInstI[ob: newObject, orientation: CDOrient.rotate90, location: position]; PlaceOnList[newInst, possibleInstListPtr, forbiddenLayerList]; END; rect: CD.Rect _ coveredList.first.rect; position: CD.Position _ CDBasics.BaseOfRect[rect]; size1, size2: CD.Position; position _ [position.x-ext, position.y-ext]; size1 _ [rect.x2 - rect.x1 + 2*ext, rect.y2 - rect.y1 + 2*ext]; size2 _ [rect.y2 - rect.y1 + 2*ext, rect.x2 - rect.x1 + 2*ext]; SingleTransistorInstances[size1, size2, position, difLayer, possibleInstListPtr]; size1 _ CDBasics.SizeOfRect[CDBasics.Extend[[rect.x1, rect.y1-ext, rect.x2, rect.y2+ext], CMos.wellSurround]]; size2 _ CDOrient.OrientedSize[CDBasics.SizeOfRect[CDBasics.Extend[[rect.x1-ext, rect.y1, rect.x2+ext, rect.y2], CMos.wellSurround]], CDOrient.rotate90]; IF difLayer = CMos.pdif THEN SingleTransistorInstances[size1, size2, position, CMos.wpdif, possibleInstListPtr] ELSE SingleTransistorInstances[size1, size2, position, CMos.wndif, possibleInstListPtr]; END; SingleRectCutContacts: PROC [coveredList: RegionList, possibleInstListPtr: REF Recognizer.InstAndForbidLayerList] = BEGIN rect: CD.Rect _ coveredList.first.rect; position: CD.Position _ CDBasics.BaseOfRect[rect]; position _ [position.x-cutExt, position.y-cutExt]; PlaceOnList[CDInstances.NewInstI[ob: CMosObjects.CreatePolyCon[], location: position], possibleInstListPtr]; FOR diffList: LIST OF CD.Layer _ LIST[CMos.pdif, CMos.ndif, CMos.wpdif, CMos.wndif, CMos.nwellCont, CMos.pwellCont], diffList.rest WHILE diffList #NIL DO PlaceOnList[CDInstances.NewInstI[ob: CMosObjects.CreateDifCon[diffList.first], location: position], possibleInstListPtr]; FOR orient: CD.Orientation IN CD.Orientation DO IF ~CDOrient.IncludesMirrorX[orient] THEN { PlaceOnList[CDInstances.NewInstI[ob: CMosObjects.CreateButCon[diffList.first], location: position, orientation: orient], possibleInstListPtr]; } ENDLOOP; ENDLOOP; END; SingleRectMmContacts: PROC [coveredList: RegionList, possibleInstListPtr: REF Recognizer.InstAndForbidLayerList] = BEGIN rect: CD.Rect _ coveredList.first.rect; position: CD.Position _ CDBasics.BaseOfRect[rect]; position _ [position.x-cutExt, position.y-cutExt]; PlaceOnList[CDInstances.NewInstI[ob: CMosObjects.CreateMmCon[], location: position], possibleInstListPtr]; END; DoubleRectInstances: PROC [active1, active2: CD.Layer, coveredList: RegionList, possibleInstListPtr: REF Recognizer.InstAndForbidLayerList] = BEGIN SELECT active1 FROM CMos.pol => IF active2 = CMos.ndif THEN DoubleRectTransistors[coveredList, active2, possibleInstListPtr] ELSE IF active2 = CMos.pdif THEN DoubleRectTransistors[coveredList, active2, possibleInstListPtr]; CMos.pdif => IF active2 = CMos.pol THEN DoubleRectTransistors[coveredList, active1, possibleInstListPtr]; CMos.ndif => IF active2 = CMos.pol THEN DoubleRectTransistors[coveredList, active1, possibleInstListPtr]; ENDCASE => NULL; END; DoubleRectTransistors: PROC [coveredList: RegionList, difLayer: CD.Layer, possibleInstListPtr: REF Recognizer.InstAndForbidLayerList] = BEGIN position: CD.Position; size: CD.Position; rect1: CD.Rect _ coveredList.first.rect; rect2: CD.Rect _ coveredList.rest.first.rect; minX: CD.Number_ MIN[rect1.x1, rect2.x1]; minY: CD.Number _ MIN[rect1.y1, rect2.y1]; maxX: CD.Number _ MAX[rect1.x2, rect2.x2]; maxY: CD.Number _ MAX[rect1.y2, rect2.y2]; diffAbstractLayer: CD.Layer; forbiddenLayerList: LIST OF CD.Layer _ LIST [CMos.cut, CMos.bur]; position _ [minX - ext, minY - ext]; size _ CDBasics.SizeOfRect[[minX-ext, minY-ext, maxX + ext, maxY + ext]]; FOR orient: CD.Orientation IN CD.Orientation DO newObject: CD.Object _ CMosObjects.CreateAngleTransistor[size: CDOrient.OrientedSize[size, orient], difLayer: difLayer]; newInst: CD.Instance _ CDInstances.NewInstI[ob: newObject, orientation: orient, location: position]; PlaceOnList[newInst, possibleInstListPtr, forbiddenLayerList]; ENDLOOP; IF difLayer = CMos.ndif THEN diffAbstractLayer _ CMos.wndif ELSE diffAbstractLayer _ CMos.wpdif; size _ CDBasics.SizeOfRect[CDBasics.Extend[[minX, minY-ext, maxX+ext, maxY], CMos.wellSurround]]; FOR orient: CD.Orientation IN CD.Orientation DO newObject: CD.Object _ CMosObjects.CreateAngleTransistor[size: CDOrient.OrientedSize[size, orient], difLayer: diffAbstractLayer]; PlaceOnList[CDInstances.NewInstI[ob: newObject, orientation: orient, location: position], possibleInstListPtr, forbiddenLayerList]; ENDLOOP; END; PlaceOnList: PROC [instance: CD.Instance, possibleInstListPtr: REF Recognizer.InstAndForbidLayerList, forbiddenLayerList: LIST OF CD.Layer _ NIL] = BEGIN possibleInstListPtr^ _ CONS[NEW[Recognizer.InstAndForbidLayerRec _ [instance, forbiddenLayerList]], possibleInstListPtr^]; END; Recognizer.RegisterPossibleInstanceProc [CMos.cmos, 1, SingleRectInstances]; Recognizer.RegisterPossibleInstanceProc[CMos.cmos, 2, DoubleRectInstances]; Recognizer.RegisterLayerList[technology: CMos.cmos, active1: CMos.ndif, active2: CMos.pol, layerList: LIST[CMos.pwell, CMos.cut, CMos.bur]]; Recognizer.RegisterLayerList[technology: CMos.cmos, active1: CMos.pdif, active2: CMos.pol, layerList: LIST[CMos.nwell, CMos.cut, CMos.bur]]; Recognizer.RegisterLayerList[technology: CMos.cmos, active1: CMos.cut, active2: CMos.met, layerList: LIST[CMos.pol, CMos.ndif, CMos.pdif, CMos.nwellCont, CMos.pwellCont, CMos.nwell, CMos.pwell]]; Recognizer.RegisterLayerList[technology: CMos.cmos, active1: CMos.cut2, active2: CMos.met2, layerList: LIST[CMos.met]]; END. TCMosARecognizerImpl.mesa The technology dependant part of recognizing objects Gbier, July 11, 1985 10:48:17 am PDT Gbier, July 26, 1985 1:29:05 pm PDT Jacobi, March 19, 1986 6:40:17 pm PST Frank Bowers January 29, 1986 10:31:09 am PST -- ndif or pdif type transistors -- ORDER is important; things placed on the possible instances list will be checked LIFO; therefore place transistors of type wndif and wpdif onto possible instances list after transistors of type ndif and pdif --should a size parameter be added to the contacts then the below should do it. size: CD.Position _ [rect.y2 - rect.y1 + 2*cutExt, rect.x2 - rect.x1 + 2*cutExt]; --should a size parameter be added to the contacts then the below should do it. orientedSize: CD.Position _ CDOrient.OrientedSize[size, orient]; --should a size parameter be added to the contacts then the below should do it. size: CD.Position _ [rect.y2 - rect.y1 + 2*cutExt, rect.x2 - rect.x1 + 2*cutExt]; -- ORDER is important; things placed on the possible instances list will be checked LIFO; therefore place transistors of type wndif and wpdif onto possible instances list after transistors of type ndif and pdif --places instance on possibleInstList -- if diff = ndif then transistors of type wndif and ndif will be recognized -- if diff = pdif then transistors of type wpdif and pdif will be recognized Κΐ˜šœN™NJšœ$™$Jšœ#™#Icode™%K™-—J˜J˜šΟk ˜ Jšœ˜J˜J˜ J˜ J˜ Jšœ ˜ Jšœ ˜ Jšœ ˜ —J˜J˜šΟbœœ˜"JšœB˜I—Jš˜J˜Jš œ œœœœ˜1J˜Jšœœ˜Jšœœ˜ J˜šΠbnœœœ6œ&˜ŽJš˜šœ ˜˜ šœœ˜J˜@—š˜šœ˜J˜A———˜ šœ˜J˜A——˜ šœ˜J˜A——šœ ˜ šœ˜J˜8——šœ ˜ šœ˜J˜8——˜ šœ˜J˜7——˜ šœ˜J˜7——Jšœœ˜—Jšœ˜—J˜šŸœœ%œœ%˜‡Jš˜J˜š Ÿœœœœœ%˜“š˜Jš œœœœ œ˜AJšœ œ˜Jšœ œ ˜JšœF˜FJšœb˜bJ˜>JšœF˜FJšœb˜bJ˜>JšœF˜FJšœb˜bJ˜>JšœF˜FJšœb˜bJ˜>Jšœ˜J˜——Jšœœ˜'Jšœ œ&˜2Jšœœ ˜J˜,J™Jšœ ™ J˜Jšœ?˜?Jšœ?˜?J˜Q—˜J˜J™YJ™bJ™J˜J˜nJ˜˜šœœ˜J˜R—šœ˜J˜S—Jšœ˜—J˜šŸœœ0œ%˜sJš˜Jšœœ˜'Jšœ œ&˜2J™OJšœœI™QJšœ2˜2Jšœl˜lšœ œœœ œ^œ œ˜™Jšœy˜yš œ œ œœ ˜/šœ#˜+Io™OL™@JšœŽ˜ŽJšœ˜—Jšœ˜—Jšœ˜—Jšœ˜—šŸœœ0œ%˜rJš˜Jšœœ˜'Jšœ œ&˜2J™OJšœQ™QJšœ2˜2Jšœj˜jJšœ˜—šŸœœœ6œ&˜ŽJš˜šœ ˜˜ šœœ˜J˜@—š˜šœ˜J˜A———˜ šœ˜J˜A——˜ šœ˜J˜A——Jšœœ˜—Jšœ˜—J˜šΟnœœ%œœ%˜‡Jš˜Jšœ œ ˜Jšœœ ˜Jšœœ˜(Jšœœ$˜-Jšœœ œ˜*Jšœœ œ˜*Jšœœ œ˜*Jšœœ œ˜*Jšœœ˜š œœœœ œ˜AJ˜—Jšœ$˜$J˜Iš œ œ œœ ˜/Jšœ œk˜xJšœ œY˜dJ˜>Jšœ˜J˜—J™°J™!J™šœœ˜J˜—šœ˜J˜—J˜aš œ œ œœ ˜/Jšœ œt˜Jšœƒ˜ƒJšœ˜—Jšœ˜—J˜šŸ œœ œ œ8œœœ œ˜“J™%Jš˜Jšœœœ[˜zJšœ˜—J˜JšœL˜LJšœK˜KJ™J™LJ™LJ™Jšœfœ"˜ŒJ˜Jšœfœ"˜ŒJ˜JšœeœZ˜ΓJ˜Jšœgœ ˜wJ˜Jšœ˜—…—.+B