If you are saying that you would choose
the value "1000" over "100-", I will agree,
but for these reasons:
1. The logic description,
and test requirements,
and bus interface spec will be simpler.
2. Changes to the map are less trouble.
Now, if I were down to my last LUT,
I might negotiate, but that hasn't happened
since I was targeting a 22v10.
But LUT usage is what this is about. The point is not that there is
another product term in the equation, the point is that there is
another *input* to the term in the equation. This can often cause
even more than one LUT to be used depending on the complexity of the
rest of the logic producing this output. I have had state machine
logic fan out in a lot of complexity. One input would go to some four
or five LUTs in the tree. If I coded it so that a given input was a
don't care in some of the terms, that could allow better packing of
the LUTs and lower the LUT usage noticeably.
But of course, this depends on the logic being coded.
If the values were internal states
rather than a public address, I would use an enumeration
and let synthesis pack the gates.
I have seen some really poor implementations for state machines. I
prefer to use one-hot encoding and manually specify the transitions.
Then I *know* the logic is fairly optimal. BTW, when using one-hot
encoding, the transitions between states map to the bits used to
specify the states. So you can create a signal for each state and
specify all of the input transitions for that state and *not* the
output transitions.
process (clk, reset) begin
if (reset = '1') then
foo <= '0';
bar <= '0';
ralph <= '0';
applesauce <= '0';
elsif (rising_edge(clk)) then
foo <= (bar and input1) or
(ralph and input2) or
(applesauce and (input3 or input4)) or
(foo and not (input5 or input6 or input7));
bar <= (foo and input5) or
(bar and not (input6 or input7));
etc...
end if;
end process;
The argument that '0' is a better choice than '1'
would have to be one of style.
For a 4 bit decode on a FPGA, a sum of products in not needed.
Yes, but this is potentially just a part of an output specification.
Otherwise why bother even thinking about it.
Rick