DIRECTORY CD, CDIO, Core, CoreClasses, CoreDirectory, CoreOps, CoreProperties, PWCore, Rope, SC, RTTestUtil; SCTestCoreTiny: CEDAR PROGRAM IMPORTS CDIO, CoreDirectory, CoreOps, CoreProperties, PWCore, RTTestUtil, SC EXPORTS RTTestUtil = BEGIN CreateCore: PUBLIC PROC [libName: Rope.ROPE] RETURNS [Core.CellType] = BEGIN coreLibrary: CoreDirectory.Library _ CoreDirectory.CreateLibrary[]; libDesign: CD.Design _ CDIO.ReadDesign[libName, NIL, CDIO.GetWorkingDirectory[]]; feedthruWires: Core.Wire _ RTTestUtil.CreateWire[LIST["FeedIn", "Vdd", "Gnd"]]; feedthru: Core.CellType _ RTTestUtil.CreateRecordCell["feedthru", feedthruWires, feedthruWires, NIL]; vddWires: Core.Wire _ RTTestUtil.CreateWire[LIST["Vdd", "Gnd"]]; vdd: Core.CellType _ RTTestUtil.CreateRecordCell["vdd", vddWires, vddWires, NIL]; gndWires: Core.Wire _ RTTestUtil.CreateWire[LIST["Vdd", "Gnd"]]; gnd: Core.CellType _ RTTestUtil.CreateRecordCell["gnd", gndWires, gndWires, NIL]; nandWires: Core.Wire _ RTTestUtil.CreateWire[LIST["I-A", "I-B", "X", "Vdd", "Gnd"]]; nand: Core.CellType _ RTTestUtil.CreateRecordCell["nand2", nandWires, nandWires, NIL]; invWires: Core.Wire _ RTTestUtil.CreateWire[LIST["I", "X", "Vdd", "Gnd"]]; inverter: Core.CellType _ RTTestUtil.CreateRecordCell["inv", invWires, invWires, NIL]; pubWires: Core.Wire _ RTTestUtil.CreateWire[LIST["InA", "Out", "Vdd", "Gnd"]]; privateWires: Core.Wire _ RTTestUtil.CreateWire[LIST["NOut"]]; internWires: Core.Wire _ RTTestUtil.UnionWire[pubWires, privateWires]; nandInst: CoreClasses.CellInstance _ RTTestUtil.CreateInstance[LIST["InA", "Vdd", "NOut", "Vdd", "Gnd"], nand, "nandInst", internWires]; invInst: CoreClasses.CellInstance _ RTTestUtil.CreateInstance[LIST["NOut", "Out", "Vdd", "Gnd"], inverter, "invInst", internWires]; SCTest: Core.CellType _ RTTestUtil.CreateRecordCell["SCTest", pubWires, internWires, LIST[nandInst, invInst]]; CoreProperties.PutWireProp[CoreOps.FindWire[internWires, "InA"], SC.bottomSideProp, NEW[BOOL _ TRUE]]; CoreProperties.PutWireProp[CoreOps.FindWire[internWires, "Out"], SC.leftSideProp, NEW[BOOL _ TRUE]]; [] _ CoreDirectory.RegisterLibrary[coreLibrary, libName]; [] _ CoreDirectory.Insert[coreLibrary, "nand2", nand, TRUE]; [] _ CoreDirectory.Insert[coreLibrary, "inv", inverter, TRUE]; [] _ CoreDirectory.Insert[coreLibrary, "feedthru", feedthru, TRUE]; [] _ CoreDirectory.Insert[coreLibrary, "vdd", vdd, TRUE]; [] _ CoreDirectory.Insert[coreLibrary, "gnd", gnd, TRUE]; PWCore.SetGet[nand, libDesign]; PWCore.SetGet[inverter, libDesign]; PWCore.SetGet[feedthru, libDesign]; PWCore.SetGet[vdd, libDesign]; PWCore.SetGet[gnd, libDesign]; RETURN [SCTest]; END; END. `SCTestCoreTiny.mesa Copyright Σ 1985, 1987 by Xerox Corporation. All rights reserved. Frank Bowers December 19, 1985 10:36:54 am PST Bryan Preas September 24, 1987 2:47:55 pm PDT Create a Core design CoreProperties.PutCellInstanceProp[nandInst, SC.rowProp, NEW[INT _ 1]]; CoreProperties.PutCellInstanceProp[invInst, SC.rowProp, NEW[INT _ 2]]; ΚA˜Icodešœ™šœB™BK™.K™-—K™šΟk œ˜ Kšœœ<œ œ ˜b—K˜šΟnœœ˜K˜Kšœœ>˜LKšœ˜K˜š ž œœœœœ˜FKšœ™K™Kš˜KšœC˜CKš œ œ œœœ˜QKšœ1œ˜OKšœ`œ˜eKšœ,œ˜@KšœLœ˜QKšœ,œ˜@KšœLœ˜QKšœ-œ#˜TKšœQœ˜VKšœ,œ˜JKšœQœ˜VKšœ,œ˜NKšœ0œ ˜>KšœF˜FKšœ?œE˜ˆKšœ>œA˜ƒKšžœOœ˜nKš œAœœœœ˜fKš œAœœœœ˜dKšœG™GKšœF™FKšœ:˜:Kšœ7œ˜=Kšœ9œ˜?Kšœ>œ˜DKšœ4œ˜:Kšœ4œ˜:Kšœ˜Kšœ#˜#Kšœ#˜#Kšœ˜Kšœ˜Kšœ ˜Kšœ˜K˜—Kšœ˜K˜——…— Z ϋ