1
/* -*- tab-width: 4 -*-
3
* Electric(tm) VLSI Design System
5
* File: MoCMOSGenerator.java
6
* Written by: Jonathan Gainsley, Sun Microsystems.
8
* Copyright (c) 2003 Sun Microsystems and Static Free Software
10
* Electric(tm) is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 3 of the License, or
13
* (at your option) any later version.
15
* Electric(tm) is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with Electric(tm); see the file COPYING. If not, write to
22
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
23
* Boston, Mass 02111-1307, USA.
25
package com.sun.electric.tool.generator.layout.gates;
27
import com.sun.electric.tool.generator.layout.StdCellParams;
28
import com.sun.electric.database.hierarchy.Cell;
30
public class MoCMOSGenerator {
35
* @param gateType the gate type ("inv", "nand2", etc)
36
* @param Xstrength the drive strength of the gate
37
* @param sc the standard cell parameters
38
* @return the generated Cell
40
public static Cell makeGate(String gateType, double Xstrength, StdCellParams sc) {
42
String pNm = gateType;
45
if (pNm == null) return null;
46
else if (pNm.equals("inv")) gate = Inv.makePart(x, sc);
47
else if (pNm.equals("inv2i")) gate = Inv2i.makePart(x, sc);
48
else if (pNm.equals("inv2iKn")) gate = Inv2iKn.makePart(x, sc);
49
else if (pNm.equals("inv2iKp")) gate = Inv2iKp.makePart(x, sc);
50
else if (pNm.equals("invCLK")) gate = InvCLK.makePart(x, sc);
51
else if (pNm.equals("invCTLn")) gate = InvCTLn.makePart(x, sc);
52
else if (pNm.equals("invHT")) gate = InvHT.makePart(x, sc);
53
else if (pNm.equals("invLT")) gate = InvLT.makePart(x, sc);
54
else if (pNm.equals("inv_passgate")) gate = Inv_passgate.makePart(x, sc);
55
else if (pNm.equals("mullerC_sy")) gate = MullerC_sy.makePart(x, sc);
56
else if (pNm.equals("nand2")) gate = Nand2.makePart(x, sc);
57
//else if (pNm.equals("nand2HLT")) gate = Nand2HLT.makePart(x, sc);
58
else if (pNm.equals("nand2HLT_sy")) gate = Nand2HLT_sy.makePart(x, sc);
59
else if (pNm.equals("nand2LT")) gate = Nand2LT.makePart(x, sc);
60
else if (pNm.equals("nand2LT_sy")) gate = Nand2LT_sy.makePart(x, sc);
61
else if (pNm.equals("nand2PH")) gate = Nand2PH.makePart(x, sc);
62
//else if (pNm.equals("nand2PHfk")) gate = Nand2PHfk.makePart(x, sc);
63
else if (pNm.equals("nand2_sy")) gate = Nand2_sy.makePart(x, sc);
64
else if (pNm.equals("nand2en")) gate = Nand2en.makePart(x, sc);
65
else if (pNm.equals("nand2LTen")) gate = Nand2LTen.makePart(x, sc);
66
else if (pNm.equals("nand2HTen")) gate = Nand2HTen.makePart(x, sc);
67
//else if (pNm.equals("nand2en_sy")) gate = Nand2en_sy.makePart(x, sc);
68
else if (pNm.equals("nand3")) gate = Nand3.makePart(x, sc);
69
else if (pNm.equals("nand3LT")) gate = Nand3LT.makePart(x, sc);
70
else if (pNm.equals("nand3LT_sy3")) gate = Nand3LT_sy3.makePart(x, sc);
71
else if (pNm.equals("nand3LTen")) gate = Nand3LTen.makePart(x, sc);
72
//else if (pNm.equals("nand3LTen_sy")) gate = Nand3LTen_sy.makePart(x, sc);
73
//else if (pNm.equals("nand3LTen_sy3")) gate = Nand3LTen_sy3.makePart(x, sc);
74
else if (pNm.equals("nand3MLT")) gate = Nand3MLT.makePart(x, sc);
75
//else if (pNm.equals("nand3_sy3")) gate = Nand3_sy3.makePart(x, sc);
76
else if (pNm.equals("nand3en")) gate = Nand3en.makePart(x, sc);
77
//else if (pNm.equals("nand3en_sy")) gate = Nand3en_sy.makePart(x, sc);
78
//else if (pNm.equals("nand3en_sy3")) gate = Nand3en_sy3.makePart(x, sc);
79
else if (pNm.equals("nms1")) gate = Nms1.makePart(x, sc);
80
else if (pNm.equals("nms2")) gate = Nms2.makePart(x, sc);
81
else if (pNm.equals("nms2_sy")) gate = Nms2_sy.makePart(x, sc);
82
else if (pNm.equals("nms3_sy3")) gate = Nms3_sy3.makePart(x, sc);
83
else if (pNm.equals("nor2")) gate = Nor2.makePart(x, sc);
84
//else if (pNm.equals("nor2LT")) gate = Nor2LT.makePart(x, sc);
85
else if (pNm.equals("nor2kresetV")) gate = Nor2kresetV.makePart(x, sc);
86
else if (pNm.equals("pms1")) gate = Pms1.makePart(x, sc);
87
else if (pNm.equals("pms2")) gate = Pms2.makePart(x, sc);
88
else if (pNm.equals("pms2_sy")) gate = Pms2_sy.makePart(x, sc);
90
// The layout of these keeper gates are identical to normal gates.
91
// They're just treated differently by Logical Effort tool.
92
else if (pNm.equals("invK")) gate = Inv.makePart(x, sc);
93
else if (pNm.equals("nand2k")) gate = Nand2.makePart(x, sc);
94
else if (pNm.equals("nms1K")) gate = Nms1.makePart(x, sc);
95
else if (pNm.equals("nms2K")) gate = Nms2.makePart(x, sc);
96
else if (pNm.equals("pms1K")) gate = Pms1.makePart(x, sc);
101
private static int gateNb;
103
private static void tracePass(double x) {
104
System.out.println("\nbegin pass x="+x);
108
private static void traceGate() {
109
System.out.print(" "+gateNb++);
114
* Generates all gates with the given size and standard cell params
115
* @param x the drive strength
116
* @param stdCell the standard cell parameters
118
public static void generateAllGates(double x, StdCellParams stdCell) {
120
Inv.makePart(x, stdCell); traceGate();
121
Inv_star_wideOutput.makePart(x, "", stdCell); traceGate();
122
Inv2i.makePart(x, stdCell); traceGate();
123
Inv2iKn.makePart(x, stdCell); traceGate();
124
Inv2iKp.makePart(x, stdCell); traceGate();
125
InvCLK.makePart(x, stdCell); traceGate();
126
InvCTLn.makePart(x, stdCell); traceGate();
127
InvHT.makePart(x, stdCell); traceGate();
128
InvLT.makePart(x, stdCell); traceGate();
129
Inv_passgate.makePart(x, stdCell); traceGate();
130
MullerC_sy.makePart(x, stdCell); traceGate();
131
Nand2.makePart(x, stdCell); traceGate();
132
//Nand2HLT.makePart(x, stdCell); traceGate(); //no purple schematic
133
Nand2HLT_sy.makePart(x, stdCell); traceGate();
134
Nand2LT.makePart(x, stdCell); traceGate();
135
Nand2LT_sy.makePart(x, stdCell); traceGate();
136
Nand2PH.makePart(x, stdCell); traceGate();
137
//Nand2PHfk.makePart(x, stdCell); traceGate(); //DRC error because mirroring doesn't work
138
Nand2_sy.makePart(x, stdCell); traceGate();
139
Nand2en.makePart(x, stdCell); traceGate();
140
//Nand2en_sy.makePart(x, stdCell); traceGate(); // no purple schematic
141
Nand3.makePart(x, stdCell); traceGate();
142
Nand3LT.makePart(x, stdCell); traceGate();
143
Nand3LT_sy3.makePart(x, stdCell); traceGate();
144
Nand3LTen.makePart(x, stdCell); traceGate();
145
//Nand3LTen_sy.makePart(x, stdCell); traceGate(); // real NCC mismatch
146
//Nand3LTen_sy3.makePart(x, stdCell); traceGate(); // no purple schematic
147
Nand3MLT.makePart(x, stdCell); traceGate();
148
//Nand3_sy3.makePart(x, stdCell); traceGate(); //no purple schematic
149
Nand3en.makePart(x, stdCell); traceGate();
150
//Nand3en_sy.makePart(x, stdCell); traceGate(); // real NCC mismatch
151
//Nand3en_sy3.makePart(x, stdCell); traceGate();// no purple schematic
152
Nms1.makePart(x, stdCell); traceGate();
153
Nms2.makePart(x, stdCell); traceGate();
154
Nms2_sy.makePart(x, stdCell); traceGate();
155
Nms3_sy3.makePart(x, stdCell); traceGate(); //DRC error: doesn't fit in 42 lambda
156
Nor2.makePart(x, stdCell); traceGate();
157
//Nor2LT.makePart(x, stdCell); traceGate(); //no purple schematic
158
Nor2kresetV.makePart(x, stdCell); traceGate();
159
Pms1.makePart(x, stdCell); traceGate();
160
Pms2.makePart(x, stdCell); traceGate();
161
Pms2_sy.makePart(x, stdCell); traceGate();
163
// // Test gates that can double strap MOS gates
164
// stdCell.setDoubleStrapGate(true);
165
// Inv.makePart(x, stdCell); traceGate();
166
// InvLT.makePart(x, stdCell); traceGate();
167
// InvHT.makePart(x, stdCell); traceGate();
168
// Nms1.makePart(x, stdCell); traceGate();
169
// Pms1.makePart(x, stdCell); traceGate();
170
// stdCell.setDoubleStrapGate(false);