Module find_first_one

A leading-one finder / leading zero counter. Set FLIP to 0 for find_first_one => first_one_o is the index of the first one (from the LSB) Set FLIP to 1 for leading zero counter => first_one_o is the number of leading zeroes (from the MSB)

Parameters

WIDTH

The width of the input vector.

FLIP

NUM_LEVELS

Ports

in_i

first_one_o

no_ones_o