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

📄 layer.java

📁 The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
        try        {            Class<?> viewClass = Resources.get3DClass("View3DWindow");            Method setMethod = viewClass.getDeclaredMethod("setZValues", new Class[] {Layer.class, Double.class, Double.class, Double.class, Double.class});            setMethod.invoke(viewClass,  new Object[] {this, new Double(getDistance()), new Double(getThickness()), new Double(distance), new Double(getThickness())});        } catch (Exception e) {            String extra = (e.getMessage() != null) ? " due to: " + e.getMessage() : ".";            System.out.print("Cannot call 3D plugin method setZValues" + extra);//            e.printStackTrace();        }        getDoublePref("Distance", layer3DDistancePrefs, distance).setDouble(distance);    }	/**	 * Method to calculate Z value of the upper part of the layer.	 * Note: not called getHeight to avoid confusion	 * with getDistance())     * Don't call distance+thickness because those are factory values.	 * @return Height of the layer	 */	public double getDepth() { return (getDistance()+getThickness()); }	/**	 * Method to return the thickness of this layer.	 * Layers can have a thickness of 0, which causes them to be rendered flat.	 * @return the thickness of this layer.	 */	public double getThickness() {        if (isPseudoLayer())            return 0;        return getDoublePref("Thickness", layer3DThicknessPrefs, DEFAULT_THICKNESS).getDouble();    }	/**	 * Method to return the thickness of this layer, by default.	 * Layers can have a thickness of 0, which causes them to be rendered flat.	 * @return the thickness of this layer, by default.	 */	public double getFactoryThickness() {        if (isPseudoLayer())            return 0;        return getDoublePref("Thickness", layer3DThicknessPrefs, DEFAULT_THICKNESS).getDoubleFactoryValue();    }	/**	 * Method to set the thickness of this layer.	 * Layers can have a thickness of 0, which causes them to be rendered flat.	 * @param thickness the thickness of this layer.	 */	public void setThickness(double thickness)    {        assert !isPseudoLayer();        // Not done with observer/observable to avoid long list of elements attached to this class        // so reflection will be used.        try        {            Class<?> viewClass = Resources.get3DClass("View3DWindow");            Method setMethod = viewClass.getDeclaredMethod("setZValues", new Class[] {Layer.class, Double.class, Double.class, Double.class, Double.class});            setMethod.invoke(viewClass,  new Object[] {this, new Double(getDistance()), new Double(getThickness()), new Double(getDistance()), new Double(thickness)});        } catch (Exception e) {            System.out.println("Cannot call 3D plugin method setZValues: " + e.getMessage());            e.printStackTrace();        }        getDoublePref("Thickness", layer3DThicknessPrefs, thickness).setDouble(thickness);    }	/**	 * Method to set the factory-default CIF name of this Layer.	 * @param cifLayer the factory-default CIF name of this Layer.	 */	public void setFactoryCIFLayer(String cifLayer) {        assert !isPseudoLayer();        cifLayerSetting = makeLayerSetting("CIF", cifLayer);    }	/**	 * Method to return the CIF name of this layer.	 * @return the CIF name of this layer.	 */	public String getCIFLayer() { return cifLayerSetting.getString(); }	/**	 * Returns project Setting to tell the CIF name of this Layer.	 * @return project Setting to tell the CIF name of this Layer.	 */	public Setting getCIFLayerSetting() { return cifLayerSetting; }    /**     * Generate key name for GDS value depending on the foundry     * @return     *///    private String getGDSPrefName(String foundry)//    {//        return ("GDS("+foundry+")");//    }	/**	 * Method to set the factory-default GDS name of this Layer.	 * @param factoryDefault the factory-default GDS name of this Layer.     * @param foundry     *///	public void setFactoryGDSLayer(String factoryDefault, String foundry)//    {//        // Getting rid of spaces//        String value = factoryDefault.replaceAll(", ", ",");//        getLayerSetting(getGDSPrefName(foundry), gdsLayerPrefs, value);//    }	/**	 * Method to set the GDS name of this Layer.	 * @param gdsLayer the GDS name of this Layer.	 *///	public void setGDSLayer(String gdsLayer)//    {//        assert(this.gdsLayer == null);// probing gdsLayer is never used.//		getLayerSetting(getGDSPrefName(tech.getPrefFoundry()), gdsLayerPrefs, this.gdsLayer).setString(gdsLayer);//    }	/**	 * Method to return the GDS name of this layer.	 * @return the GDS name of this layer.	 *///	public String getGDSLayer()//    {//        assert(gdsLayer == null);// probing gdsLayer is never used.//        return getLayerSetting(getGDSPrefName(tech.getPrefFoundry()), gdsLayerPrefs, gdsLayer).getString();//    }	/**	 * Method to set the factory-default DXF name of this Layer.	 * @param dxfLayer the factory-default DXF name of this Layer.	 */	public void setFactoryDXFLayer(String dxfLayer) {        assert !isPseudoLayer();        dxfLayerSetting = makeLayerSetting("DXF", dxfLayer);    }	/**	 * Method to return the DXF name of this layer.	 * @return the DXF name of this layer.	 */	public String getDXFLayer()	{		if (dxfLayerSetting == null) return "";		return dxfLayerSetting.getString();	}	/**	 * Returns project Setting to tell the DXF name of this Layer.	 * @return project Setting to tell the DXF name of this Layer.	 */    public Setting getDXFLayerSetting() { return dxfLayerSetting; }	/**	 * Method to set the factory-default Skill name of this Layer.	 * @param skillLayer the factory-default Skill name of this Layer.	 */	public void setFactorySkillLayer(String skillLayer) {        assert !isPseudoLayer();        skillLayerSetting = makeLayerSetting("Skill", skillLayer);    }	/**	 * Method to return the Skill name of this layer.	 * @return the Skill name of this layer.	 */	public String getSkillLayer() { return skillLayerSetting.getString(); }	/**	 * Returns project Setting to tell the Skill name of this Layer.	 * @return project Setting to tell the Skill name of this Layer.	 */	public Setting getSkillLayerSetting() { return skillLayerSetting; }	/**	 * Method to set the Spice parasitics for this Layer.	 * This is typically called only during initialization.	 * It does not set the "option" storage, as "setResistance()",	 * "setCapacitance()", and ""setEdgeCapacitance()" do.	 * @param resistance the resistance of this Layer.	 * @param capacitance the capacitance of this Layer.	 * @param edgeCapacitance the edge capacitance of this Layer.	 */	public void setFactoryParasitics(double resistance, double capacitance, double edgeCapacitance)	{        assert !isPseudoLayer();		resistanceSetting = makeParasiticSetting("Resistance", resistance);		capacitanceSetting = makeParasiticSetting("Capacitance", capacitance);		edgeCapacitanceSetting = makeParasiticSetting("EdgeCapacitance", edgeCapacitance);	}//    /**//     * Reset this layer's Parasitics to their factory default values//     *///    public void resetToFactoryParasitics()//    {//        double res = resistanceSetting.getDoubleFactoryValue();//        double cap = capacitanceSetting.getDoubleFactoryValue();//        double edgecap = edgeCapacitanceSetting.getDoubleFactoryValue();//        setResistance(res);//        setCapacitance(cap);//        setEdgeCapacitance(edgecap);//    }	/**	 * Method to return the resistance for this layer.	 * @return the resistance for this layer.	 */	public double getResistance() { return resistanceSetting.getDouble(); }	/**	 * Returns project Setting to tell the resistance for this Layer.	 * @return project Setting to tell the resistance for this Layer.	 */	public Setting getResistanceSetting() { return resistanceSetting; }	/**	 * Method to return the capacitance for this layer.	 * @return the capacitance for this layer.	 */	public double getCapacitance() { return capacitanceSetting.getDouble(); }	/**	 * Returns project Setting to tell the capacitance for this Layer.	 * Returns project Setting to tell the capacitance for this Layer.	 */	public Setting getCapacitanceSetting() { return capacitanceSetting; }	/**	 * Method to return the edge capacitance for this layer.	 * @return the edge capacitance for this layer.	 */	public double getEdgeCapacitance() { return edgeCapacitanceSetting.getDouble(); }    /**     * Returns project Setting to tell the edge capacitance for this Layer.     * Returns project Setting to tell the edge capacitance for this Layer.     */    public Setting getEdgeCapacitanceSetting() { return edgeCapacitanceSetting; }    /**	 * Method to set the minimum area to cover with this Layer in a particular cell.	 * @param area the minimum area coverage of this layer.	 *///	public void setFactoryAreaCoverage(double area)//	{//		getDoublePref("AreaCoverageJob", areaCoveragePrefs, area).setDouble(area);//	}    /**	 * Method to return the minimum area coverage that the layer must reach in the technology.	 * @return the minimum area coverage (in percentage).	 */	public double getAreaCoverage() { return getDoublePref("AreaCoverageJob", areaCoveragePrefs, DEFAULT_AREA_COVERAGE).getDouble(); }	/**	 * Method to return the minimum area coverage that the layer must reach in the technology, by default.	 * @return the minimum area coverage (in percentage), by default.	 */	public double getFactoryAreaCoverage() { return getDoublePref("AreaCoverageJob", areaCoveragePrefs, DEFAULT_AREA_COVERAGE).getDoubleFactoryValue(); }    /**     * Methot to set minimum area coverage that the layer must reach in the technology.     * @param area the minimum area coverage (in percentage).     */	public void setAreaCoverageInfo(double area) { getDoublePref("AreaCoverageJob", areaCoveragePrefs, area).setDouble(area); }     /**     * Method to finish initialization of this Technology.     */    void finish() {		if (resistanceSetting == null || capacitanceSetting == null || edgeCapacitanceSetting == null) {            setFactoryParasitics(0, 0, 0);        }        if (cifLayerSetting == null) {            setFactoryCIFLayer("");        }        if (dxfLayerSetting == null) {            setFactoryDXFLayer("");        }        if (skillLayerSetting == null) {            setFactorySkillLayer("");        }    }	/**	 * Returns a printable version of this Layer.	 * @return a printable version of this Layer.	 */	public String toString()	{		return "Layer " + name;	}    void dump(PrintWriter out) {        final String[] layerBits = {            null, null, null,            null, null, null,            "PTYPE", "NTYPE", "DEPLETION",            "ENHANCEMENT",  "LIGHT", "HEAVY",            null, "NONELEC", "CONMETAL",            "CONPOLY", "CONDIFF", null,            null, null, null,            "HLVT", "INTRANS", "THICK"        };        out.print("Layer " + getName() + " " + getFunction().name());        Technology.printlnBits(out, layerBits, getFunctionExtras());        out.print("\t"); Technology.printlnSetting(out, getCIFLayerSetting());        out.print("\t"); Technology.printlnSetting(out, getDXFLayerSetting());        out.print("\t"); Technology.printlnSetting(out, getSkillLayerSetting());      

⌨️ 快捷键说明

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