com.sun.electric.database.network
Class NetworkTool

java.lang.Object
  extended by com.sun.electric.tool.Tool
      extended by com.sun.electric.database.network.NetworkTool
All Implemented Interfaces:
java.lang.Comparable

public class NetworkTool
extends Tool

This is the Network tool.


Nested Class Summary
static class NetworkTool.NetlistNotReady
          Signals that a method has been invoked at an illegal or inappropriate time.
 
Field Summary
static int totalNumErrors
          total number of errors for statistics
 
Fields inherited from class com.sun.electric.tool.Tool
prefs
 
Constructor Summary
NetworkTool()
          The constructor sets up the Network tool.
 
Method Summary
static Netlist acquireUserNetlist(Cell cell)
          Returns Netlist for a given cell obtain with user-default set of options.
static Setting getIgnoreResistorsSetting()
          Returns project preferences to tell whether resistors are ignored in the circuit.
static Netlist getNetlist(Cell cell, Netlist.ShortResistors shortResistors)
          Recompute the Netlist structure for given Cell.
static java.util.Set<Network> getNetworks(Geometric geom, Netlist netlist, java.util.Set<Network> nets)
          Method to retrieve all networks on a Geometric object.
static java.util.Set<Network> getNetworksOnPort(PortInst pi, Netlist netlist, java.util.Set<Network> nets)
          Method to retrieve all networks for a portInst.
static NetworkTool getNetworkTool()
           
static Netlist getUserNetlist(Cell cell)
          Returns Netlist for a given cell obtain with user-default set of options.
 void init()
          Method to initialize a tool.
static boolean isBusAscending()
          Method to tell whether unnamed busses should be numbered ascending.
static boolean isBusAscendingInNetlistEngine()
          Method to tell whether unnamed busses should be numbered ascending in Netlist Engine.
static boolean isFactoryBusAscending()
          Method to tell whether unnamed busses should be numbered ascending, by default.
static boolean isIgnoreResistors()
          Method to tell whether resistors are ignored in the circuit.
static void renumberNetlists()
          Method to renumber the netlists.
static void setBusAscending(boolean a)
          Method to set whether unnamed busses should be numbered ascending.
static void setInformationOutput(boolean infoOutput)
          Method to set the level of information that is displayed.
 
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, 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
 

Field Detail

totalNumErrors

public static int totalNumErrors
total number of errors for statistics

Constructor Detail

NetworkTool

public NetworkTool()
The constructor sets up the Network tool.

Method Detail

renumberNetlists

public static void renumberNetlists()
Method to renumber the netlists.


getNetworkTool

public static NetworkTool getNetworkTool()

setInformationOutput

public static void setInformationOutput(boolean infoOutput)
Method to set the level of information that is displayed. When libraries are being read "quietly", no information should be output.

Parameters:
infoOutput - true for normal information output, false for quiet.

acquireUserNetlist

public static Netlist acquireUserNetlist(Cell cell)
Returns Netlist for a given cell obtain with user-default set of options.

Parameters:
cell - cell to get Netlist.
Returns:
Netlist of this cell.

getUserNetlist

public static Netlist getUserNetlist(Cell cell)
Returns Netlist for a given cell obtain with user-default set of options.

Parameters:
cell - cell to get Netlist.
Returns:
Netlist of this cell.

getNetlist

public static Netlist getNetlist(Cell cell,
                                 Netlist.ShortResistors shortResistors)
Recompute the Netlist structure for given Cell.

Parameters:
cell - cell to recompute Netlist structure.

Because shorting resistors is a fairly common request, it is implemented in the method if @param shortResistors is set to true.

Returns:
the Netlist structure for Cell.

getNetworksOnPort

public static java.util.Set<Network> getNetworksOnPort(PortInst pi,
                                                       Netlist netlist,
                                                       java.util.Set<Network> nets)
Method to retrieve all networks for a portInst. Used by Highlighter and Connection

Parameters:
pi - the PortInst being considered.
netlist - the netlist being searched.
nets - a set into which all found networks will be added.
Returns:
set the set of found networks.

getNetworks

public static java.util.Set<Network> getNetworks(Geometric geom,
                                                 Netlist netlist,
                                                 java.util.Set<Network> nets)
Method to retrieve all networks on a Geometric object.

Parameters:
geom - the Geometric being considered.
netlist - the netlist being searched.
nets - a set into which all found networks will be added.
Returns:
set the set of found networks.

init

public void init()
Method to initialize a tool.

Overrides:
init in class Tool

isIgnoreResistors

public static boolean isIgnoreResistors()
Method to tell whether resistors are ignored in the circuit. When ignored, they appear as a "short", connecting the two sides. When included, they appear as a component with different networks on either side.

Returns:
true if resistors are ignored in the circuit.

getIgnoreResistorsSetting

public static Setting getIgnoreResistorsSetting()
Returns project preferences to tell whether resistors are ignored in the circuit. When ignored, they appear as a "short", connecting the two sides. When included, they appear as a component with different networks on either side. Returns project preferences to tell whether resistors are ignored in the circuit.


isBusAscending

public static boolean isBusAscending()
Method to tell whether unnamed busses should be numbered ascending. The alternative is descending.

Returns:
true if unnamed busses should be numbered ascending.

setBusAscending

public static void setBusAscending(boolean a)
Method to set whether unnamed busses should be numbered ascending. The alternative is descending.

Parameters:
a - true if unnamed busses should be numbered ascending.

isFactoryBusAscending

public static boolean isFactoryBusAscending()
Method to tell whether unnamed busses should be numbered ascending, by default. The alternative is descending.

Returns:
true if unnamed busses should be numbered ascending, by default.

isBusAscendingInNetlistEngine

public static boolean isBusAscendingInNetlistEngine()
Method to tell whether unnamed busses should be numbered ascending in Netlist Engine. The alternative is descending. The method always returns false now. It can be same as isBusAscending() after Netlist Engine correctly renumbers networks after change this preference.

Returns:
true if unnamed busses should be numbered ascending.