diff options
| author | Jack Koenig | 2021-07-01 16:34:48 -0700 |
|---|---|---|
| committer | Jack Koenig | 2021-07-01 18:03:42 -0700 |
| commit | 5fe539c707c88eedbb112f5c6bcea1dfe1d52169 (patch) | |
| tree | 8d9bf0d80eec9e003907056fea8b12b6642252dc /docs | |
| parent | 04caf395c737450c26f59d373d76b567a2b80f0f (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')
0 files changed, 0 insertions, 0 deletions
