GCTestTinyCore.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Bryan Preas September 8, 1986 5:25:02 pm PDT
DIRECTORY
CD,
CDIO,
Core,
CoreClasses,
CoreDirectory,
CoreOps,
CoreProperties,
GC,
PWCore,
Rope,
RTTestUtil;
GCTestTinyCore: CEDAR PROGRAM
IMPORTS CDIO, CoreDirectory, CoreOps, CoreProperties, GC, PWCore, RTTestUtil
EXPORTS RTTestUtil =
BEGIN
debug: BOOLEANFALSE;
CreateCore: PUBLIC PROC [libName: Rope.ROPE] RETURNS [Core.CellType] =
Create a Core design
BEGIN
coreLibrary: CoreDirectory.Library ← CoreDirectory.CreateLibrary[];
libDesign: CD.Design ← CDIO.ReadDesign[libName, NIL, CDIO.GetWorkingDirectory[]];
nandWires: Core.Wire ← RTTestUtil.CreateWire[LIST["I-A", "I-B", "X", "Vdd", "Gnd"]];
nand: Core.CellType ← RTTestUtil.CreateRecordCell["C2NA02A", nandWires, nandWires, NIL];
invWires: Core.Wire ← RTTestUtil.CreateWire[LIST["I", "X", "Vdd", "Gnd"]];
inverter: Core.CellType ← RTTestUtil.CreateRecordCell["C2IV00A", invWires, invWires, NIL];
pubWires: Core.Wire ← RTTestUtil.CreateWire[LIST["InA", "InB", "Out", "Vdd", "Gnd"]];
privateWires: Core.Wire ← RTTestUtil.CreateWire[LIST["NOut"]];
internWires: Core.Wire ← RTTestUtil.UnionWire[pubWires, privateWires];
nandInst: CoreClasses.CellInstance ← RTTestUtil.CreateInstance[LIST["InA", "InB", "NOut", "Vdd", "Gnd"], nand, "nandInst", internWires];
invInst: CoreClasses.CellInstance ← RTTestUtil.CreateInstance[LIST["NOut", "Out", "Vdd", "Gnd"], inverter, "invInst", internWires];
GCTest: Core.CellType ← RTTestUtil.CreateRecordCell["GCTest", pubWires, internWires, LIST[nandInst, invInst]];
CoreProperties.PutWireProp[CoreOps.FindWire[internWires, "InA"], GC.sideProp, GC.bottomSideValue];
CoreProperties.PutWireProp[CoreOps.FindWire[internWires, "InB"], GC.sideProp, GC.topSideValue];
CoreProperties.PutWireProp[CoreOps.FindWire[internWires, "Out"], GC.sideProp, GC.leftSideValue];
[] ← CoreDirectory.RegisterLibrary[coreLibrary, libName];
[] ← CoreDirectory.Insert[coreLibrary, "C2NA02A", nand, TRUE];
[] ← CoreDirectory.Insert[coreLibrary, "C2IV00A", inverter, TRUE];
PWCore.SetGet[nand, libDesign];
PWCore.SetGet[inverter, libDesign];
RETURN [GCTest];
END;
END.