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
- Alphabetic
- By Inheritance
- ConstraintSolver
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ConstraintSolver()
Type Members
-
type
ConstraintMap = HashMap[String, (Constraint, Boolean)]
Solved constraints
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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
-
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
-
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
-
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
check(): Seq[Inequality]
Returns illegal constraints, where both a >= and <= inequality are used on the same variable
-
def
clear(): Unit
Clear all previously recorded/solved constraints
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get(b: Width): Option[IsKnown]
Returns a solved width, if it exists and is solved
-
def
get(b: Constraint): Option[IsKnown]
Returns a solved constraint, if it exists and is solved
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
serializeConstraints: String
For debugging, can serialize the initial constraints
-
def
serializeSolutions: String
For debugging, can serialize the solved constraints
-
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
- 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
- Iterate through successful forward-solved inequalities bottom-to-top, replacing previously seen variables with corresponding constraint b. Record solved constraints
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
This is the documentation for Firrtl.