CreateCore:
PUBLIC PROC []
RETURNS [Core.CellType] =
Create a Core design
BEGIN
nandWires: Core.Wire ← SCTestUtil.CreateWire[LIST["InA", "InB", "Out", "Vdd", "Gnd"]];
nand: Core.CellType ← SCTestUtil.CreateRecordCell["NAND", nandWires, nandWires, NIL];
invWires: Core.Wire ← SCTestUtil.CreateWire[LIST["In", "Out", "Vdd", "Gnd"]];
inverter: Core.CellType ← SCTestUtil.CreateRecordCell["Inverter", invWires, invWires, NIL];
pubWires: Core.Wire ← SCTestUtil.CreateWire[LIST["InA", "InB", "Out", "Vdd", "Gnd"]];
privateWires: Core.Wire ← SCTestUtil.CreateWire[LIST["NOut"]];
internWires: Core.Wire ← SCTestUtil.UnionWire[pubWires, privateWires];
nandInst: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[LIST["InA", "InB", "NOut", "Vdd", "Gnd"], nand, "nandInst", internWires];
invInst: CoreClasses.CellInstance ← SCTestUtil.CreateInstance[LIST["NOut", "Out", "Vdd", "Gnd"], inverter, "invInst", internWires];
SCTest: Core.CellType ← SCTestUtil.CreateRecordCell["SCTest", pubWires, internWires, LIST[nandInst, invInst]];
index: INT ← CoreOps.GetWireIndex[privateWires, "NOut"];
privateWires.elements[index].properties ← CoreProperties.PutProp[privateWires.elements[index].properties, SC.unconnectedProp, NEW[ATOM ← SC.unconnectedProp]];
IF debug
THEN {
out:
IO.
STREAM ← ViewerIO.CreateViewerStreams[
name: "Core: SCTest",
viewer: NIL,
editedStream: FALSE].out;
CoreOps.PrintCellType[SCTest, out]};
RETURN [SCTest];
END;