blob: 11a25e2c98047a38d48f089a5bcb9bb27b194975 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// SPDX-License-Identifier: Apache-2.0
package firrtl.constraint
object IsVar {
def unapply(i: Constraint): Option[String] = i match {
case i: IsVar => Some(i.name)
case _ => None
}
}
/** Extend to be a constraint variable */
trait IsVar extends Constraint {
def name: String
override def serialize: String = name
override def map(f: Constraint => Constraint): Constraint = this
override def reduce() = this
lazy val children = Vector()
}
case class VarCon(name: String) extends IsVar
|