Packages

c

firrtl.constraint

ConstraintSolver

class ConstraintSolver extends AnyRef

Forwards-Backwards Constraint Solver

Used for computing Width and Bound constraints

Note - this is an O(N) algorithm, but requires exponential memory. We rely on aggressive early optimization of constraint expressions to (usually) get around this.

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

Instance Constructors

  1. new ConstraintSolver()

Type Members

  1. type ConstraintMap = HashMap[String, (Constraint, Boolean)]

    Solved constraints

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addGeq(big: Width, small: Width, r1: String, r2: String): Unit

    Updates internal list of inequalities with a new GreaterOrEqual

    Updates internal list of inequalities with a new GreaterOrEqual

    big

    The larger constraint, must be either known or a variable

    small

    The smaller constraint

  5. def addGeq(big: Constraint, small: Constraint, r1: String, r2: String): Unit

    Updates internal list of inequalities with a new GreaterOrEqual

    Updates internal list of inequalities with a new GreaterOrEqual

    big

    The larger constraint, must be either known or a variable

    small

    The smaller constraint

  6. def addLeq(small: Width, big: Width, r1: String, r2: String): Unit

    Updates internal list of inequalities with a new LesserOrEqual

    Updates internal list of inequalities with a new LesserOrEqual

    small

    The smaller constraint, must be either known or a variable

    big

    The larger constraint

  7. def addLeq(small: Constraint, big: Constraint, r1: String, r2: String): Unit

    Updates internal list of inequalities with a new LesserOrEqual

    Updates internal list of inequalities with a new LesserOrEqual

    small

    The smaller constraint, must be either known or a variable

    big

    The larger constraint

  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def check(): Seq[Inequality]

    Returns illegal constraints, where both a >= and <= inequality are used on the same variable

  10. def clear(): Unit

    Clear all previously recorded/solved constraints

  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def get(b: Width): Option[IsKnown]

    Returns a solved width, if it exists and is solved

  16. def get(b: Constraint): Option[IsKnown]

    Returns a solved constraint, if it exists and is solved

  17. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. def serializeConstraints: String

    For debugging, can serialize the initial constraints

  24. def serializeSolutions: String

    For debugging, can serialize the solved constraints

  25. def solve(): Unit

    Solves constraints present in collected inequalities

    Solves constraints present in collected inequalities

    Constraint solving steps: 1) Assert no variable has both >= and <= inequalities (it can have multiple of the same kind of inequality) 2) Merge constraints of variables having multiple inequalities 3) Forward solve inequalities

    1. Iterate through inequalities top-to-bottom, replacing previously seen variables with corresponding constraint b. For each forward-solved inequality, attempt to remove circular constraints c. Forward-solved inequalities without circular constraints are recorded 4) Backwards solve inequalities
    2. Iterate through successful forward-solved inequalities bottom-to-top, replacing previously seen variables with corresponding constraint b. Record solved constraints
  26. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  27. def toString(): String
    Definition Classes
    AnyRef → Any
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped