DIRECTORY Atom, BasicTime, EDIFDataStructure, EDIFfing, EDIFGrammar, EDIFSemantics, HashTable, Rope; EDIFSemanticsCell: CEDAR PROGRAM IMPORTS Atom, EDIFGrammar, EDIFSemantics, HashTable = {OPEN EDIFfing, EDIFDataStructure, EDIFGrammar, EDIFSemantics; DefineEm: PROC = { SS[DL[$Library, LIST[NameDef[], Opt[$Status], Opt[$Technology], Opt[$Rename], StarCh[LIST[$Cell, $Comment, $UserData]] ]], [BeforeLibrary, AfterLibrary, SeeLibraryField]]; [] _ DL[$Technology, LIST[NameDef[], Opt[$NumberDefinition], StarCh[LIST[$Define, Oo[$Rename], $SimulationInfo, $SimulationMap, Oo[$GridMap], Oo[$FigureGroupDefault], $Comment, $UserData, $Level1Ctl, $Level2Ctl]] ]]; [] _ DL[$NumberDefinition, LIST[$UnitSystem, StarCh[LIST[$Scale, $Comment, $UserData]] ]]; [] _ DC[$UnitSystem, LIST["si", $Identifier]]; [] _ DL[$Scale, LIST[$UnitType, $Number, $Number]]; [] _ DC[$UnitType, LIST["capacitance", "current", "distance", "resistance", "termperature", "time", "voltage"]]; [] _ DL[$SimulationInfo, LIST[NameDef[], $SimulationValue, $Arbitrate, $Isolated, Opt[$Rename]]]; [] _ DL[$SimulationValue, LIST[Star[NameDef[]]]]; [] _ DL[$Arbitrate, LIST[$Pairwise]]; [] _ DL[$Pairwise, LIST[Star[NameRef[]]]]; [] _ DL[$Isolated, LIST[NameRef[]]]; [] _ DL[$SimulationMap, LIST[$Reference, $Reference, StarCh[LIST[$StateMap, $Comment, $UserData]] ]]; [] _ DL[$StateMap, LIST[Plus[NameRef[]]]]; [] _ DL[$GridMap, LIST[$Number, $Number]]; [] _ DL[$FigureGroupDefault, LIST[StarCh[LIST[$FigureGroupSpecification, $Comment, $UserData]] ]]; [] _ DL[$FigureGroupSpecification, LIST[NameRef[], StarCh[LIST[Oo[$Width], Oo[$PathType], Oo[$BorderPattern], Oo[$FillPattern], Oo[$Color], $Comment, $UserData]] ]]; [] _ DL[$Width, LIST[$Coordinate]]; [] _ DC[$Coordinate, LIST[$WholeNumber], 0, 0]; [] _ DC[$Coordinate, LIST[$Expression], 1]; [] _ DL[$PathType, LIST[$Style, $Style]]; [] _ DC[$Style, LIST["extend", "truncate", "round"]]; [] _ DL[$BorderPattern, LIST[$Integer, $String]]; [] _ DL[$FillPattern, LIST[$Integer, $Integer, $String]]; [] _ DL[$Color, LIST[$Integer, $Integer, $Integer]]; [] _ DL[$Define, LIST[$Direction, $Type, $DefineObjects, Opt[Limit[$Default, 1]], Star[$Rename]]]; [] _ DC[$Direction, LIST["local", "input", "inout", "output", "unspecified"]]; [] _ DC[$Type, LIST["figuregroup", "port", "signal", Limit["String", 1], Limit["Integer", 1], Limit["Number", 1], Limit["Boolean", 1], Limit["Point", 1], Limit[$UnitType, 1]]]; [] _ DQ[$DefineObjects, LIST[$Multiple, Star[$DefineObject]], $DefineObject]; [] _ DC[$DefineObject, LIST[NameDef[], $ArrayDefinition]]; [] _ DL[$ArrayDefinition, LIST[NameDef[], Star[$WholeNumber]]]; [] _ DL[$Default, LIST[Star[$PrimitiveData]], 1]; [] _ DC[$PrimitiveData, LIST[$Primitive, $True, $False]]; SS[DL[$Cell, LIST[NameDef[], Opt[$Status], Opt[$Rename], Opt[$ViewMap], StarCh[LIST[$View, $Comment, $UserData]] ]], [BeforeCell, AfterCell, SeeCellField]]; [] _ DL[$ViewMap, LIST[StarCh[LIST[$PortMap, $InstanceMap, $Comment, $UserData, $Level2Ctl]] ]]; }; BeforeLibrary: Beforer = { l: Library = NEW [LibraryPrivate _ [ cells: MakeRopeDict[] ]]; lc: LibraryConversion = NEW [LibraryConversionPrivate _ [l]]; context _ lc}; SeeLibraryField: SubResultConsumer = { lc: LibraryConversion = NARROW[context]; l: Library = lc.l; IF index = 1 THEN { l.name.edif _ Atom.GetPName[NARROW[result]]; RETURN}; }; AfterLibrary: Afterer = { ewc: EDIFWholeConversion = NARROW[parentContext]; ew: EDIFWhole = ewc.ew; lc: LibraryConversion = NARROW[context]; l: Library = lc.l; IF NOT ew.libraries.Insert[l.name.edif, l] THEN ERROR; result _ l; }; BeforeCell: Beforer = { lc: LibraryConversion = NARROW[parentContext]; ctfe: CellTypeFromEDIF = NEW [CellTypeFromEDIFPrivate _ []]; ctg: CellTypeGen = NEW [CellTypeGenPrivate _ [ library: lc.l, Apply: GenCellType, data: ctfe]]; ctgc: CellTypeGenConversion = NEW [CellTypeGenConversionPrivate _ [ctg, ctfe]]; context _ ctgc}; SeeCellField: SubResultConsumer = { ctgc: CellTypeGenConversion = NARROW[context]; IF index = 1 THEN ctgc.ctg.name.edif _ Atom.GetPName[NARROW[result]]; }; AfterCell: Afterer = { ctgc: CellTypeGenConversion = NARROW[context]; IF NOT ctgc.ctg.library.cells.Insert[ctgc.ctg.name.edif, ctgc.ctg] THEN ERROR; result _ ctgc.ctg; }; GenCellType: PROC [args: LORA, data: REF ANY] RETURNS [cct: CellType] = { ERROR --not yet implemented--; }; }. REDIFSemanticsCAtomNameEqll.Mesa Spreitzer, February 24, 1986 9:24:44 pm PST ΚF– "cedar" style˜code™K™+—K˜KšΟk œ[˜dK˜šΠbxœœ˜ Kšœ,˜3Kšœœ9˜@K˜šΟnœœ˜šœœ œAœ!˜zK˜0—K˜Kšœœœ+œ˜ΨKšœœœœ"˜ZKšœœœ˜.Kšœœ œ˜3Kšœœ œY˜pKšœœœD˜aKšœœœ˜1Kšœœ œ ˜%Kšœœ œ˜*Kšœœ œ ˜$Kšœœœ œ%˜eKšœœ œ˜*Kšœœ œ˜*Kšœœœœ5˜bKšœœœœg˜₯Kšœœ œ˜#Kšœœœ˜/Kšœœœ˜+Kšœœ œ˜)Kšœœ œ!˜5Kšœœœ˜1Kšœœœ˜9Kšœœ œ ˜4K˜Kšœœ œM˜bKšœœ œ6˜NKšœœœ˜°Kšœœœ1˜MKšœœœ˜:Kšœœœ!˜?Kšœœ œ˜1Kšœœœ˜9K˜šœœœ>œ!˜tK˜'—Kšœœ œœ>˜`K˜—K˜˜šœ œ˜$Kšœ˜Kšœ˜—Kšœœ"˜=K˜—K˜šœ&˜&Kšœœ ˜(Kšœ˜šœ œ˜Kšœœ ˜,Kšœ˜—K˜—K˜˜Kšœœ˜1Kšœ˜Kšœœ ˜(Kšœ˜Kšœœ%œœ˜6K˜ K˜—K˜˜Kšœœ˜.Kšœœ ˜<šœœ˜.K˜K˜K˜ —Kšœœ.˜OKšœ˜—K˜šœ#˜#Kšœœ ˜.Kšœ œ$œ ˜EK˜—K˜˜Kšœœ ˜.Kšœœ=œœ˜NKšœ˜K˜—K˜š Ÿ œœœœœœ˜IKšœΟcœ˜K˜—K˜K˜——…—ςŠ