Design a circuit that controls a 7-segment display to represent a BCD digit. The circuit has a BCD digit as input and 7 output functions that control the segments (the output must be 1 when the segment must be illuminated).
module bcd_seven_segment (digit, a, b, c, d, e, f, g);
input [3:0] digit;
output a, b, c, d, e, f, g;
digit is the 4-input BCD digit, representing digits
from 0 to 9.
a-g are the outputs, each one
corresponding to a segment according to the figure.