com.sun.electric.tool.io.output
Class Topology

java.lang.Object
  extended by com.sun.electric.tool.io.output.Output
      extended by com.sun.electric.tool.io.output.Topology
Direct Known Subclasses:
EDIF, GenerateVHDL, MOSSIM, Silos, Spice, Tegas, Verilog

public abstract class Topology
extends Output

This is the Simulation Interface tool.


Nested Class Summary
protected static class Topology.CellAggregateSignal
          Class to describe an aggregate signal (a bus) in a Cell.
protected static class Topology.CellNetInfo
          Class to describe the networks in a Cell.
protected static class Topology.CellSignal
          Class to describe a single signal in a Cell.
 class Topology.MyCellInfo
           
 class Topology.Visitor
           
 
Nested classes/interfaces inherited from class com.sun.electric.tool.io.output.Output
Output.OutputPreferences, Output.WriteJELIB
 
Field Summary
protected  Cell topCell
          top-level cell being processed
 
Fields inherited from class com.sun.electric.tool.io.output.Output
dataOutputStream, errorLogger, filePath, printWriter, quiet, stringWriter
 
Constructor Summary
Topology()
          Creates a new instance of Topology
 
Method Summary
protected  boolean canParameterizeNames()
          Method to tell whether the topological analysis should mangle cell names that are parameterized.
protected abstract  void done()
          Abstract method called after traversal
protected  void enterCell(HierarchyEnumerator.CellInfo info)
          Called at the end of the enter cell phase of hierarchy enumeration
protected  boolean enumerateLayoutView(Cell cell)
          Used to switch from schematic enumeration to layout enumeration
protected  Topology.CellNetInfo getCellNetInfo(java.lang.String cellName)
          Abstract method to convert a cell name to one that is safe for this format
protected abstract  java.lang.String getGlobalName(Global glob)
          Abstract method to return the proper name of a Global signal
protected abstract  java.lang.String getGroundName(Network net)
          Abstract method to return the proper name of Ground (or null to use existing name)
protected abstract  java.lang.String getPowerName(Network net)
          Abstract method to return the proper name of Power (or null to use existing name)
protected abstract  java.lang.String getSafeCellName(java.lang.String name)
          Abstract method to convert a cell name to one that is safe for this format
protected abstract  java.lang.String getSafeNetName(java.lang.String name, boolean bus)
          Abstract method to convert a network name to one that is safe for this format
protected  Netlist.ShortResistors getShortResistors()
          Tell the Hierarchy enumerator how to short resistors
protected  java.lang.String getUniqueCellName(Cell cell)
          Method to return the name of cell "c", given that it may be ambiguously used in multiple libraries.
protected abstract  boolean isAggregateNameGapsSupported()
          Abstract method to decide whether aggregate names (busses) can have gaps in their ranges.
protected abstract  boolean isAggregateNamesSupported()
          Abstract method to decide whether aggregate names (busses) are used.
protected abstract  boolean isCaseSensitive()
          Abstract method to decide whether netlister is case-sensitive (Verilog) or not (Spice).
protected  boolean isChooseBestExportName()
          Method to decide whether to choose best export name among exports connected to signal.
protected abstract  boolean isLibraryNameAlwaysAddedToCellName()
          Abstract method to decide whether library names are always prepended to cell names.
protected abstract  boolean isNetworksUseExportedNames()
          Abstract method to decide whether export names take precedence over arc names when determining the name of the network.
protected abstract  boolean isSeparateInputAndOutput()
          Abstract method to decide whether aggregate names (busses) are used.
protected  boolean isShortExplicitResistors()
          Tell the Hierarchy enumerator whether or not to short explicit (poly) resistors
protected  boolean isShortResistors()
          Tell the Hierarchy enumerator whether or not to short parasitic resistors
protected  int maxNameLength()
          Method to tell set a limit on the number of characters in a name.
protected  java.lang.String parameterizedName(Nodable no, VarContext context)
          Method to create a parameterized name for node instance "ni".
protected  boolean skipCellAndSubcells(Cell cell)
          If the netlister has requirments not to netlist certain cells and their subcells, override this method.
protected abstract  void start()
          Abstract method called before hierarchy traversal
protected static java.lang.String unIndexedName(java.lang.String name)
          Method to return the character position in network name "name" that is the start of indexing.
protected  void validateSkippedCell(HierarchyEnumerator.CellInfo info)
          If a cell is skipped, this method can perform any checking to validate that no error occurs
 boolean writeCell(Cell cell, VarContext context)
          Write cell to file
 boolean writeCell(Cell cell, VarContext context, Topology.Visitor visitor)
          Write cell to file
protected abstract  void writeCellTopology(Cell cell, Topology.CellNetInfo cni, VarContext context, Topology.MyCellInfo info)
          Abstract method to write CellGeom to disk
 
Methods inherited from class com.sun.electric.tool.io.output.Output
closeBinaryOutputStream, closeStringsOutputStream, closeTextOutputStream, emitCopyright, exportCellCommand, finishWrite, getAreaToPrint, getNumErrors, getNumWarnings, getOutputPreferences, openBinaryOutputStream, openStringsOutputStream, openTextOutputStream, reportError, reportWarning, saveJelib, setContinuationString, setOutputWidth, writeLibrary, writeLibrary, writePanicSnapshot, writeWidthLimited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

