-
Notifications
You must be signed in to change notification settings - Fork 574
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
Strong enums #892
Strong enums #892
Commits on Sep 17, 2018
-
Added new strongly-typed enum construct called "StrongEnum". "StrongE…
…num" will automatically generate annotations that HDL backends can use to mark components as enums Removed "override val width" constructor parameter from "Element" so that classes with variable widths, like the new strong enums, can inherit from it Changed the parameter types of certain functions, such as "switch", "is", and "LitArg.bindLitArg" from "Bits" to "Element", so that they can take the new strong enums as arguments
Configuration menu - View commit details
-
Copy full SHA for df343a3 - Browse repository at this point
Copy the full SHA df343a3View commit details
Commits on Sep 18, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 6feccd9 - Browse repository at this point
Copy the full SHA 6feccd9View commit details -
Changed StrongEnum exception names and made sure in StrongEnum tests …
…that the correct types of exceptions are thrown
Configuration menu - View commit details
-
Copy full SHA for 192d471 - Browse repository at this point
Copy the full SHA 192d471View commit details
Commits on Sep 19, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 93ab047 - Browse repository at this point
Copy the full SHA 93ab047View commit details -
Fixed bug where an enum's global annotation would not be set if it wa…
…s used in multiple circuits Made styling changes to StrongEnum.scala
Configuration menu - View commit details
-
Copy full SHA for 300fbc9 - Browse repository at this point
Copy the full SHA 300fbc9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 863409f - Browse repository at this point
Copy the full SHA 863409fView commit details -
Changed the API for casting non-literal UInts to enums
Added an isValid function that checks whether or not enums have valid values Calling getWidth on an enum's companion object now returns a BigInt instead of an Int
Configuration menu - View commit details
-
Copy full SHA for 8999553 - Browse repository at this point
Copy the full SHA 8999553View commit details -
Casting a literal to an enum using the StrongEnum.castFromNonLit(n) f…
…unction is now simply a wrapper for StrongEnum.apply(n)
Configuration menu - View commit details
-
Copy full SHA for 6c0793b - Browse repository at this point
Copy the full SHA 6c0793bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f67ffb6 - Browse repository at this point
Copy the full SHA f67ffb6View commit details
Commits on Sep 21, 2018
-
* Added "next" method to EnumType
* Renamed "castFromNonLit" to "fromBits"
Configuration menu - View commit details
-
Copy full SHA for 50e3ffd - Browse repository at this point
Copy the full SHA 50e3ffdView commit details
Commits on Sep 22, 2018
-
Configuration menu - View commit details
-
Copy full SHA for cd903d6 - Browse repository at this point
Copy the full SHA cd903d6View commit details
Commits on Sep 24, 2018
-
* Changed strong enum API, so that users no longer have to declare bo…
…th a class and a companion object for each strong enum * Strong enums do not have to be static any longer
Configuration menu - View commit details
-
Copy full SHA for 6537628 - Browse repository at this point
Copy the full SHA 6537628View commit details
Commits on Sep 25, 2018
-
* Merge branch 'master' of https://github.com/freechipsproject/chisel3 …
…into strong-enums * Renamed ChiselEnum.E to ChiselEnum.Value to better match Scala enums
Configuration menu - View commit details
-
Copy full SHA for 1aa99d0 - Browse repository at this point
Copy the full SHA 1aa99d0View commit details
Commits on Sep 28, 2018
-
* Added scope protections to ChiselEnum.Value so that users cannot ca…
…ll it outside of a ChiselEnum definition * Renamed ChiselEnum.Value type to ChiselEnum.Type so that we can give it a companion object just like UInt and Bool do
Configuration menu - View commit details
-
Copy full SHA for 323c20c - Browse repository at this point
Copy the full SHA 323c20cView commit details
Commits on Oct 12, 2018
-
* Moved strong enums into experimental package
* Non-literal UInts can now be cast to enums with apply() rather than fromBits() * Reduced code-duplication by moving some functions from EnumType and Bits to Element
Configuration menu - View commit details
-
Copy full SHA for 8e1344d - Browse repository at this point
Copy the full SHA 8e1344dView commit details -
Merge branch 'master' of https://github.com/freechipsproject/chisel3 …
…into strong-enums
Configuration menu - View commit details
-
Copy full SHA for 4464037 - Browse repository at this point
Copy the full SHA 4464037View commit details