~ubuntu-branches/ubuntu/intrepid/electric/intrepid

« back to all changes in this revision

Viewing changes to com/sun/electric/tool/generator/layout/gates/MoCMOSGenerator.java

  • Committer: Bazaar Package Importer
  • Author(s): Onkar Shinde
  • Date: 2008-07-23 02:09:53 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080723020953-1gmnv7q2wpsdbnop
Tags: 8.07-0ubuntu1
* New Upstream version. Please check changelog for details. (LP: #242720)
* debian/control
  - Add build dependencies *-jdk, cdbs and bsh.
  - Remove build dependency dpatch. We will be using CDBS simple patchsys.
  - Refreshed runtime dependencies to default-jre | java2-runtime and bsh.
  - Added home page field.
  - Standard version 3.8.0.
  - Modify Maintainer value to match the DebianMaintainerField
    specification.
  - Changed email address for original maintainer to indicate who has
    refreshed the packaging.
* debian/rules
  - Revamped to use cdbs.
  - Added get-orig-source target.
* debian/patches
  - 00list, 02_sensible-browser.dpatch, 01_errors-numbers.dpatch,
    03_manpage.dpatch - Deleted, not relevant anymore.
  - 01_fix_build_xml.patch - Patch to fix the build.xml.
* debian/ant.properties
  - File to set various compilation properties.
* debian/electric.1
  - Remove the entry that causes lintian warning.
* debian/electric.desktop
  - Change as suggested by desktop-file-validate.
* debian/electric.docs
  - Updated as per changes in file names.
* debian/electric.svg
  - Name changed from electric_icon.svg.
* debian/install
  - Added appropriate locations for jar file, desktop file and wrapper shell
    script.
* debian/README.source
  - Added to comply with standards version 3.8.0.
* debian/TODO.Debian
  - Name changed form TODO.
* debain/wrapper/electric
  - Wrapper shell script to launch the application.
* debian/manpages
  - Added for installation of manpage.
* debian/watch
  - Updated to match jar files instead of older tar.gz files.
* debian/dirs
  - Removed, not needed anymore.
* debian/{electric.doc-base, electric.examples, substvars}
  - Removed, not relevant anymore.
* debian/*.debhelper
  - Removed auto generated files. Not relevant anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- tab-width: 4 -*-
 
2
 *
 
3
 * Electric(tm) VLSI Design System
 
4
 *
 
5
 * File: MoCMOSGenerator.java
 
6
 * Written by: Jonathan Gainsley, Sun Microsystems.
 
7
 *
 
8
 * Copyright (c) 2003 Sun Microsystems and Static Free Software
 
9
 *
 
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.
 
14
 *
 
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.
 
19
 *
 
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.
 
24
 */
 
25
package com.sun.electric.tool.generator.layout.gates;
 
26
 
 
27
import com.sun.electric.tool.generator.layout.StdCellParams;
 
28
import com.sun.electric.database.hierarchy.Cell;
 
29
 
 
30
public class MoCMOSGenerator {
 
31
 
 
32
 
 
33
    /**
 
34
     * Generate a Gate
 
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
 
39
     */
 
40
    public static Cell makeGate(String gateType, double Xstrength, StdCellParams sc) {
 
41
        double x = Xstrength;
 
42
        String pNm = gateType;
 
43
        Cell gate = null;
 
44
 
 
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);
 
89
 
 
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);
 
97
                
 
98
        return gate;
 
99
    }
 
100
 
 
101
    private static int gateNb;
 
102
 
 
103
    private static void tracePass(double x) {
 
104
        System.out.println("\nbegin pass x="+x);
 
105
        gateNb=0;
 
106
    }
 
107
 
 
108
    private static void traceGate() {
 
109
        System.out.print(" "+gateNb++);
 
110
        System.out.flush();
 
111
    }
 
112
 
 
113
    /**
 
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
 
117
    */
 
118
    public static void generateAllGates(double x, StdCellParams stdCell) {
 
119
        tracePass(x);
 
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();
 
162
 
 
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);
 
171
    }
 
172
 
 
173
}