-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify Enum API #385
Simplify Enum API #385
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are the Symbol-based enums deprecated in the compatibility layer? (I'm not aware of anyone who uses them; I'm just trying to understand why it is OK to remove features from the compatibility layer.)
Otherwise looks great.
Scala can't check a map access during compile time (unlike the List-based version, which turn into vals that the compiler understands). This just nags people who are still using that to do something safer, I have no plans to actually remove those elements from the compatibility layer. If you're super against it I'll remove the deprecation tags. |
I was just trying to understand the rationale. I guess I agree they should be deprecated, even in the compatibility layer. |
I'll document the rationale and that those are not to be removed. |
I'm only just seeing this from a rocket-chip bump on my end. I'm against the deprecation tags here. Unless something has been fixed upstream with Scala, the Tuple-based approach for Enums hits Scala's limit of 22 on Tuple sizes. The only way that I know of to get around this is to use the List-based version (ignoring the fact that I idiotically have a legacy state machine with > 22 states...). Thanks for keeping this support in, nonetheless! |
Bumps [firrtl](https://github.com/freechipsproject/firrtl) from `01e567d` to `e97c7b1`. - [Release notes](https://github.com/freechipsproject/firrtl/releases) - [Commits](chipsalliance/firrtl@01e567d...e97c7b1) --- updated-dependencies: - dependency-name: firrtl dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Get rid of some cruft exposed in #373
This also allows
Bits.fromtInt(...)
to be removed. Yay!All old APIs (with some new restrictions, rocket still works fine) are preserved without deprecation in
Chisel._
, aside from the non-compile-time-checkable Map[] enum constructor which probably should have been deprecated during chisel2. The Map[] enums have been removed from chisel3._ without deprecation.The new restriction is that
nodeType
(legacy API) may only be ofUInt
type with unspecified width. Note thatBits()
creates aUInt
, and if you can't control the enum values, it makes little sense to specify a bitwidth.