chisel icon indicating copy to clipboard operation
chisel copied to clipboard

Warning occurs when the decoder fields chiselType is chiselEnum

Open yizishun opened this issue 5 months ago • 0 comments

warning is generated when the decoder fields chiselType is chiselEnum The warning for example is:

[119] [warn] src/main/scala/chisel3/util/experimental/decode/DecoderBundle.scala 88:106: [W001] Casting non-literal UInt to untitl3d.backend.ImmTpe. You can use untitl3d.backend.ImmTpe.safe to cast without this warning.

the code in src/main/scala/chisel3/util/experimental/decode/DecoderBundle.scala 88:106 is:

  def decode(input: UInt): DecodeBundle = chisel3.util.experimental.decode.decoder(input, table).asTypeOf(bundle)

the warning occurs in the asTypeOf(bundle), because there has chiselEnum in bundle (but it just a small problem i think

yizishun avatar May 20 '25 04:05 yizishun