~ubuntu-branches/ubuntu/vivid/electric/vivid

« back to all changes in this revision

Viewing changes to com/sun/electric/technology/technologies/Generic.java

  • Committer: Package Import Robot
  • Author(s): Markus Koschany
  • Date: 2014-07-08 21:54:23 UTC
  • mfrom: (1.1.6) (3.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20140708215423-4zrgsca1e28tzcoc
Tags: 9.05+dfsg-1
* Imported Upstream version 9.05+dfsg.
* Add signing-key.pgp and check for valid upstream tarballs with uscan's
  pgpsigurlmangle feature.
* Move the package to Git.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
 */
52
52
public class Generic extends Technology {
53
53
 
54
 
    /** the Generic Technology object. */
55
 
    public static Generic tech() {
56
 
        return TechPool.getThreadTechPool().getGeneric();
57
 
    }
58
54
    /** the Universal Layer. */
59
55
    private final Layer universalLay;
60
56
    /** the Glyph Layer. */
61
57
    public final Layer glyphLay;
62
58
    /** the DRC exclusion Layer. */
63
59
    public final Layer drcLay;
 
60
    /** the Routing exclusion Layer. */
 
61
    public final Layer routeLay;
64
62
    /** the AFG exclusion Layer. */
65
63
    public final Layer afgLay;
 
64
    /** the simulation probe Layer. */
 
65
    public final Layer simProbeLay;
66
66
    /** the Universal Pin node, which connects to every type of arc. */
67
67
    public final PrimitiveNode universalPinNode;
68
68
    /** the Invisible Pin node, which connects to every type of arc and produces no layout. */
75
75
    public final PrimitiveNode portNode;
76
76
    /** the DRC exclusion node, all design-rule errors covered by this node are ignored. */
77
77
    public final PrimitiveNode drcNode;
 
78
    /** the Routing exclusion node, routes are disallowed under this (annotation states which layer are excluded). */
 
79
    public final PrimitiveNode routeNode;
78
80
    /** the AFG exclusion node, tells auto-fill generator to ignore the area. */
79
81
    public final PrimitiveNode afgNode;
80
82
    /** the Essential-bounds node, used (in pairs) to define the important area of a cell. */
88
90
    /** the Unrouted arc, connects to any node and specifies desired routing topology. */
89
91
    public final ArcProto unrouted_arc;
90
92
 
 
93
    /** key of Variable holding routing exclusion layers. */
 
94
    public static final Variable.Key ROUTING_EXCLUSION = Variable.newKey("GEN_routing_exclusion");
 
95
 
 
96
    /** the Generic Technology object. */
 
97
    public static Generic tech() {
 
98
        return TechPool.getThreadTechPool().getGeneric();
 
99
    }
 
100
 
91
101
    // -------------------- private and protected methods ------------------------
92
102
    public static Generic newInstance(IdManager idManager) {
93
103
        Generic generic = new Generic(idManager);
100
110
        setTechShortName("Generic");
101
111
        setTechDesc("Useful primitives");
102
112
        setNonStandard();
103
 
 
104
113
        setFactoryScale(1000, false);                   // in nanometers: really 1 micron
105
114
 
106
115
        //**************************************** LAYERS ****************************************
109
118
        universalLay = Layer.newInstance(this, "Universal",
110
119
                new EGraphics(false, false, null, 0, 0, 0, 0, 1.0, true,
111
120
                new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}));
 
121
        universalLay.setFunction(Layer.Function.UNKNOWN);
112
122
 
113
123
        /** Invisible layer */
114
124
        Layer invisible_lay = Layer.newInstance(this, "Invisible",
115
125
                new EGraphics(false, false, null, 0, 180, 180, 180, 1.0, true,
116
126
                new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}));
 
127
        invisible_lay.setFunction(Layer.Function.UNKNOWN, Layer.Function.NONELEC);
117
128
 
118
129
        /** Unrouted layer */
119
130
        Layer unrouted_lay = Layer.newInstance(this, "Unrouted",
120
131
                new EGraphics(false, false, null, 0, 100, 100, 100, 1.0, true,
121
132
                new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}));
 
133
        unrouted_lay.setFunction(Layer.Function.UNKNOWN);
122
134
 
123
135
        /** Glyph layer */
124
136
        glyphLay = Layer.newInstance(this, "Glyph",
125
137
                new EGraphics(false, false, null, 0, 0, 0, 0, 1.0, true,
126
138
                new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}));
 
139
        glyphLay.setFunction(Layer.Function.ART, Layer.Function.NONELEC);
127
140
 
128
141
        /** DRC layer */
129
142
        drcLay = Layer.newInstance(this, "DRC",
130
143
                new EGraphics(false, false, null, 0, 255, 190, 6, 1.0, true,
131
144
                new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}));
 
145
        drcLay.setFunction(Layer.Function.ART, Layer.Function.NONELEC);
 
146
 
 
147
        /** Routing layer */
 
148
        routeLay = Layer.newInstance(this, "Route",
 
149
            new EGraphics(true, true, null, 0, 255, 86, 6, 0.8, true,
 
150
            new int[]{0x8888,   // X   X   X   X  
 
151
                0x2222,                 //   X   X   X   X 
 
152
                0x8888,                 // X   X   X   X  
 
153
                0x2222,                 //   X   X   X   X 
 
154
                0x8888,                 // X   X   X   X  
 
155
                0x2222,                 //   X   X   X   X 
 
156
                0x8888,                 // X   X   X   X  
 
157
                0x2222,                 //   X   X   X   X 
 
158
                0x8888,                 // X   X   X   X  
 
159
                0x2222,                 //   X   X   X   X 
 
160
                0x8888,                 // X   X   X   X  
 
161
                0x2222,                 //   X   X   X   X 
 
162
                0x8888,                 // X   X   X   X  
 
163
                0x2222,                 //   X   X   X   X 
 
164
                0x8888,                 // X   X   X   X  
 
165
                0x2222}));              //   X   X   X   X 
 
166
        routeLay.setFunction(Layer.Function.ART, Layer.Function.NONELEC);
132
167
 
133
168
        /** AFG layer */
134
169
        afgLay = Layer.newInstance(this, "AFG",
135
170
                new EGraphics(false, false, null, 0, 255, 6, 190, 1.0, true,
136
171
                new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}));
 
172
        afgLay.setFunction(Layer.Function.ART, Layer.Function.NONELEC);
137
173
 
138
174
        /** Simulation Probe layer */
139
 
        Layer simprobe_lay = Layer.newInstance(this, "Sim-Probe",
 
175
        simProbeLay = Layer.newInstance(this, "Sim-Probe",
140
176
                new EGraphics(false, false, null, 0, 0, 255, 0, 1.0, true,
141
177
                new int[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}));
142
 
 
143
 
        // The layer functions
144
 
        universalLay.setFunction(Layer.Function.UNKNOWN);                                                                                       // Universal
145
 
        invisible_lay.setFunction(Layer.Function.UNKNOWN, Layer.Function.NONELEC);                                      // Invisible
146
 
        unrouted_lay.setFunction(Layer.Function.UNKNOWN);                                                                                       // Unrouted
147
 
        glyphLay.setFunction(Layer.Function.ART, Layer.Function.NONELEC);                                                       // Glyph
148
 
        drcLay.setFunction(Layer.Function.ART, Layer.Function.NONELEC);                                                 // DRC
149
 
        afgLay.setFunction(Layer.Function.ART, Layer.Function.NONELEC);                                                 // AFG
150
 
        simprobe_lay.setFunction(Layer.Function.ART, Layer.Function.NONELEC);                                           // Sim probe
 
178
        simProbeLay.setFunction(Layer.Function.ART, Layer.Function.NONELEC);
151
179
 
152
180
        //**************************************** ARCS ****************************************
153
181
 
183
211
        universalPinNode.addPrimitivePorts(univPinPort);
184
212
        universalPinNode.setFunction(PrimitiveNode.Function.PIN);
185
213
        universalPinNode.setWipeOn1or2();
186
 
//              universalPinNode.setHoldsOutline();
187
214
        universalPinNode.setCanBeZeroSize();
188
215
 
189
216
        /** Invisible pin */
246
273
        essentialBoundsNode.setFunction(PrimitiveNode.Function.ART);
247
274
        essentialBoundsNode.setCanBeZeroSize();
248
275
 
249
 
        /** Simulation Probe Node */
250
 
        simProbeNode = PrimitiveNode.newInstance("Simulation-Probe", this, 10.0, 10.0,
251
 
                new Technology.NodeLayer[]{
252
 
                    new Technology.NodeLayer(simprobe_lay, 0, Poly.Type.FILLED, Technology.NodeLayer.BOX, new Technology.TechPoint[]{
253
 
                        new Technology.TechPoint(EdgeH.l(-5), EdgeV.b(-5)),
254
 
                        new Technology.TechPoint(EdgeH.r(5), EdgeV.t(5))
255
 
                    })
256
 
                });
257
 
 
258
 
        PrimitivePort simProbePort = PrimitivePort.single(simProbeNode, new ArcProto[]{invisible_arc, universal_arc}, "center", 0, 180, 0, PortCharacteristic.UNKNOWN,
259
 
                EdgeH.l(-5), EdgeV.b(-5), EdgeH.r(5), EdgeV.t(5));
260
 
        simProbeNode.addPrimitivePorts(simProbePort);
261
 
        simProbeNode.setFunction(PrimitiveNode.Function.ART);
262
 
        simProbeNode.setCanBeZeroSize();
263
 
 
264
276
        // The pure layer nodes
265
277
        drcNode = drcLay.makePureLayerNode("DRC-Node", 2.0, Poly.Type.FILLED, "center", invisible_arc, universal_arc);
 
278
        routeNode = routeLay.makePureLayerNode("Route-Node", 2.0, Poly.Type.FILLED, "center", invisible_arc, universal_arc);
266
279
        afgNode = afgLay.makePureLayerNode("AFG-Node", 2.0, Poly.Type.FILLED, "center", invisible_arc, universal_arc);
 
280
        simProbeNode = simProbeLay.makePureLayerNode("Simulation-Probe", 10.0, Poly.Type.FILLED, "center", invisible_arc, universal_arc);
267
281
 
268
 
        //Foundry
 
282
        // Foundry
269
283
        newFoundry(Foundry.Type.NONE, null);
270
284
 
271
285
        oldNodeNames.put("Cell-Center", cellCenterNode);
319
333
            if (hasDisplayVars || n.isUsernamed() || b.hasExportsOnNode(n)) {
320
334
                return;
321
335
            }
322
 
//                      if (ni.isInvisiblePinWithText())
323
 
//                              primLayers = NULLNODELAYER;
324
336
            b.genShapeOfNode(n, this, primLayers, null);
325
337
        }
