??? 10/16/07 17:36 Modified: 10/16/07 17:37 Read: times |
#145816 - huh? Responding to: ???'s previous message |
Russ Cooper said:
Andy said:
Actually, I don't see ... Oh, sure you do. I probably should have used binary notation instead decimal for the output values, like this: case (in) 8'b00110001: out = 2'b01; 8'b10101100: out = 2'b10; 8'b11110101: out = 2'b11; default: out = 2'dx; endcaseNow it's easy to see that for the three defined input vectors, out[1] is always the same as in[7], and out[0] is always the same as in[0]. Since the output is don't care for all other input, the simplest implementation is just two wires. Am I being stupid here? For once, I don't think so. But you have six other bits that are interesting. Bits [1] and [5] are the same in all three cases so we don't care. But bits [2], [3], [4] and [6] are different in the different cases, so of course the tools have to take those bits into account! -a |