On Dec 2, 3:19 pm, Andy <(E-Mail Removed)> wrote:

> In some ways the t-state version is easier to understand, but it also

> requires the reader to understand that no real tri-state signals are

> being used, it will all get converted to mux logic. It also cannot be

> implemented in a function or procedure.

>
For an example of an encoding method that does not prioritize hark

back to the overly windy "New keyword 'orif' and its implications"

thread in this group from Sep, 2007

http://groups.google.com/group/comp....3697772e2d7f94
From there is an example of 8->3 encoding (shown below) that can be

implemented in a function and can be generalized to work with other

bit widths as well and will be implemented in minimal logic.

Encoded_OneHotInps(0) <= OneHotInps(1) xor OneHotInps(3) xor

OneHotInps(5) xor OneHotInps(7);

Encoded_OneHotInps(1) <= OneHotInps(2) xor OneHotInps(3) xor

OneHotInps(6) xor OneHotInps(7);

Encoded_OneHotInps(2) <= OneHotInps(4) xor OneHotInps(5) xor

OneHotInps(6) xor OneHotInps(7);

Kevin Jennings