SCTestUtilTiny.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Frank Bowers December 19, 1985 10:36:54 am PST
Bryan Preas March 24, 1986 5:11:33 pm PST
DIRECTORY
Core,
CoreClasses,
CoreCompose,
IO,
SCTestUtil,
ViewerIO;
SCTest: CEDAR PROGRAM
IMPORTS CoreClasses, CoreCompose, SCTestUtil, ViewerIO
EXPORTS SCTestUtil =
BEGIN
debug: BOOLEANFALSE;
CreateCore: PUBLIC PROC [] RETURNS [CoreCompose.Context, Core.CellType] =
Create a Core design
BEGIN
context: CoreCompose.Context ← CoreCompose.CreateContext[];
nandWires: CoreCompose.WireSequence ← CoreCompose.CreateWires[context, "InA, InB, Out, Vdd, Gnd"];
nand: Core.CellType ← SCTestUtil.CreateRecordCell[context, "NAND", nandWires, NIL, NIL];
invWires: CoreCompose.WireSequence ← CoreCompose.CreateWires[context, "In, Out, Vdd, Gnd"];
inverter: Core.CellType ← SCTestUtil.CreateRecordCell[context, "Inverter", invWires, NIL, NIL];
nandInst: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "InA, InB, NOut, Vdd, Gnd", nand, "nandInst"];
invInst: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "NOut, Out, Vdd, Gnd", inverter, "invInst"];
pubWires: CoreCompose.WireSequence ← CoreCompose.CreateWires[context, "InA, InB, Out, Vdd, Gnd"];
privWires: CoreCompose.WireSequence ← CoreCompose.CreateWires[context, "NOut"];
SCTest: Core.CellType ← SCTestUtil.CreateRecordCell[context, "SCTest", pubWires, privWires, LIST[nandInst, invInst]];
IF debug THEN {
out: IO.STREAM ← ViewerIO.CreateViewerStreams[
name: "Core: SCTest",
viewer: NIL,
editedStream: FALSE].out;
CoreClasses.RecordPrint[NARROW[SCTest.data], out]};
RETURN [context, SCTest];
END;
END.