blob: 1675a6fc866ce00e9256dead61f2e10bb6960648 (
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
val children = Vector()
}
case class VarCon(name: String) extends IsVar
|