suppressEnumCastWarning

chisel3.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 Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply[T](block: => T): T

Attributes

Source
ChiselEnum.scala