Decode a BCD digit to the seven segments of a common-cathode display (segments light when their bit is 1). The output order is seg = {a, b, c, d, e, f, g}, where a is the top segment, b and c the right side, d the bottom, e and f the left side and g the middle. For example 0 lights everything except g: 1111110; 1 lights b and c: 0110000.
Input: bcd, a digit 0 to 9 (only these are tested).
Output: seg, 7 bits {a,b,c,d,e,f,g}.
The testbench applies the ten digits and compares all seven segments.
Contributed by Indicore