suppressEnumCastWarning
chisel3.suppressEnumCastWarning
object suppressEnumCastWarning
Suppress enum cast warnings
Users should use <EnumType>.safe when possible.
This is primarily used for casting from UInt to a Bundle type that contains an Enum.
class MyBundle extends Bundle {
val addr = UInt(8.W)
val op = OpEnum()
}
// Since this is a cast to a Bundle, cannot use OpCode.safe
val bundle = suppressEnumCastWarning {
someUInt.asTypeOf(new MyBundle)
}
Attributes
- Source
- ChiselEnum.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Members list
In this article