Skip to content

BitPat is not happy with Cat(someEnum.asUInt, someBool.B) #2268

@sequencer

Description

@sequencer

https://scastie.scala-lang.org/fLovomFGRUaMML8MvEIBwA

import chisel3._
import chisel3.util._
import chisel3.experimental.ChiselEnum

object TestEnum extends ChiselEnum {
  val s0 = Value
}

class Example extends Module {
  val a = BitPat(Cat(TestEnum.s0.asUInt, true.B))
}

println(getVerilogString(new Example))

doesn't work.

Type of issue: bug report

Impact: unknown

Development Phase: request

Other information
If the current behavior is a bug, please provide the steps to reproduce the problem:

What is the current behavior?

java.util.NoSuchElementException: None.get
	at ... ()
	at Playground$Example.<init>(main.scala:12)
	at Playground$$anonfun$2.apply(main.scala:15)
	at Playground$$anonfun$2.apply(main.scala:15)
	at ... ()
	at ... (Stack trace trimmed to user code only. Rerun with --full-stacktrace to see the full stack trace)
}

What is the expected behavior?
I think this should work?

Please tell us about your environment:
Chisel 3.5-SNAPSHOT
What is the use case for changing the behavior?

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