326
338
    }
336
348
        return pn == universalPinNode || pn == invisiblePinNode || pn == simProbeNode;
337
349
    }
338
350
 
339
 
//      /**
340
 
//       * Method to convert old primitive names to their proper NodeProtos.
341
 
//       * @param name the name of the old primitive.
342
 
//       * @return the proper PrimitiveNode to use (or null if none can be determined).
343
 
//       */
344
 
//      public PrimitiveNode convertOldNodeName(String name)
345
 
//      {
346
 
//              if (name.equals("Cell-Center")) return(cellCenterNode);
347
 
//              return null;
348
 
//      }
349
351
    /**
350
 
     * Method to detect if this Generic proto is not relevant for some tool calculation and therefore
 
352
     * Method to detect if this Generic prototype is not relevant for some tool calculation and therefore
351
353
     * could be skip. E.g. cellCenter, drcNodes, essential bounds.
352
354
     * Similar for layer generation and automatic fill.
353
355
     * @param ni the NodeInst in question.
362
364
            return false;
363
365
        }
364
366
        Generic tech = (Generic) np.getTechnology();
365
 
        return (np == tech.cellCenterNode || np == tech.drcNode
366
 
                || np == tech.essentialBoundsNode || np == tech.afgNode);
 
367
        return (np == tech.cellCenterNode || np == tech.drcNode || np == tech.routeNode ||
 
368
                np == tech.essentialBoundsNode || np == tech.afgNode);
367
369
    }
368
370
    
369
371
    /**
370
 
     * Method to check if proto associated to NodeInst is the cell center.
 
372
     * Method to check if prototype associated with NodeInst is the cell center.
371
373
     * Useful to avoid rotating the center in Cell -> Rotate.
372
374
     * This function is much faster than isSpecialGenericNode since we don't
373
375
     * check if NodeInst is a cell or the technology is Generic
380
382
    }
381
383
    
382
384
    /**
383
 
     * Method to check if proto associated to NodeInst is an essential bounds.
 
385
     * Method to check if prototype associated with NodeInst is an essential bounds.
384
386
     * @param ni the NodeInst in question.
385
387
     * @return true if it is an essential bounds.
386
388
     */
390
392
    }
391
393
    
392
394
    /**
393
 
     * Method to check if proto associated to NodeInst is either the
 
395
     * Method to check if prototype associated with NodeInst is either the
394
396
     * cell center or an essential bounds.
395
397
     * @param ni the NodeInst in question.
396
398
     * @return true if it is a cell center or essential bounds.