Electronic – Constraining a 7 segment display in VHDL

fpgaucfxilinx

Right now I'm just trying to configure a single digit 7 segment display, and I'm pretty stuck.

All of the resources I can find say to use a 7 bit logic vector and just stop there. So I understand how it works, the logic vector turns on (or in my case off, since the Nexys 3 apparently turns them off on logic high and on with logic low) with the position in the vector corresponding to a specific segment.

What I do not understand is how to constrain this 7 bit vector to the series of pins. I know the basics of how constraints work (I would just put "LED" in the constraints file in the NET line in the UCF and this would turn it on when LED = 1 in the code) but I'm lost as to how to go about doing that.

Best Answer

An example constraint would be

inst "led0" LOC=A1;

You have to lock down each of the 7 bits separately.

p.s. This is vendor-specific. It isn't part of VHDL.

More detail on UCF files: http://www.xilinx.com/support/documentation/sw_manuals/xilinx13_1/cgd.pdf