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];
nandInst11: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col1, Row1, nandInst11W, Vdd, Gnd", nand, "nandInst11"];
nandInst12: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col2, nandInst11W, nandInst12W, Vdd, Gnd", nand, "nandInst12"];
nandInst13: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col3, nandInst12W, nandInst13W, Vdd, Gnd", nand, "nandInst13"];
nandInst14: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col4, nandInst13W, nandInst14W, Vdd, Gnd", nand, "nandInst14"];
nandInst15: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col5, nandInst14W, nandInst15W, Vdd, Gnd", nand, "nandInst15"];
nandInst21: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col1, Row2, nandInst21W, Vdd, Gnd", nand, "nandInst21"];
nandInst22: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col2, nandInst21W, nandInst22W, Vdd, Gnd", nand, "nandInst22"];
nandInst23: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col3, nandInst22W, nandInst23W, Vdd, Gnd", nand, "nandInst23"];
nandInst24: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col4, nandInst23W, nandInst24W, Vdd, Gnd", nand, "nandInst24"];
nandInst25: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col5, nandInst24W, nandInst25W, Vdd, Gnd", nand, "nandInst25"];
nandInst31: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col1, Row3, nandInst31W, Vdd, Gnd", nand, "nandInst31"];
nandInst32: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col2, nandInst31W, nandInst32W, Vdd, Gnd", nand, "nandInst32"];
nandInst33: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col3, nandInst32W, nandInst33W, Vdd, Gnd", nand, "nandInst33"];
nandInst34: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col4, nandInst33W, nandInst34W, Vdd, Gnd", nand, "nandInst34"];
nandInst35: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col5, nandInst34W, nandInst35W, Vdd, Gnd", nand, "nandInst35"];
nandInst41: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col1, Row4, nandInst41W, Vdd, Gnd", nand, "nandInst41"];
nandInst42: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col2, nandInst41W, nandInst42W, Vdd, Gnd", nand, "nandInst42"];
nandInst43: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col3, nandInst42W, nandInst43W, Vdd, Gnd", nand, "nandInst43"];
nandInst44: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col4, nandInst43W, nandInst44W, Vdd, Gnd", nand, "nandInst44"];
nandInst45: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col5, nandInst44W, nandInst45W, Vdd, Gnd", nand, "nandInst45"];
nandInst51: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col1, Row5, nandInst51W, Vdd, Gnd", nand, "nandInst51"];
nandInst52: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col2, nandInst51W, nandInst52W, Vdd, Gnd", nand, "nandInst52"];
nandInst53: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col3, nandInst52W, nandInst53W, Vdd, Gnd", nand, "nandInst53"];
nandInst54: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col4, nandInst53W, nandInst54W, Vdd, Gnd", nand, "nandInst54"];
nandInst55: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[context, "Col5, nandInst54W, nandInst55W, Vdd, Gnd", nand, "nandInst55"];
pubWires: CoreCompose.WireSequence ← CoreCompose.CreateWires[context, "Row1, Row2, Row3, Row4, Row5, Col1, Col2, Col3, Col4, Col5, nandInst15W, nandInst25W, nandInst35W, nandInst45W, nandInst55W, Vdd, Gnd"];
privWires: CoreCompose.WireSequence ← CoreCompose.CreateWires[context, "nandInst11W, nandInst12W, nandInst13W, nandInst14W, nandInst21W, nandInst22W, nandInst23W, nandInst24W, nandInst31W, nandInst32W, nandInst33W, nandInst34W, nandInst41W, nandInst42W, nandInst43W, nandInst44W, nandInst51W, nandInst52W, nandInst53W, nandInst54W"];
SCTest: Core.CellType ← SCTestUtil.CreateRecordCell[context, "SCTest", pubWires, privWires, LIST[nandInst11, nandInst12, nandInst13, nandInst14, nandInst15, nandInst21, nandInst22, nandInst23, nandInst24, nandInst25, nandInst31, nandInst32, nandInst33, nandInst34, nandInst35, nandInst41, nandInst42, nandInst43, nandInst44, nandInst45, nandInst51, nandInst52, nandInst53, nandInst54, nandInst55]];
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;