oneHotToBinary method

Logic oneHotToBinary()

Decodes this one-hot signal using the default OneHotToBinary codec.

The output width is widthFor(width). The input should have exactly one set bit; invalid and unknown inputs follow the selected codec's behavior, which depends on input width.

For unknown inputs, the case codec can produce different results in ROHD simulation and generated RTL.

Use OneHotToBinary directly if an error output is needed.

Implementation

Logic oneHotToBinary() => OneHotToBinary(this).binary;