prim_gray2bin

Convert an N-bit Gray code value to binary.

Drive each z_o bit as the XOR reduction of a_i from that bit through the MSB. N must be positive at elaboration.

Parameters

Table 1. Parameters
NameTypeDefaultDescription
Nint-1Operand width.

Ports

Table 2. Ports
NameDirectionTypeDescription
a_iinputlogic [N-1:0]Gray-coded input.
z_ooutputlogic [N-1:0]Binary output.