--SCLibGenCells1.mesa
--Copyright (C) 1986 by Xerox Corporation. All rights reserved.
--Created by: Christian Jacobi June 2, 1986 3:48:19 pm PDT
--Last edited by: Christian Jacobi, December 22, 1986 12:37:54 pm PST
--Last edited by: Louis Monier July 15, 1986 11:16:19 am PDT
SCLibGenCells1:
CEDAR
PROGRAM
IMPORTS SCLibGen =
BEGIN
OPEN SCLibGen;
CreateCellFeedThru: GeneratorProc =
BEGIN
Setup[design, "p4"];
Pins[1, "FeedIn"];
ob ← Finish["Feedthru.mask"];
END;
CreateCellOne: GeneratorProc =
-- difference with ED cell: X and Vdd cannot be connected
BEGIN
Setup[design, "p4"];
MakeVia[row: 1, start: 1, n: 1];
SetN[];
Pins[1, "Vdd"];
PinOrder["Vdd Vdd Gnd"];
ob ← Finish["C2VD00A.mask"];
END;
CreateCellZero: GeneratorProc =
-- difference with ED cell: X and Gnd cannot be connected
BEGIN
Setup[design, "p4"];
SetN[];
MakeVia[row: 1, start: 1, n: 1];
Pins[1, "Gnd"];
PinOrder["Gnd Vdd Gnd"];
ob ← Finish["C2GD00A.mask"];
END;
CreateCellInv: GeneratorProc =
BEGIN
Setup[design, "p1", "p4"];
MakeCont[row: 1, start: 1, n: 6];
MakeCont[row: 2, start: 2, n: 6];
SetN[];
MakeCont[row: 1, start: 1, n: 4];
MakeCont[row: 2, start: 2, n: 3];
PassMs[2];
ContactM2[1, 2];
Pins[2, "I", "X"];
PinOrder["I X Vdd Gnd"];
ob ← Finish["C2IV00A.mask"];
END;
CreateCellNor2: GeneratorProc =
BEGIN
Setup[design, "p1", "p1", "p4"];
MakeCont[row: 1, start: 1, n: 6];
MakeCont[row: 3, start: 2, n: 7];
SetN[];
MakeCont[row: 1, start: 1, n: 4];
MakeCont[row: 2, start: 2, n: 3];
MakeCont[row: 3, start: 1, n: 2];
MakeVia[row: 3, start: 4, n: 1];
HorizontalM[rowL: 2, rowR: 3, h: 4];
PassMs[3];
ContactM2[1, 2];
Pins[3, "I-A", "I-B", "X"];
PinOrder["I-A I-B X Vdd Gnd"];
ob ← Finish["C2NO02A.mask"];
END;
CreateCellNor3: GeneratorProc =
BEGIN
Setup[design, "p1", "p1", "p1", "p4"];
MakeCont[row: 1, start: 1, n: 6];
MakeCont[row: 4, start: 2, n: 6];
SetN[];
MakeCont[row: 1, start: 1, n: 4];
MakeCont[row: 2, start: 2, n: 3];
MakeCont[row: 3, start: 1, n: 3];
MakeCont[row: 4, start: 2, n: 3];
HorizontalM[rowL: 2, rowR: 4, h: 4];
PassMs[4];
ContactM2[1, 2, 3, 4];
Pins[4, "I-A", "I-B", "I-C", "X"];
PinOrder["I-A I-B I-C X Vdd Gnd"];
ob ← Finish["C2NO03A.mask"];
END;
CreateCellNor4: GeneratorProc =
BEGIN
Setup[design, "p1", "p1", "p1", "p1", "p4"];
MakeCont[row: 1, start: 1, n: 6];
MakeCont[row: 5, start: 2, n: 7];
SetN[];
MakeCont[row: 1, start: 1, n: 4];
MakeCont[row: 2, start: 2, n: 3];
MakeCont[row: 3, start: 1, n: 3];
MakeCont[row: 4, start: 2, n: 3];
MakeCont[row: 5, start: 1, n: 2];
MakeVia[row: 5, start: 4, n: 1];
HorizontalM[rowL: 2, rowR: 5, h: 4];
PassMs[5];
ContactM2[1, 2, 3, 4];
Pins[5, "I-A", "I-B", "I-C", "I-D", "X"];
PinOrder["I-A I-B I-C I-D X Vdd Gnd"];
ob ← Finish["C2NO04A.mask"];
END;
CreateCellXor: GeneratorProc =
BEGIN
Setup[design, "p1", "p1", "p1", "p1", "p1", "p4"];
MakeCont[row: 1, start: 2, n: 3];
MakeCont[row: 3, start: 1, n: 2];
MakeVia[row: 3, start: 4, n: 1];
MakeCont[row: 4, start: 2, n: 2];
MakeCont[row: 5, start: 3, n: 2];
MakeCont[row: 6, start: 2, n: 2];
HorizontalM[rowL: 4, rowR: 6, h: 2, back: TRUE, shortStart: FALSE, shortEnd: FALSE];
HorizontalM[rowL: 1, rowR: 3, h: 4];
HorizontalM[rowL: 5, rowR: 6, h: 4];
VerticalM[row: 6, h1: 4, h2: 8];
HorizontalM[rowL: 1, rowR: 5, h: 5, shortEnd: FALSE];
VerticalM[row: 1, h1: 5, h2: 8];
VerticalM[row: 5, h1: 5, h2: 8];
HorizontalM[rowL: 2, rowR: 4, h: 6, shortEnd: FALSE];
VerticalM[row: 2, h1: 6, h2: 8];
VerticalM[row: 4, h1: 6, h2: 8];
SetN[];
MakeCont[row: 1, start: 1, n: 4];
MakeCont[row: 2, start: 2, n: 3];
MakeCont[row: 3, start: 1, n: 3];
MakeCont[row: 4, start: 2, n: 3];
MakeCont[row: 6, start: 1, n: 3 ];
HorizontalM[rowL: 2, rowR: 3, h: 4, shortEnd: FALSE];
HorizontalM[rowL: 4, rowR: 6, h: 4, shortEnd: FALSE];
VerticalM[row: 3, h1: 4, h2: 6];
VerticalM[row: 6, h1: 4, h2: 8];
ContactM2[1, 2, 3, 6];
Pins[6, "I-A", "I-B", NIL, NIL, NIL, "X"];
PinOrder["I-A I-B X Vdd Gnd"];
ob ← Finish["C2XR02A.mask"];
END;
CreateCellXNor: GeneratorProc =
BEGIN
Setup[design, "p1", "p1", "p1", "p1", "p1", "p4"];
MakeCont[row: 1, start: 1, n: 3];
MakeCont[row: 2, start: 2, n: 3];
MakeCont[row: 3, start: 1, n: 2];
MakeVia[row: 3, start: 4, n: 1];
MakeCont[row: 4, start: 2, n: 3];
MakeCont[row: 6, start: 1, n: 2];
HorizontalM[rowL: 2, rowR: 3, h: 4];
HorizontalM[rowL: 4, rowR: 6, h: 4, shortEnd: FALSE];
VerticalM[row: 6, h1: 4, h2: 8];
HorizontalM[rowL: 1, rowR: 5, h: 5, shortEnd: FALSE];
VerticalM[row: 1, h1: 5, h2: 8];
VerticalM[row: 5, h1: 5, h2: 8];
HorizontalM[rowL: 2, rowR: 4, h: 6, shortEnd: FALSE];
VerticalM[row: 2, h1: 6, h2: 8];
VerticalM[row: 4, h1: 6, h2: 8];
SetN[];
MakeCont[row: 1, start: 2, n: 3];
MakeCont[row: 3, start: 1, n: 3];
MakeCont[row: 4, start: 2, n: 3];
MakeCont[row: 5, start: 3, n: 2];
MakeCont[row: 6, start: 2, n: 2];
HorizontalM[rowL: 1, rowR: 3, h: 4, shortEnd: FALSE];
HorizontalM[rowL: 5, rowR: 6, h: 4, shortEnd: FALSE];
VerticalM[row: 3, h1: 4, h2: 6];
VerticalM[row: 6, h1: 4, h2: 8];
HorizontalM[rowL: 4, rowR: 6, h: 1, shortEnd: FALSE, shortStart: FALSE];
ContactM2[1, 2, 3, 6];
Pins[6, "I-A", "I-B", NIL, NIL, NIL, "X"];
PinOrder["I-A I-B X Vdd Gnd"];
ob ← Finish["C2XN02A.mask"];
END;
CreateCellOR2: GeneratorProc =
BEGIN
Setup[design, "p1", "p1", "p1", "p4"];
MakeCont[row: 1, start: 2, n: 5];
MakeCont[row: 3, start: 1, n: 5];
MakeCont[row: 4, start: 2, n: 5];
HorizontalM[rowL: 1, rowR: 3, h: 6, shortEnd: FALSE];
VerticalM[row: 3, h1: 6, h2: 8];
VerticalM[row: 4, h1: 6, h2: 10];
SetN[];
MakeCont[row: 1, start: 1, n: 4];
MakeCont[row: 2, start: 2, n: 3];
MakeCont[row: 3, start: 1, n: 3];
MakeCont[row: 4, start: 2, n: 3];
HorizontalM[rowL: 2, rowR: 3, h: 4, shortEnd: FALSE];
VerticalM[row: 3, h1: 4, h2: 6];
VerticalM[row: 4, h1: 4, h2: 6];
ContactM2[1, 2, 4];
Pins[4, "I-A", "I-B", NIL, "X"];
PinOrder["I-A I-B X Vdd Gnd"];
ob ← Finish["C2OR02A.mask"];
END;
CreateCellOR3: GeneratorProc =
BEGIN
Setup[design, "p1", "p1", "p1", "p1", "p4"];
MakeCont[row: 1, start: 2, n: 5];
MakeCont[row: 4, start: 1, n: 5];
MakeCont[row: 5, start: 2, n: 5];
HorizontalM[rowL: 1, rowR: 4, h: 6, shortEnd: FALSE];
VerticalM[row: 4, h1: 6, h2: 8];
VerticalM[row: 5, h1: 6, h2: 10];
SetN[];
MakeCont[row: 1, start: 2, n: 3];
MakeCont[row: 2, start: 1, n: 3];
MakeCont[row: 3, start: 2, n: 3];
MakeCont[row: 4, start: 1, n: 3];
MakeCont[row: 5, start: 2, n: 3];
HorizontalM[rowL: 1, rowR: 4, h: 4, shortEnd: FALSE];
VerticalM[row: 4, h1: 4, h2: 6];
VerticalM[row: 5, h1: 4, h2: 6];
ContactM2[1, 2, 3, 5];
Pins[5, "I-A", "I-B", "I-C", NIL, "X"];
PinOrder["I-A I-B I-C X Vdd Gnd"];
ob ← Finish["C2OR03A.mask"];
END;
CreateCellOR4: GeneratorProc =
BEGIN
Setup[design, "p1", "p1", "p1", "p1", "p1", "p4"];
MakeCont[row: 1, start: 2, n: 5];
MakeCont[row: 5, start: 1, n: 5];
MakeCont[row: 6, start: 2, n: 5];
HorizontalM[rowL: 1, rowR: 5, h: 6, shortEnd: FALSE];
VerticalM[row: 5, h1: 6, h2: 8];
VerticalM[row: 6, h1: 6, h2: 10];
SetN[];
MakeCont[row: 1, start: 1, n: 4];
MakeCont[row: 2, start: 2, n: 3];
MakeCont[row: 3, start: 1, n: 3];
MakeCont[row: 4, start: 2, n: 3];
MakeCont[row: 5, start: 1, n: 3];
MakeCont[row: 6, start: 2, n: 3];
HorizontalM[rowL: 2, rowR: 5, h: 4, shortEnd: FALSE];
VerticalM[row: 5, h1: 4, h2: 6];
VerticalM[row: 6, h1: 4, h2: 6];
ContactM2[1, 2, 3, 4, 6];
Pins[6, "I-A", "I-B", "I-C", "I-D", NIL, "X"];
PinOrder["I-A I-B I-C I-D X Vdd Gnd"];
ob ← Finish["C2OR04A.mask"];
END;
CreateCellAND2: GeneratorProc =
BEGIN
Setup[design, "p1", "p1", "p1", "p4"];
MakeCont[row: 1, start: 1, n: 6];
MakeCont[row: 2, start: 2, n: 5];
MakeCont[row: 3, start: 1, n: 4]; --DIFFERENT FROM ED
MakeCont[row: 4, start: 2, n: 5];
HorizontalM[rowL: 2, rowR: 3, h: 6, shortEnd: FALSE];
VerticalM[row: 3, h1: 6, h2: 8];
VerticalM[row: 4, h1: 6, h2: 10];
SetN[];
MakeCont[row: 1, start: 2, n: 3];
MakeCont[row: 3, start: 1, n: 2];
MakeCont[row: 4, start: 2, n: 3];
HorizontalM[rowL: 1, rowR: 3, h: 4, shortEnd: FALSE];
VerticalM[row: 3, h1: 4, h2: 6];
VerticalM[row: 4, h1: 4, h2: 6];
ContactM2[1, 2, 4];
Pins[4, "I-A", "I-B", NIL, "X"];
PinOrder["I-A I-B X Vdd Gnd"];
ob ← Finish["C2AN02A.mask"];
END;
CreateCellAND3: GeneratorProc =
BEGIN
Setup[design, "p1", "p1", "p1", "p1", "p4"];
MakeCont[row: 1, start: 2, n: 5];
MakeCont[row: 2, start: 1, n: 4];
MakeCont[row: 3, start: 2, n: 5];
MakeCont[row: 4, start: 1, n: 4];
MakeCont[row: 5, start: 2, n: 5];
HorizontalM[rowL: 1, rowR: 4, h: 6, shortEnd: FALSE];
VerticalM[row: 4, h1: 6, h2: 8];
VerticalM[row: 5, h1: 6, h2: 10];
SetN[];
MakeCont[row: 1, start: 2, n: 3];
MakeCont[row: 4, start: 1, n: 3];
MakeCont[row: 5, start: 2, n: 3];
HorizontalM[rowL: 1, rowR: 4, h: 4, shortEnd: FALSE];
VerticalM[row: 4, h1: 4, h2: 6];
VerticalM[row: 5, h1: 4, h2: 6];
ContactM2[1, 2, 3, 5];
Pins[5, "I-A", "I-B", "I-C", NIL, "X"];
PinOrder["I-A I-B I-C X Vdd Gnd"];
ob ← Finish["C2AN03A.mask"];
END;
CreateCellAND4: GeneratorProc =
BEGIN
Setup[design, "p1", "p1", "p1", "p1", "p1", "p4"];
MakeCont[row: 1, start: 1, n: 6];
MakeCont[row: 2, start: 2, n: 5];
MakeCont[row: 3, start: 1, n: 5];
MakeCont[row: 4, start: 2, n: 5];
MakeCont[row: 5, start: 1, n: 5];
MakeCont[row: 6, start: 2, n: 6];
HorizontalM[rowL: 2, rowR: 5, h: 6, shortEnd: FALSE];
VerticalM[row: 5, h1: 6, h2: 8];
VerticalM[row: 6, h1: 6, h2: 10];
SetN[];
MakeCont[row: 1, start: 2, n: 3];
MakeCont[row: 5, start: 1, n: 3];
MakeCont[row: 6, start: 2, n: 3];
HorizontalM[rowL: 1, rowR: 5, h: 4, shortEnd: FALSE];
VerticalM[row: 5, h1: 4, h2: 6];
VerticalM[row: 6, h1: 4, h2: 6];
ContactM2[1, 2, 3, 4, 6];
Pins[6, "I-A", "I-B", "I-C", "I-D", NIL, "X"];
PinOrder["I-A I-B I-C I-D X Vdd Gnd"];
ob ← Finish["C2AN04A.mask"];
END;
CreateCellNAND2: GeneratorProc =
BEGIN
Setup[design, "p1", "p1", "p4"];
MakeCont[row: 1, start: 2, n: 5];
MakeCont[row: 2, start: 1, n: 5];
MakeCont[row: 3, start: 2, n: 5];
HorizontalM[rowL: 1, rowR: 3, h: 6, shortEnd: FALSE];
VerticalM[row: 3, h1: 6, h2: 8];
SetN[];
MakeCont[row: 1, start: 1, n: 4];
MakeCont[row: 3, start: 2, n: 3];
PassMs[3];
ContactM2[1, 2, 3];
Pins[3, "I-A", "I-B", "X"];
PinOrder["I-A I-B X Vdd Gnd"];
ob ← Finish["C2NA02A.mask"];
END;
CreateCellNAND3: GeneratorProc =
BEGIN
Setup[design, "p1", "p1", "p1", "p4"];
MakeCont[row: 1, start: 1, n: 6];
MakeCont[row: 2, start: 2, n: 5];
MakeCont[row: 3, start: 1, n: 5];
MakeCont[row: 4, start: 2, n: 5];
HorizontalM[rowL: 2, rowR: 4, h: 6, shortEnd: FALSE];
VerticalM[row: 4, h1: 6, h2: 8];
SetN[];
MakeCont[row: 1, start: 1, n: 4];
MakeCont[row: 4, start: 2, n: 3];
PassMs[4];
ContactM2[1, 2, 3, 4];
Pins[4, "I-A", "I-B", "I-C", "X"];
PinOrder["I-A I-B I-C X Vdd Gnd"];
ob ← Finish["C2NA03A.mask"];
END;
CreateCellNAND4: GeneratorProc =
BEGIN
Setup[design, "p1", "p1", "p1", "p1", "p4"];
MakeCont[row: 1, start: 2, n: 5];
MakeCont[row: 2, start: 1, n: 5];
MakeCont[row: 3, start: 2, n: 5];
MakeCont[row: 4, start: 1, n: 5];
MakeCont[row: 5, start: 2, n: 5];
HorizontalM[rowL: 1, rowR: 5, h: 6, shortEnd: FALSE];
VerticalM[row: 5, h1: 6, h2: 8];
SetN[];
MakeCont[row: 1, start: 1, n: 4];
MakeCont[row: 5, start: 2, n: 3];
ContactM2[1, 2, 3, 4, 5];
PassMs[5];
Pins[5, "I-A", "I-B", "I-C", "I-D", "X"];
PinOrder["I-A I-B I-C I-D X Vdd Gnd"];
ob ← Finish["C2NA04A.mask"];
END;
Reset[];
Register["FeedThru", CreateCellFeedThru];
Register["Zero", CreateCellZero];
Register["One", CreateCellOne];
Register["Inv", CreateCellInv];
Register["Nand2", CreateCellNAND2];
Register["Nand3", CreateCellNAND3];
Register["Nand4", CreateCellNAND4];
Register["Nor2", CreateCellNor2];
Register["Nor3", CreateCellNor3];
Register["Nor4", CreateCellNor4];
Register["And2", CreateCellAND2];
Register["And3", CreateCellAND3];
Register["And4", CreateCellAND4];
Register["Or2", CreateCellOR2];
Register["Or3", CreateCellOR3];
Register["Or4", CreateCellOR4];
Register["Xor", CreateCellXor];
Register["Xnor", CreateCellXNor];
END.