firrtl.backends.experimental.smt
UninterpretedModuleAnnotation
Companion object UninterpretedModuleAnnotation
case class UninterpretedModuleAnnotation(target: ModuleTarget, prefix: String, stateBits: Int = 0) extends SingleTargetAnnotation[ModuleTarget] with Product with Serializable
ExtModules annotated as UninterpretedModule will be modelled as UninterpretedFunction (SMTLib) or constant arrays (btor2). This can be useful when trying to abstract over a function that the SMT solver or model checker is struggling with.
E.g., one could declare an abstract 64bit multiplier like this:
, then the
Mul64
extmodule Mul64 :
input a : UInt<64>
input b : UInt<64>
output r : UInt<64>
are the same on both instances of
b
and
Now instead of using Chisel to actually implement a multiplication circuit
we can instantiate this Mul64 module twice: Once in our implementation
and once for our correctness property that might specify how the
multiply instruction is supposed to be executed on our CPU.
Now instead of having to prove equivalence of multiplication circuits, the
solver only has to make sure that the connections to the multiplier are correct,
since if
ar
output
will also be the same. This is a much easier problem and will result in much faster
solving due to manual abstraction.
When stateBits is 0, we model the module as purely combinatorial circuit and thus expect there to be no clock wire going into the module. Every output is thus a function of all inputs of the module.
When stateBits is an N greater than zero, we will model the module as having an abstract state of width N. Thus on every clock transition the abstract state is updated and all outputs will take the state as well as the current inputs as arguments. TODO: Support for stateful circuits is work in progress.
All output functions well be prefixed with prefix and end in the name of the output pin. It is the users responsibility to ensure that all function names will be unique by choosing apropriate prefixes.
The annotation is consumed by the FirrtlToTransitionSystem pass.
- Alphabetic
- By Inheritance
- UninterpretedModuleAnnotation
- Serializable
- Serializable
- SingleTargetAnnotation
- Annotation
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new UninterpretedModuleAnnotation(target: ModuleTarget, prefix: String, stateBits: Int = 0)
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
duplicate(n: ModuleTarget): UninterpretedModuleAnnotation
Create another instance of this Annotation
Create another instance of this Annotation
- Definition Classes
- UninterpretedModuleAnnotation → SingleTargetAnnotation
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getTargets: Seq[Target]
Returns all Target members in this annotation
Returns all Target members in this annotation
- Definition Classes
- SingleTargetAnnotation → Annotation
-
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() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val prefix: String
-
def
serialize: String
Optional pretty print
Optional pretty print
- Definition Classes
- Annotation
- Note
rarely used
- val stateBits: Int
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
val
target: ModuleTarget
- Definition Classes
- UninterpretedModuleAnnotation → SingleTargetAnnotation
-
def
update(renames: RenameMap): Seq[Annotation]
Update the target based on how signals are renamed
Update the target based on how signals are renamed
- Definition Classes
- SingleTargetAnnotation → Annotation
-
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()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
This is the documentation for Firrtl.