com.sun.electric.tool.logicaleffort
Class LETool

java.lang.Object
  extended by com.sun.electric.tool.Tool
      extended by com.sun.electric.tool.logicaleffort.LETool
All Implemented Interfaces:
java.lang.Comparable

public class LETool
extends Tool

This is the Logical Effort Tool. It doesn't actually do any work itself, but acts as a public API for all of the logical effort tool functionality.

Author:
gainsley

Nested Class Summary
static class LETool.AnalyzeCell
          Performs a cell analysis.
static class LETool.ClearStoredSizes
          Clears stored "LEDRIVE_" sizes on a Nodable.
static class LETool.ClearStoredSizesLibrary
           
static class LETool.UniqueNodeMap
          What I really want is to overload VarContext.hashCode to be based on the string path, but that is really only valid for this particular application, so instead I made a map that uses the string path as the key.
 
Field Summary
 
Fields inherited from class com.sun.electric.tool.Tool
prefs
 
Method Summary
static void clearStoredSizesJob(Library lib)
           
static void clearStoredSizesJob(NodeInst ni)
           
static double getConvergenceEpsilon()
          Method to get the Convergence Epsilon value for Logical Effort.
static Setting getConvergenceEpsilonSetting()
          Returns project Setting to tell the Convergence Epsilon value for Logical Effort.
 java.lang.Object getdrive()
          Grabs a logical effort calculated size from the instance.
 java.lang.Object getdrive(double defaultValue)
          Grabs a logical effort calculated size from the instance.
 java.lang.Object getdrive(java.lang.String varName, double defaultValue)
          Grabs a logical effort calculated size from the instance.
static double getGlobalFanout()
          Method to get the Global Fanout for Logical Effort.
static Setting getGlobalFanoutSetting()
          Returns project Setting to tell the Global Fanout for Logical Effort.
static double getKeeperRatio()
          Method to get the keeper size ratio for Logical Effort.
static Setting getKeeperRatioSetting()
          Returns project Setting to tell the keeper size ratio for Logical Effort.
static LETool getLETool()
          Method to retrieve the singleton associated with the LETool tool.
static int getMaxIterations()
          Method to get the maximum number of iterations for Logical Effort.
static Setting getMaxIterationsSetting()
          Returns project Setting to tell the maximum number of iterations for Logical Effort.
protected static Variable getMFactor(Nodable no)
           
static Setting getUseLocalSettingsSetting()
          Returns project Setting to tell whether to use local settings for Logical Effort
 void init()
          Initialize tool - add calls to Bean Shell Evaluator
protected  void initProjectSettings()
          Subclasses override this method to create ProjectSettings by Tool.makeXXXSetting methods declared below.
static boolean isUseLocalSettings()
          Method to tell whether to use local settings for Logical Effort.
 void optimizeEqualGateDelays(Cell cell, VarContext context, boolean newAlg)
          Optimizes a Cell containing logical effort gates for equal gate delays.
static void printResults(Nodable no, VarContext context)
          Prints results of a sizing job for a Nodable.
static double quantize(double d, double error, double minValue)
          Quantize gate sizes so that the maximum error is less than or equal to 'error'.
 java.lang.Object subdrive(java.lang.String nodeName, java.lang.String parName)
          Grab a paramter 'parName' from a nodeInst 'nodeName' in a sub cell.
 
Methods inherited from class com.sun.electric.tool.Tool
clearAnalysis, clearBackground, clearFixErrors, clearIncremental, clearOn, clearSynthesis, compareTo, findTool, getIndex, getListeners, getName, getNumTools, getProjectSettings, getTools, initAllTools, isAnalysis, isBackground, isFixErrors, isIncremental, isOn, isSynthesis, makeBooleanSetting, makeDoubleSetting, makeIntSetting, makeLongSetting, makeStringSetting, setAnalysis, setBackground, setFixErrors, setIncremental, setOn, setSynthesis, setVarInJob, testAll, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getLETool

public static LETool getLETool()
Method to retrieve the singleton associated with the LETool tool.

Returns:
the LETool tool.

init

public void init()
Initialize tool - add calls to Bean Shell Evaluator

Overrides:
init in class Tool

getdrive

public java.lang.Object getdrive()
                          throws VarContext.EvalException
Grabs a logical effort calculated size from the instance.

Returns:
the size.
Throws:
VarContext.EvalException - in case of evaluation exception

getdrive

public java.lang.Object getdrive(double defaultValue)
                          throws VarContext.EvalException
Grabs a logical effort calculated size from the instance.

