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;