summaryrefslogtreecommitdiff
path: root/docs/src/explanations
diff options
context:
space:
mode:
authorJack Koenig2021-07-01 16:34:48 -0700
committerJack Koenig2021-07-01 18:03:42 -0700
commit5fe539c707c88eedbb112f5c6bcea1dfe1d52169 (patch)
tree8d9bf0d80eec9e003907056fea8b12b6642252dc /docs/src/explanations
parent04caf395c737450c26f59d373d76b567a2b80f0f (diff)
Add ChiselEnum.safe factory method and avoid warning
Previously, ChiselEnum would warn any time a UInt is converted to an Enum. There was no way to suppress this warning. Now there is a factory method (`.safe`) that does not warn and returns (Enum, Bool) where the Bool is the result of calling .isValid on an Enum object. The regular UInt cast is also now smarter and will not warn if all bitvectors of the width of the Enum are legal states.
Diffstat (limited to 'docs/src/explanations')
0 files changed, 0 insertions, 0 deletions