-- AddAlignMarksAndMirror.mesa -- Last Edited by: Kimr, September 13, 1984 5:15:22 pm PDT DIRECTORY AlignmentMarks, CD, CDApplications, CDCells, CDDirectory, CDOrient, CDRects, CDSequencer, Rope, TerminalIO; AddAlignMarksAndMirror: CEDAR PROGRAM IMPORTS CD, CDApplications, AlignmentMarks, CDCells, CDDirectory, CDRects, CDSequencer, TerminalIO = BEGIN design: CD.Design; metal: CD.Level; PlaceAlignMarks: CDDirectory.EachEntryAction = -- PROC [name: Rope.ROPE, ob: CD.ObPtr] RETURNS [quit: BOOL_FALSE]; BEGIN cell: CD.CellPtr; x, y: INT; rect: CD.ObPtr _ CDRects.CreateRect[ size: [x: 1, y: 1], l: metal]; ap, aptr: CD.ApplicationPtr; mark: AlignmentMarks.Mark; [x, y] _ ob.size; IF ISTYPE[ob.specificRef, CD.CellPtr] THEN { cell _ NARROW[ob.specificRef, CD.CellPtr]; aptr _ CDApplications.NewApplicationI[ob: rect, location: [x: 0, y: 0]]; [] _ CDCells.IncludeApplication[design: design, cell: ob, aptr: aptr, draw: FALSE]; FOR aplist: CD.ApplicationList _ cell.contents, aplist.rest WHILE aplist # NIL DO ap _ aplist.first; IF ISTYPE[ap.ob.specificRef, CD.RectPtr] THEN { ap.location.y _ 2*x - ap.location.y; IF CD.LevelKey[ap.ob.level] = $pol THEN { TerminalIO.WriteRope["found one\n "]; mark.pos _ [x: ap.location.x, y: ap.location.y+1]; mark.name _ "left"; [] _ CDCells.IncludeApplication[design: design, cell: ob, aptr: AlignmentMarks.MakeMarkAptr[mark: mark]]; mark.pos _ [x: ap.location.x+ap.ob.size.y, y: ap.location.y+1]; mark.name _ "right"; [] _ CDCells.IncludeApplication[design: design, cell: ob, aptr: AlignmentMarks.MakeMarkAptr[mark: mark]]; [] _ CDCells.RemoveApplication[design: design, cell: ob, aptr: ap, draw: FALSE]; }; }; ENDLOOP } ELSE TerminalIO.WriteRope["directory object not a cell\n"]; [] _ CDCells.RemoveApplication[design: design, cell: ob, aptr: aptr, draw: FALSE]; END; AddMarks: PROC[ comm: CDSequencer.Command] = BEGIN design _ comm.design; metal _ CD.FetchLevel[t: design.technology, uniqueKey: $met]; TerminalIO.WriteRope["Adding marks to poly lines in cells \n"]; [] _ CDDirectory.Enumerate[design: design, action: PlaceAlignMarks]; TerminalIO.WriteRope["Done adding marks\n"]; END; -- module initialization CDSequencer.ImplementCommand[$MirrorS, AddMarks]; END. ÊJ˜J˜J˜:J˜˜ Jšœ˜Jšœ˜J˜J˜J˜ J˜ J˜J˜ J˜J˜ J˜—˜%Jšœd˜dJ˜—J˜J˜J˜J˜šœ.˜.Jš œÏkœ œœœ œ˜DJ˜J˜J˜ Jšœœ;˜CJ˜J˜J˜˜˜,J˜*JšœH˜HJšœLœ˜S˜RJ˜˜/J˜$˜)J˜%J˜2J˜Jšœi˜iJ˜?J˜Jšœi˜iJšœP˜PJ˜—J˜—J˜J˜—˜J˜6—JšœR˜R——J˜J˜—˜,J˜J˜Jšœœ3˜=J˜?J˜DJ˜,J˜J˜—J˜J˜1J˜—…—¨ ø