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

📄 lenetlister.java

📁 The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/* -*- tab-width: 4 -*- * * Electric(tm) VLSI Design System * * File: LENetlister.java * Written by Jonathan Gainsley, Sun Microsystems. * * Copyright (c) 2004 Sun Microsystems and Static Free Software * * Electric(tm) is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * Electric(tm) is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Electric(tm); see the file COPYING.  If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, Mass 02111-1307, USA. */package com.sun.electric.tool.logicaleffort;import com.sun.electric.database.hierarchy.*;import com.sun.electric.database.network.Netlist;import com.sun.electric.database.topology.NodeInst;import com.sun.electric.database.variable.VarContext;import com.sun.electric.database.variable.Variable;import com.sun.electric.technology.Technology;import com.sun.electric.tool.Job;import com.sun.electric.tool.JobException;import com.sun.electric.tool.user.ErrorLogger;import java.awt.geom.Point2D;import java.awt.geom.Rectangle2D;import java.util.Iterator;import java.util.List;import java.io.Serializable;public abstract class LENetlister extends HierarchyEnumerator.Visitor {    static final Netlist.ShortResistors SHORT_RESISTORS = Netlist.ShortResistors.ALL;    public static final Variable.Key ATTR_su = Variable.newKey("ATTR_su");    public static final Variable.Key ATTR_le = Variable.newKey("ATTR_le");    public static final Variable.Key ATTR_wire_ratio = Variable.newKey("ATTR_wire_ratio");    public static final Variable.Key ATTR_epsilon = Variable.newKey("ATTR_epsilon");    public static final Variable.Key ATTR_max_iter = Variable.newKey("ATTR_max_iter");    public static final Variable.Key ATTR_gate_cap = Variable.newKey("ATTR_gate_cap");    public static final Variable.Key ATTR_alpha = Variable.newKey("ATTR_alpha");    public static final Variable.Key ATTR_diffn = Variable.newKey("ATTR_diffn");    public static final Variable.Key ATTR_diffp = Variable.newKey("ATTR_diffp");    public static final Variable.Key ATTR_keeper_ratio = Variable.newKey("ATTR_keeper_ratio");    public static final Variable.Key ATTR_LEGATE = Variable.newKey("ATTR_LEGATE");    public static final Variable.Key ATTR_LEKEEPER = Variable.newKey("ATTR_LEKEEPER");    public static final Variable.Key ATTR_LEWIRE = Variable.newKey("ATTR_LEWIRE");    public static final Variable.Key ATTR_LEIGNORE = Variable.newKey("ATTR_LEIGNORE");    public static final Variable.Key ATTR_LESETTINGS = Variable.newKey("ATTR_LESETTINGS");    public static final Variable.Key ATTR_LEPARALLGRP = Variable.newKey("ATTR_LEPARALLGRP");    public static final Variable.Key ATTR_L = Variable.newKey("ATTR_L");    public static final Variable.Key ATTR_LEWIRECAP = Variable.newKey("ATTR_LEWIRECAP");    public static class NetlisterConstants implements Serializable {        /** global step-up */                       public final float su;        /** wire to gate cap ratio */               public final float wireRatio;        /** convergence criteron */                 public final float epsilon;        /** max number of iterations */             public final int maxIterations;        /** gate cap, in fF/lambda */               public final float gateCap;        /** ratio of diffusion to gate cap */       public final float alpha;        /** ratio of keeper to driver size */       public final float keeperRatio;                public NetlisterConstants(float su, float wireRatio, float epsilon,                                  int maxIterations, float gateCap, float alpha, float keeperRatio) {            this.su = su;            this.wireRatio = wireRatio;            this.epsilon = epsilon;            this.maxIterations = maxIterations;            this.gateCap = gateCap;            this.alpha = alpha;            this.keeperRatio = keeperRatio;        }        /** Create a new set of constants from the user's settings */        public NetlisterConstants(Technology layoutTech) {            su = (float)LETool.getGlobalFanout();            epsilon = (float)LETool.getConvergenceEpsilon();            maxIterations = LETool.getMaxIterations();            gateCap = (float)layoutTech.getGateCapacitance();            wireRatio = (float)layoutTech.getWireRatio();            alpha = (float)layoutTech.getDiffAlpha();            keeperRatio = (float)LETool.getKeeperRatio();        }        /** Returns true if the two NetlisterConstants have the same values for all fields */        public boolean equals(NetlisterConstants other) {            if (su != other.su) return false;            if (wireRatio != other.wireRatio) return false;            if (epsilon != other.epsilon) return false;            if (maxIterations != other.maxIterations) return false;            if (gateCap != other.gateCap) return false;            if (alpha != other.alpha) return false;            if (keeperRatio != other.keeperRatio) return false;            return true;        }    }        Technology layoutTech;        LENetlister(Technology layoutTech) {        this.layoutTech = layoutTech;    }    /** Call to start netlisting. Returns false if failed */    public abstract boolean netlist(Cell cell, VarContext context, boolean useCaching);    /** Call to stop or interrupt netlisting */    public abstract void done();    /**     * Call to size netlist with the specified algorithm     * @return true if successful, false otherwise     */    public abstract boolean size(LESizer.Alg algorithm);    /** Get the error logger */    public abstract ErrorLogger getErrorLogger();    /** Destroy the error logger */    public abstract void nullErrorLogger();    /** Get the settings used for sizing */    public abstract NetlisterConstants getConstants();    /** Get the sizes and associated variable names to store on the top level cell */    public abstract void getSizes(List<Float> sizes, List<String> varNames,                                  List<NodeInst> nodes, List<VarContext> contexts);    public abstract void printStatistics();    // ---------------------------- statistics ---------------------------------    /** print the results for the Nodable     * @return true if successful, false otherwise */    public abstract boolean printResults(Nodable no, VarContext context);    /** Get the total size of all gates sized using Logical Effort */    public abstract float getTotalLESize();    // ------------------------- Utility ---------------------------------------    /**     * Get any Logical Effort settings saved on the specified cell     * @param cell the cell in question     * @return the netlister constants settings, or null if none found     */    protected NetlisterConstants getSettings(Cell cell) {        if (!LETool.isUseLocalSettings()) return null;        for (Iterator<NodeInst> instIt = cell.getNodes(); instIt.hasNext();) {            NodeInst ni = (NodeInst)instIt.next();            if (ni.isIconOfParent()) continue;            if (!ni.isCellInstance()) continue;            if (ni.getParameterOrVariable(ATTR_LESETTINGS) != null) {                Technology tech = cell.getTechnology();                if (cell.isSchematic())                    tech = layoutTech;                float su = (float)LETool.getGlobalFanout();                float epsilon = (float)LETool.getConvergenceEpsilon();                int maxIterations = LETool.getMaxIterations();                float gateCap = (float)tech.getGateCapacitance();                float wireRatio = (float)tech.getWireRatio();                float alpha = (float)tech.getDiffAlpha();                float keeperRatio = (float)LETool.getKeeperRatio();                Variable var;                VarContext context = VarContext.globalContext;

⌨️ 快捷键说明

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