topCell

protected Cell topCell
top-level cell being processed

Constructor Detail

Topology

public Topology()
Creates a new instance of Topology

Method Detail

writeCell

public boolean writeCell(Cell cell,
                         VarContext context)
Write cell to file

Overrides:
writeCell in class Output
Parameters:
cell - the Cell to be written.
context - the VarContext of the cell (for parameter evaluation)
Returns:
true on error

writeCell

public boolean writeCell(Cell cell,
                         VarContext context,
                         Topology.Visitor visitor)
Write cell to file

Returns:
true on error

start

protected abstract void start()
Abstract method called before hierarchy traversal


done

protected abstract void done()
Abstract method called after traversal


enterCell

protected void enterCell(HierarchyEnumerator.CellInfo info)
Called at the end of the enter cell phase of hierarchy enumeration


writeCellTopology

protected abstract void writeCellTopology(Cell cell,
                                          Topology.CellNetInfo cni,
                                          VarContext context,
                                          Topology.MyCellInfo info)
Abstract method to write CellGeom to disk


getSafeNetName

protected abstract java.lang.String getSafeNetName(java.lang.String name,
                                                   boolean bus)
Abstract method to convert a network name to one that is safe for this format


getSafeCellName

protected abstract java.lang.String getSafeCellName(java.lang.String name)
Abstract method to convert a cell name to one that is safe for this format


getPowerName

protected abstract java.lang.String getPowerName(Network net)
Abstract method to return the proper name of Power (or null to use existing name)


getGroundName

protected abstract java.lang.String getGroundName(Network net)
Abstract method to return the proper name of Ground (or null to use existing name)


getGlobalName

protected abstract java.lang.String getGlobalName(Global glob)
Abstract method to return the proper name of a Global signal


isNetworksUseExportedNames

protected abstract boolean isNetworksUseExportedNames()
Abstract method to decide whether export names take precedence over arc names when determining the name of the network.


isLibraryNameAlwaysAddedToCellName

protected abstract boolean isLibraryNameAlwaysAddedToCellName()
Abstract method to decide whether library names are always prepended to cell names.


isAggregateNamesSupported

protected abstract boolean isAggregateNamesSupported()
Abstract method to decide whether aggregate names (busses) are used.


isAggregateNameGapsSupported

protected abstract boolean isAggregateNameGapsSupported()
Abstract method to decide whether aggregate names (busses) can have gaps in their ranges.


isChooseBestExportName

protected boolean isChooseBestExportName()
Method to decide whether to choose best export name among exports connected to signal.


isSeparateInputAndOutput

protected abstract boolean isSeparateInputAndOutput()
Abstract method to decide whether aggregate names (busses) are used.


isCaseSensitive

protected abstract boolean isCaseSensitive()
Abstract method to decide whether netlister is case-sensitive (Verilog) or not (Spice).


skipCellAndSubcells

protected boolean skipCellAndSubcells(Cell cell)
If the netlister has requirments not to netlist certain cells and their subcells, override this method.


validateSkippedCell

protected void validateSkippedCell(HierarchyEnumerator.CellInfo info)
If a cell is skipped, this method can perform any checking to validate that no error occurs


canParameterizeNames

protected boolean canParameterizeNames()
Method to tell whether the topological analysis should mangle cell names that are parameterized.


getShortResistors

protected Netlist.ShortResistors getShortResistors()
Tell the Hierarchy enumerator how to short resistors


isShortResistors

protected boolean isShortResistors()
Tell the Hierarchy enumerator whether or not to short parasitic resistors


isShortExplicitResistors

protected boolean isShortExplicitResistors()
Tell the Hierarchy enumerator whether or not to short explicit (poly) resistors


maxNameLength

protected int maxNameLength()
Method to tell set a limit on the number of characters in a name.

Returns:
the limit to name size (0 if no limit).

getCellNetInfo

protected Topology.CellNetInfo getCellNetInfo(java.lang.String cellName)
Abstract method to convert a cell name to one that is safe for this format


enumerateLayoutView

protected boolean enumerateLayoutView(Cell cell)
Used to switch from schematic enumeration to layout enumeration


unIndexedName

protected static java.lang.String unIndexedName(java.lang.String name)
Method to return the character position in network name "name" that is the start of indexing. If there is no indexing ("clock"), this will point to the end of the string. If there is simple indexing ("dog[12]"), this will point to the "[". If the index is nonnumeric ("dog[cat]"), this will point to the end of the string. If there are multiple indices, ("dog[12][45]") this will point to the last "[" (unless it is nonnumeric).


parameterizedName

protected java.lang.String parameterizedName(Nodable no,
                                             VarContext context)
Method to create a parameterized name for node instance "ni". If the node is not parameterized, returns zero. If it returns a name, that name must be deallocated when done.


getUniqueCellName

protected java.lang.String getUniqueCellName(Cell cell)
Method to return the name of cell "c", given that it may be ambiguously used in multiple libraries.