Skip to content

Warning occurs when the decoder fields chiselType is chiselEnum #4930

Open
@yizishun

Description

@yizishun

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions