Class/Object

firrtl.analyses

InstanceGraph

Related Docs: object InstanceGraph | package analyses

Permalink

class InstanceGraph extends AnyRef

A class representing the instance hierarchy of a working IR Circuit

Annotations
@deprecated
Deprecated

(Since version FIRRTL 1.4) Use InstanceKeyGraph instead.

Source
InstanceGraph.scala
Note

The current implementation has some performance problems, which is why InstanceKeyGraph exists and should be preferred for new use cases. Eventually the old class will be deprecated in favor of the new implementation. The performance problems in the old implementation stem from the fact that DefInstance is used as the key to the underlying Map. DefInstance contains the type of the module besides the module and instance names. This type is not needed as it can be inferred from the module name. If the module name is the same, the type will be the same and vice versa. Hashing and comparing deep bundle types however is inefficient which can manifest in slower then necessary lookups and insertions.

Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InstanceGraph
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new InstanceGraph(c: Circuit)

    Permalink

    constructs an instance graph from a Circuit

    constructs an instance graph from a Circuit

    c

    the Circuit to analyze

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  16. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def findInstancesInHierarchy(module: String): Seq[Seq[DefInstance]]

    Permalink

    Finds the absolute paths (each represented by a Seq of instances representing the chain of hierarchy) of all instances of a particular module.

    Finds the absolute paths (each represented by a Seq of instances representing the chain of hierarchy) of all instances of a particular module. Note that this includes one implicit instance of the top (main) module of the circuit. If the module is not instantiated within the hierarchy of the top module of the circuit, it will return Nil.

    module

    the name of the selected module

    returns

    a Seq[ Seq[DefInstance] ] of absolute instance paths

    Annotations
    @deprecated
    Deprecated

    (Since version FIRRTL 1.4) Use InstanceKeyGraph.findInstancesInHierarchy instead (now with caching of vertices!).

  2. lazy val fullHierarchy: LinkedHashMap[DefInstance, Seq[Seq[DefInstance]]]

    Permalink

    A list of absolute paths (each represented by a Seq of instances) of all module instances in the Circuit.

    A list of absolute paths (each represented by a Seq of instances) of all module instances in the Circuit.

    Annotations
    @deprecated
    Deprecated

    (Since version FIRRTL 1.4) Use InstanceKeyGraph.fullHierarchy instead.

  3. def getChildrenInstanceMap: Map[OfModule, Map[Instance, OfModule]]

    Permalink

    Given a circuit, returns a map from module name to a map in turn mapping instances names to corresponding module names

    Given a circuit, returns a map from module name to a map in turn mapping instances names to corresponding module names

    Annotations
    @deprecated
    Deprecated

    (Since version FIRRTL 1.4) Use InstanceKeyGraph.getChildInstanceMap instead.

  4. def getChildrenInstanceOfModule: LinkedHashMap[String, LinkedHashSet[(Instance, OfModule)]]

    Permalink

    Given a circuit, returns a map from module name to children instance/module firrtl.annotations.TargetTokens

    Given a circuit, returns a map from module name to children instance/module firrtl.annotations.TargetTokens

    Annotations
    @deprecated
    Deprecated

    (Since version FIRRTL 1.4) Use InstanceKeyGraph.getChildInstances instead.

  5. def getChildrenInstances: LinkedHashMap[String, LinkedHashSet[DefInstance]]

    Permalink

    Given a circuit, returns a map from module name to children instance/module definitions

    Given a circuit, returns a map from module name to children instance/module definitions

    Annotations
    @deprecated
    Deprecated

    (Since version FIRRTL 1.4) Use InstanceKeyGraph.getChildInstances instead.

  6. lazy val graph: DiGraph[DefInstance]

    Permalink

    A directed graph showing the instance dependencies among modules in the circuit.

    A directed graph showing the instance dependencies among modules in the circuit. Every DefInstance of a module has an edge to every DefInstance arising from every instance statement in that module.

    Annotations
    @deprecated
    Deprecated

    (Since version FIRRTL 1.4) Use InstanceKeyGraph.graph instead.

  7. def lowestCommonAncestor(moduleA: Seq[DefInstance], moduleB: Seq[DefInstance]): Seq[DefInstance]

    Permalink

    Finds the lowest common ancestor instances for two module names in a design

    Finds the lowest common ancestor instances for two module names in a design

    Annotations
    @deprecated
    Deprecated

    (Since version FIRRTL 1.4) Use InstanceKeyGraph and EulerTour(iGraph.graph, iGraph.top).rmq(moduleA, moduleB).

  8. val moduleMap: Map[String, DefModule]

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version FIRRTL 1.4) Use InstanceKeyGraph.moduleMap instead.

  9. def moduleOrder: Seq[DefModule]

    Permalink

    Module order from highest module to leaf module

    Module order from highest module to leaf module

    returns

    sequence of modules in order from top to leaf

    Annotations
    @deprecated
    Deprecated

    (Since version FIRRTL 1.4) Use InstanceKeyGraph.moduleOrder instead.

  10. lazy val modules: Set[OfModule]

    Permalink

    The set of all modules in the circuit

    The set of all modules in the circuit

    Annotations
    @deprecated
    Deprecated

    (Since version FIRRTL 1.4) Use InstanceKeyGraph instead.

  11. lazy val reachableModules: Set[OfModule]

    Permalink

    The set of all modules in the circuit reachable from the top module

    The set of all modules in the circuit reachable from the top module

    Annotations
    @deprecated
    Deprecated

    (Since version FIRRTL 1.4) Use InstanceKeyGraph instead.

  12. lazy val staticInstanceCount: Map[OfModule, Int]

    Permalink

    A count of the *static* number of instances of each module.

    A count of the *static* number of instances of each module. For any module other than the top (main) module, this is equivalent to the number of inst statements in the circuit instantiating each module, irrespective of the number of times (if any) the enclosing module appears in the hierarchy. Note that top module of the circuit has an associated count of one, even though it is never directly instantiated. Any modules *not* instantiated at all will have a count of zero.

    Annotations
    @deprecated
    Deprecated

    (Since version FIRRTL 1.4) Use InstanceKeyGraph.staticInstanceCount instead.

  13. lazy val tour: EulerTour[Seq[DefInstance]]

    Permalink

    An EulerTour representation of the DiGraph

    An EulerTour representation of the DiGraph

    Annotations
    @deprecated
    Deprecated

    (Since version FIRRTL 1.4) Should have been private. Do not use outside of InstanceGraph.

  14. lazy val unreachableModules: Set[OfModule]

    Permalink

    The set of all modules *not* reachable in the circuit

    The set of all modules *not* reachable in the circuit

    Annotations
    @deprecated
    Deprecated

    (Since version FIRRTL 1.4) Use InstanceKeyGraph.unreachableModules instead.

Inherited from AnyRef

Inherited from Any

Ungrouped