⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 techtype.java

📁 The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
        }        private MosInst(char np, double x, double y, double xSize, double ySize,                        double angle,                        String leftDiff, String rightDiff,                        String topPoly, String botPoly,                        TechType tech,                        Cell parent) {            NodeProto npr = np=='n' ? tech.nmos() : tech.pmos();            this.leftDiff = leftDiff;            this.rightDiff = rightDiff;            this.topPoly = topPoly;            this.botPoly = botPoly;            mos = LayoutLib.newNodeInst(npr, x, y, xSize, ySize, angle, parent);        }        private PortInst getPort(String portNm) {            PortInst pi = mos.findPortInst(portNm);            error(pi==null, "MosInst can't find port!");            return pi;        }        public PortInst leftDiff() {return getPort(leftDiff);}        public PortInst rightDiff() {return getPort(rightDiff);}        public PortInst topPoly() {return getPort(topPoly);}        public PortInst botPoly() {return getPort(botPoly);}        public static class MosInstV extends MosInst {            public MosInstV(char np, double x, double y, double w, double l,            		        TechType tech, Cell parent) {                super(np, x, y, l, w, 0,                      "diff-left", "diff-right", "poly-top", "poly-bottom",                      tech, parent);            }        }        public static class MosInstH extends MosInst {            public MosInstH(char np, double x, double y, double w, double l,                            TechType tech, Cell parent) {                super(np, x, y, w, l, 90,                      np+"-trans-diff-top", np+"-trans-diff-bottom",                      np+"-trans-poly-right", np+"-trans-poly-left",                      tech, parent);            }        }    }    //------------------------------ public data ------------------------------    /** These are the Electric technologies understood by the gate layout     * generators */    public static enum TechTypeEnum {MOCMOS, TSMC180, CMOS90;        private TechType type;        public TechType getTechType() {            if (type == null) {                if (this == TechTypeEnum.MOCMOS)                    type = new TechTypeMoCMOS(this);                else if (this == TechTypeEnum.TSMC180)                    type = getTechTypeTSMC180(this);                else if (this == TechTypeEnum.CMOS90)                    type = getTechTypeCMOS90(this);                else {                    System.out.println("Invalid TechTypeEnum");                    assert(false);                }            }            return type;        }    }    private static TechType getTechTypeTSMC180(TechTypeEnum techEnum)    {        TechType tsmc180 = null;        try        {            Class tsmc180Class = Class.forName("com.sun.electric.plugins.tsmc.TechTypeTSMC180");            Constructor<TechType> techConstr = tsmc180Class.getConstructor(TechTypeEnum.class);            tsmc180 = techConstr.newInstance(techEnum);//            java.lang.reflect.Field techField = tsmc180Class.getDeclaredField("TSMC180");//            tsmc180 = (TechType) techField.get(null);         } catch (Exception e)        {            assert(false); // runtime error        }         return tsmc180;    }    private static TechType getTechTypeCMOS90(TechTypeEnum techEnum)    {        TechType cmos90 = null;        try		{			Class cmos90Class = Class.forName("com.sun.electric.plugins.tsmc.TechTypeCMOS90");            Constructor<TechType> techConstr = cmos90Class.getConstructor(TechTypeEnum.class);            cmos90 = techConstr.newInstance(techEnum);//			java.lang.reflect.Field techField = cmos90Class.getDeclaredField("CMOS90");//			cmos90 = (TechType) techField.get(null);         } catch (Exception e)        {            assert(false); // runtime error        } 		return cmos90;    }    //----------------------------- public methods ----------------------------    public abstract int getNumMetals();    public Technology getTechnology() {return technology;}    public TechTypeEnum getEnum() {return techEnum; }    /** layers */    public ArcProto pdiff() {return pdiff;}    public ArcProto ndiff() {return ndiff;}    public ArcProto p1() {return p1;}    public ArcProto m1() {return m1;}    public ArcProto m2() {return m2;}    public ArcProto m3() {return m3;}    public ArcProto m4() {return m4;}    public ArcProto m5() {return m5;}    public ArcProto m6() {return m6;}    public ArcProto m7() {return m7;}    public ArcProto m8() {return m8;}    public ArcProto m9() {return m9;}    public ArcProto ndiff18() {return ndiff18;}    public ArcProto pdiff18() {return pdiff18;}    public ArcProto ndiff25() {return ndiff25;}    public ArcProto pdiff25() {return pdiff25;}    public ArcProto ndiff33() {return ndiff33;}    public ArcProto pdiff33() {return pdiff33;}    /** pins */    public PrimitiveNode ndpin() {return ndpin;}    public PrimitiveNode pdpin() {return pdpin;}    public PrimitiveNode p1pin() {return p1pin;}    public PrimitiveNode m1pin() {return m1pin;}    public PrimitiveNode m2pin() {return m2pin;}    public PrimitiveNode m3pin() {return m3pin;}    public PrimitiveNode m4pin() {return m4pin;}    public PrimitiveNode m5pin() {return m5pin;}    public PrimitiveNode m6pin() {return m6pin;}    public PrimitiveNode m7pin() {return m7pin;}    public PrimitiveNode m8pin() {return m8pin;}    public PrimitiveNode m9pin() {return m9pin;}    /** vias */    public PrimitiveNode nwm1() {return nwm1;}    public PrimitiveNode pwm1() {return pwm1;}    public PrimitiveNode nwm1Y() {return nwm1Y;}    public PrimitiveNode pwm1Y() {return pwm1Y;}    public PrimitiveNode ndm1() {return ndm1;}    public PrimitiveNode pdm1() {return pdm1;}    public PrimitiveNode p1m1() {return p1m1;}    public PrimitiveNode m1m2() {return m1m2;}    public PrimitiveNode m2m3() {return m2m3;}    public PrimitiveNode m3m4() {return m3m4;}    public PrimitiveNode m4m5() {return m4m5;}    public PrimitiveNode m5m6() {return m5m6;}    public PrimitiveNode m6m7() {return m6m7;}    public PrimitiveNode m7m8() {return m7m8;}    public PrimitiveNode m8m9() {return m8m9;}    /** Transistors */    public PrimitiveNode nmos() {return nmos;}    public PrimitiveNode pmos() {return pmos;}    public PrimitiveNode nmos18() {return nmos18;}    public PrimitiveNode pmos18() {return pmos18;}    public PrimitiveNode nmos25() {return nmos25;}    public PrimitiveNode pmos25() {return pmos25;}    public PrimitiveNode nmos33() {return nmos33;}    public PrimitiveNode pmos33() {return pmos33;}    /** special threshold transistor contacts */    public PrimitiveNode nmos18contact() {return nmos18contact;}    public PrimitiveNode pmos18contact() {return pmos18contact;}    public PrimitiveNode nmos25contact() {return nmos25contact;}    public PrimitiveNode pmos25contact() {return pmos25contact;}    public PrimitiveNode nmos33contact() {return nmos33contact;}    public PrimitiveNode pmos33contact() {return pmos33contact;}    /** Well */    public PrimitiveNode nwell() {return nwell;}    public PrimitiveNode pwell() {return pwell;}    /** Layer nodes are sometimes used to patch notches */    public PrimitiveNode m1Node() {return m1Node;}    public PrimitiveNode m2Node() {return m2Node;}    public PrimitiveNode m3Node() {return m3Node;}    public PrimitiveNode m4Node() {return m4Node;}    public PrimitiveNode m5Node() {return m5Node;}    public PrimitiveNode m6Node() {return m6Node;}    public PrimitiveNode m7Node() {return m7Node;}    public PrimitiveNode m8Node() {return m8Node;}    public PrimitiveNode m9Node() {return m9Node;}    public PrimitiveNode p1Node() {return p1Node;}    public PrimitiveNode pdNode() {return pdNode;}    public PrimitiveNode ndNode() {return ndNode;}    public PrimitiveNode pselNode() {return pselNode;}    public PrimitiveNode nselNode() {return nselNode;}    /** Transistor layer nodes */    public PrimitiveNode od18() {return od18;}    public PrimitiveNode od25() {return od25;}    public PrimitiveNode od33() {return od33;}    public PrimitiveNode vth() {return vth;}    public PrimitiveNode vtl() {return vtl;}    /** Essential-Bounds */    public PrimitiveNode essentialBounds() {return essentialBounds;}    /** Facet-Center */    public PrimitiveNode facetCenter() {return facetCenter;}    public PrimitiveNode getViaFor(ArcProto a1, ArcProto a2) {        return viaMap.get(new ArcPair(a1, a2));    }    public int layerHeight(ArcProto p) {        for (int i = 0; i < nbLay; i++) {            if (layers[i] == p)                return i;        }        error(true, "Can't find layer: " + p);        return -1;    }    public ArcProto closestLayer(PortProto port, ArcProto layer) {        int h = layerHeight(layer);        for (int dist = 0; dist < nbLay; dist++) {            int lookUp = h + dist;            int lookDn = h - dist;            if (lookUp < nbLay) {                ArcProto lay = layerAtHeight(lookUp);                if (port.connectsTo(lay))                    return lay;            }            if (lookDn >= 0) {                ArcProto lay = layerAtHeight(lookDn);                if (port.connectsTo(lay))                    return lay;            }        }        error(true, "port can't connect to any layer?!!");        return null;    }        public ArcProto highestLayer(PortProto port) {    	for (int h=layers.length-1; h>=0; h--) {    		if (port.connectsTo(layers[h])) return layers[h];    	}    	error(true, "port can't connect to any layer?!!");    	return null;    }        public ArcProto layerAtHeight(int layHeight) {return layers[layHeight];	}    public PrimitiveNode viaAbove(int layHeight) {return vias[layHeight];}    public PrimitiveNode viaBelow(int layHeight) {return vias[layHeight - 1];}    /** round to avoid MOCMOS CIF resolution errors */    public abstract double roundToGrid(double x);    public abstract MosInst newNmosInst(double x, double y,                                        double w, double l, Cell parent);    public abstract MosInst newPmosInst(double x, double y,                                        double w, double l, Cell parent);    public abstract String name();    public abstract double reservedToLambda(int layer, double nbTracks);    	/** @return min width of Well */	public double getWellWidth() {return nwm1.getMinSizeRule().getWidth();}	/** @return amount that well surrounds diffusion */	public double getWellSurroundDiff() {return wellSurroundDiff;}	/** @return MOS edge to gate edge */    public double getGateExtendPastMOS() {return gateExtendPastMOS;}    /** @return min width of polysilicon 1 */    public double getP1Width() {return p1Width;}    /** @return min spacing between polysilicon 1 */    public double getP1ToP1Space() {return p1ToP1Space;}    /** @return min spacing between gates of series transistors */     public double getGateToGateSpace() {return gateToGateSpace;}    /** @return min spacing between MOS gate and diffusion edge of diff contact */    public double getGateToDiffContSpace() {return gateToDiffContSpace;}    /** @return min spacing between MOS gate and diffusion edge of diff contact     * when the diffusion width is larger than the gate width */    public double getGateToDiffContSpaceDogBone() {return gateToDiffContSpaceDogBone;}    /** @return min width of diffusion surrounding diff contact */    public double getDiffContWidth() {        SizeOffset so = ndm1().getProtoSizeOffset();        return (ndm1().getMinSizeRule().getHeight() - so.getHighYOffset() - so.getLowYOffset());    }    /** @return min width of poly contact */    public double getP1M1Width() {        SizeOffset so = p1m1().getProtoSizeOffset();        return (p1m1().getMinSizeRule().getHeight() - so.getHighYOffset() - so.getLowYOffset());    }    /** @return gate length that depends on foundry */    public double getGateLength() {return gateLength;}    /** @return amount that select surrounds diffusion in well? */    public double selectSurroundDiffInActiveContact() {return selectSurroundDiffInActiveContact;}    /** @return amount that Select surrounds MOS, along gate width dimension */    public double selectSurroundDiffAlongGateInTrans() {return selectSurroundDiffAlongGateInTrans;}    /** @return y offset of poly arc connecting poly contact and gate in a L-Shape case */    public double getPolyLShapeOffset() {return offsetLShapePolyContact;}    /** @return y offset of poly arc connecting poly contact and gate in a T-Shape case */    public double getPolyTShapeOffset() {return offsetTShapePolyContact;}    /** @return select spacing rule */    public double getSelectSpacingRule() {return selectSpace;}    /** @return select surround active in transistors but not along the gate */    public double getSelectSurroundDiffInTrans() {return selectSurroundDiffInTrans;}    /** @return select surround over poly */    public double getSelectSurroundOverPoly() {return selectSurround;}    /** @return minimum metal1 area (sq lambda) */    public double getM1MinArea() {return m1MinArea;}    /** @return width of metal-1 in min sized diffusion contact */    public double getDiffCont_m1Width() {return diffCont_m1Width;}    /** @return amount diffusion contact grows to accomodate an one additional contact cut */     public double getDiffContIncr() {return diffContIncr;}        public Variable.Key getAttrX() {return ATTR_X;}    public Variable.Key getAttrS() {return ATTR_S;}    public Variable.Key getAttrSP() {return ATTR_SP;}    public Variable.Key getAttrSN() {return ATTR_SN;}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -