FPGA Seven Segment LEDs
The use of seven segment LED's on an FPGA is a tricky business. The
things one must concern one's self with include:
- Converting some 4 bit number to the 7 segment wires (and, if desired, the decimal point)
- Mapping the 7 segment wires to the corect pins of the FPGA that mate to the seven segment board
- Mapping the inputs tot he seven segment board to the actual seven segment display lights
The mapping algorithm is a two step process for all boards, but is
most clear with Tony Burch's seven segment board
Note: I really like the BurchEd product line .
My father, Ed, and our friend LaFarr purchased some of Tony's
equipment and are really happy with it. You can read more about our
I've written some Perl and Verilog code to help with this process.
What I wanted was a design such that given an input of a 4 bit
binary number (a vector), the [named] connector to FPGA to which the
seven segment display is connected, and the specific LED that I wanted
to drive, I could generate the necessary components to drive the seven
Put another way:
4 bit vector -> 7 bit vector -> 7 individual wires -> .ucf file -> LEDs
Keep in mind that I have a particular reasoning for the 4 bit vector
to 7 bit vector conversion before the 7 indiviaul wires. What I'm
trying to accomplish is that with the simulator
wires take 7 lines of the wave output window. Instead, as a 7 bit
vector, there is only one line item in the wave output window. Then,
I convert it to individual wires and then pump it out to the LEDs.