DIRECTORY CD, CDDirectory, CDIO, CDOps, CDProperties, CDSimpleRules, CDSymbolicObjects, CDTexts, Core, CoreOps, CoreProperties, PW, PWCore, StoreLayout; StoreLayoutImpl: CEDAR PROGRAM IMPORTS CD, CDDirectory, CDIO, CDOps, CDProperties, CDSimpleRules, CDSymbolicObjects, CDTexts, CoreOps, CoreProperties, PW, PWCore EXPORTS StoreLayout = BEGIN OPEN StoreLayout; StoreDesign: PUBLIC PROC [cellType: CellType, name: ROPE] = { font: CDTexts.CDFont _ CDTexts.MakeFont["Xerox/TiogaFonts/Helvetica8", 2]; EachWirePin: PWCore.EachWirePinProc = { minW: INT _ CDSimpleRules.MinWidth[layer]; wireName: ROPE _ CoreOps.GetFullWireName[cellType.public, wire]; pos: CD.Position _ SELECT side FROM left => [0, min], right => [iSize.x-minW, min], top => [min, iSize.y-minW], bottom => [min, 0], ENDCASE => ERROR; inst: CD.Instance _ PW.IncludeInCell[shell, CDSymbolicObjects.CreatePin[IF side=left OR side=right THEN [minW, max-min] ELSE [max-min, minW]], pos]; CDSymbolicObjects.SetLayer[inst, layer]; CDSymbolicObjects.SetName[inst, wireName]; inst _ PW.IncludeInCell[shell, CDSimpleRules.Rect[IF side=left OR side=right THEN [minW, max-min] ELSE [max-min, minW], layer], pos]; inst.properties _ CDProperties.DCopyProps[instance.properties]; [] _ PW.IncludeInCell[ shell, CDTexts.CreateText[wireName, font], SELECT side FROM left => [pos.x-100, pos.y], right => [pos.x+minW+10, pos.y], top => [pos.x, pos.y+minW+10], bottom => [pos.x, pos.y-100], ENDCASE => ERROR, SELECT side FROM left, right => 0, top, bottom => 2, ENDCASE => ERROR ]; }; iSize: CD.Position _ CD.InterestSize[PWCore.Layout[cellType]]; design: CD.Design _ CDOps.CreateDesign[CD.FetchTechnology[$cmosB]]; shell: CD.Object _ PW.CreateEmptyCell[]; [] _ PWCore.EnumerateWirePins[cellType, EachWirePin]; PW.SetInterestRect[shell, iSize]; PW.RepositionCell[shell]; [] _ CDDirectory.Include[design, shell, name]; CDOps.IncludeObjectI[design, shell]; PW.CleanUp[design]; [] _ PW.Draw[shell]; -- for debug [] _ CDIO.WriteDesign[design, name]; }; SetRetrieveLayout: PUBLIC PROC [cellType: CellType, name: ROPE] = { PWCore.SetLayout[cellType, $RetrieveLayout, $RetrieveDesign, name]; }; RetrieveLayout: PWCore.LayoutProc = { name: ROPE _ NARROW [CoreProperties.GetCellTypeProp[cellType, $RetrieveDesign]]; design: CD.Design _ PW.OpenDesign[name]; obj _ PW.Get[design, name]; }; [] _ PWCore.RegisterLayoutAtom[$RetrieveLayout, RetrieveLayout, PWCore.CheckAndDecorateGet]; END.  StoreLayoutImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reversed. Bertrand Serlet April 22, 1986 4:35:28 pm PST Storing and retrieving Κ±˜– "Cedar" stylešœ™Jšœ Οmœ1™Jšœžœžœ˜CJšœžœ žœ˜(Jšœ5˜5Jšžœ˜!Jšžœ˜Kšœ.˜.Kšœ$˜$Kšžœ˜KšœžœΟc ˜!Kšœžœ˜$J˜J™—š œžœžœžœ˜CJšœC˜CJ˜J˜—š œ˜%Jšœžœžœ=˜PJšœžœ žœ˜(Jšœžœ˜J˜J˜—Jšœ\˜\—J˜Jšžœ˜J˜—…— € Ρ