??? 10/16/07 22:11 Read: times |
#145825 - defaults? Responding to: ???'s previous message |
Russ,
The default output means that you get "xx" for all of the 253 cases not covered by the three cases you specify. Of course that is for simulation only, as real hardware has no such state. You'd be wise to make your default assignment to 2'b00 so the synthesizer is clear about what is should do for the other cases. But my more pressing question: case (in) 8'b00110001: out = 2'b01; 8'b10101100: out = 2'b10; 8'b11110101: out = 2'b11; default: out = 2'dx; endcaseYou say, "Bits [0] and [7] are sufficient by themselves to distinguish among the three specified input vectors." I still don't understand why you consider that bits 2, 3, 4 and 6 in your eight-bit vector are somehow unimportant. If they were the SAME for the three choices, then sure, the comparison could be reduced to the bit assignment, but they are not! -a |