Parameters:
defaultValue - if a value cannot be found, and this value is not Double.MIN_VALUE, then use this value.
Returns:
the size.
Throws:
VarContext.EvalException - in case of evaluation exception

getdrive

public java.lang.Object getdrive(java.lang.String varName,
                                 double defaultValue)
                          throws VarContext.EvalException
Grabs a logical effort calculated size from the instance.

Parameters:
varName - for SCOT results, multiple values are stored for the same instance, so they are encoded into the value of the variable as a string array of varName = value.
defaultValue - if a value cannot be found, and this value is not Double.MIN_VALUE, then use this value.
Returns:
the size.
Throws:
VarContext.EvalException - in case of evaluation exception

subdrive

public java.lang.Object subdrive(java.lang.String nodeName,
                                 java.lang.String parName)
                          throws VarContext.EvalException
Grab a paramter 'parName' from a nodeInst 'nodeName' in a sub cell.

Parameters:
nodeName - name of the nodeInst
parName - name of parameter to evaluate
Returns:
the parameter.
Throws:
VarContext.EvalException

getMFactor

protected static Variable getMFactor(Nodable no)

quantize

public static double quantize(double d,
                              double error,
                              double minValue)
Quantize gate sizes so that the maximum error is less than or equal to 'error'. This result always returns a whole integer, unless the number is less than or equal to the minValue.

Parameters:
d - the number to quantize
error - the percentage error as a number, so 0.1 for 10%
minValue - the minimum allowed value for the return value
Returns:
a quantized value for d

optimizeEqualGateDelays

public void optimizeEqualGateDelays(Cell cell,
                                    VarContext context,
                                    boolean newAlg)
Optimizes a Cell containing logical effort gates for equal gate delays.

Parameters:
cell - the cell to be sized
context - varcontext of the cell

printResults

public static void printResults(Nodable no,
                                VarContext context)
Prints results of a sizing job for a Nodable.

Parameters:
no - the Nodable to print info for.

clearStoredSizesJob

public static void clearStoredSizesJob(NodeInst ni)

clearStoredSizesJob

public static void clearStoredSizesJob(Library lib)

isUseLocalSettings

public static boolean isUseLocalSettings()
Method to tell whether to use local settings for Logical Effort. The default is true.

Returns:
true to use local settings for Logical Effort

getUseLocalSettingsSetting

public static Setting getUseLocalSettingsSetting()
Returns project Setting to tell whether to use local settings for Logical Effort

Returns:
project Setting to tell whether to use local settings for Logical Effort

getGlobalFanout

public static double getGlobalFanout()
Method to get the Global Fanout for Logical Effort. The default is DEFAULT_GLOBALFANOUT.

Returns:
the Global Fanout for Logical Effort.

getGlobalFanoutSetting

public static Setting getGlobalFanoutSetting()
Returns project Setting to tell the Global Fanout for Logical Effort.

Returns:
project Setting to tell the Global Fanout for Logical Effort.

getConvergenceEpsilon

public static double getConvergenceEpsilon()
Method to get the Convergence Epsilon value for Logical Effort. The default is DEFAULT_EPSILON.

Returns:
the Convergence Epsilon value for Logical Effort.

getConvergenceEpsilonSetting

public static Setting getConvergenceEpsilonSetting()
Returns project Setting to tell the Convergence Epsilon value for Logical Effort.

Returns:
project Setting to tell the Convergence Epsilon value for Logical Effort.

getMaxIterations

public static int getMaxIterations()
Method to get the maximum number of iterations for Logical Effort. The default is DEFAULT_MAXITER.

Returns:
the maximum number of iterations for Logical Effort.

getMaxIterationsSetting

public static Setting getMaxIterationsSetting()
Returns project Setting to tell the maximum number of iterations for Logical Effort.

Returns:
project Setting to tell the maximum number of iterations for Logical Effort.

getKeeperRatio

public static double getKeeperRatio()
Method to get the keeper size ratio for Logical Effort. The default is DEFAULT_KEEPERRATIO.

Returns:
the keeper size ratio for Logical Effort.

getKeeperRatioSetting

public static Setting getKeeperRatioSetting()
Returns project Setting to tell the keeper size ratio for Logical Effort.

Returns:
project Setting to tell the keeper size ratio for Logical Effort.

initProjectSettings

protected void initProjectSettings()
Description copied from class: Tool
Subclasses override this method to create ProjectSettings by Tool.makeXXXSetting methods declared below.

Overrides:
initProjectSettings in class Tool