<> <> <> <> <> <<>> DIRECTORY CD, CDDirectory, Combinatorial, Core, CoreDirectory, CoreIO, CoreProperties, PW, PWCore, PWCoreLichen, Rope, Sinix, Sisyph, SymTab, TerminalIO; GenerateStdCellsCmosBLibrary: CEDAR PROGRAM IMPORTS CD, CDDirectory, Combinatorial, CoreIO, CoreProperties, PW, PWCore, PWCoreLichen, Rope, Sinix, Sisyph, SymTab, TerminalIO = BEGIN AddCell: PROC [name: Rope.ROPE, iSCombinatorial: BOOL _ FALSE] ~ { cellType, maskCT: Core.CellType; ob: CD.Object; lichenTolerance: Rope.ROPE _ "0.8, 0.8"; schName: Rope.ROPE _ Rope.Cat[name, ".sch"]; maskName: Rope.ROPE _ Rope.Cat[name, ".mask"]; cellType _ Sisyph.ES[schName, sourceCX]; ob _ CDDirectory.Fetch[sourceDesign, maskName]; maskCT _ NARROW [Sinix.Extract[ob, PWCore.extractMode].result]; CoreProperties.PutCellTypeProp[on: cellType, prop: $CellArea, value: NEW[INT _ CD.InterestSize[ob].x*CD.InterestSize[ob].y]]; <<-- the area in square CD units, for Extract and Measure>> IF iSCombinatorial THEN { CoreProperties.PutCellTypeProp[cellType, $Combinatorial, NEW [BOOL _ TRUE]]; Combinatorial.BindCombinatorial[cellType]; Combinatorial.CheckTransistorsAgainstExpressions[cellType]; }; CoreProperties.PutCellTypeProp[cellType, $LichenTransistorTolerances, lichenTolerance]; <<-- that's length and width>> [] _ SymTab.Store[schLibrary, schName, cellType]; [] _ SymTab.Store[maskLibrary, maskName, maskCT]; }; Check: SymTab.EachPairAction = {[] _ PWCoreLichen.Compare[NARROW [val], [design: NIL]]}; sourceDesign: CD.Design _ PW.OpenDesign["SCLibCMOSB"]; sourceCX: Sisyph.Context _ Sisyph.Create[sourceDesign]; schLibrary: CoreDirectory.Library _ SymTab.Create[]; maskLibrary: CoreDirectory.Library _ SymTab.Create[]; AddCell["vdd"]; AddCell["gnd"]; AddCell["feedthru"]; AddCell["inv", TRUE]; AddCell["invBuffer", TRUE]; AddCell["tstDriver"]; AddCell["rec2V"]; AddCell["recTTL", TRUE]; AddCell["nand2", TRUE]; AddCell["nand3", TRUE]; AddCell["nand4", TRUE]; AddCell["and2", TRUE]; AddCell["and3", TRUE]; AddCell["and4", TRUE]; AddCell["nor2", TRUE]; AddCell["nor3", TRUE]; AddCell["nor4", TRUE]; AddCell["or2", TRUE]; AddCell["or3", TRUE]; AddCell["or4", TRUE]; AddCell["xor2", TRUE]; AddCell["xnor2", TRUE]; AddCell["a22o2i", TRUE]; AddCell["o22a2i", TRUE]; AddCell["a21o2i", TRUE]; AddCell["o21a2i", TRUE]; AddCell["dLatch"]; AddCell["ff"]; AddCell["ffEn"]; AddCell["pd"]; AddCell["pu"]; AddCell["pdw"]; AddCell["puw"]; CoreIO.SaveLibrary[schLibrary, "SCLibCMOSBSch"]; TerminalIO.PutF["SCLibCMOSBSch library generated.\n"]; CoreIO.SaveLibrary[maskLibrary, "SCLibCMOSBMask"]; TerminalIO.PutF["SCLibCMOSBMask library generated.\n"]; END.