??? 10/11/07 22:59 Read: times |
#145678 - Not quite what I meant Responding to: ???'s previous message |
Don't cares will work just fine for describing logic in that they will simulate and synthesize. What I meant is that the synthesizer usually craps out when it sees don't cares and doesn't optimize like it should. If you define the logic completely without don't cares, it will synthesize using no slices.
I don't know verilog, but the VHDL equivalent would be: with input select output <= "00" when "00000000", "01" when "00000001", "00" when "00000010", "01" when "00000011", "00" when "00000100", "01" when "00000101", "00" when "00000110", "01" when "00000111", "00" when "00001000", "01" when "00001001", . . . "11" when "11110011", "10" when "11110100", "11" when "11110101", "10" when "11110110", "11" when "11110111", "10" when "11111000", "11" when "11111001", "10" when "11111010", "11" when "11111011", "10" when "11111100", "11" when "11111101", "10" when "11111110", "11" when "11111111", "--" when OTHERS;In this case, the RTL schematic shows output(1) connected to input(7) and output(0) connected to input(0). As a sidenote, if you use your original code and use the synplicity synthesizer it only results in 3 LUTs instead of 4. The RTL schematic showed output(1) connected to input(7) but output(0) failed to optimize. |