Implementing additional buttons

I want to add a few additional pushbuttons to my design but I encountered some problems. I have two questions:

  • How do I have to implement such buttons in VHDL? This is what I’ve done so far:
    in the VHDL-file:
    addbutton1 : in STD_LOGIC;

and in the constraints file:
NET “addbutton1” LOC = “P42”;

  • Maybe the mistake is in my electronic ciruit. Is there a circuit diagram or xilinx documentation available that shows how to implement such a circuit properly? Which circuit was used for the four XEM3001 pushbuttons?

Thank you in advance for your answer!

What sort of problems are you having?

The pushbutton connection is described at the bottom of page 10 of the XEM3001v2 User’s Manual. The pushbuttons are connected between the FPGA pin and DGND. A pullup resistor is also attached to the FPGA pin.

So, when the button is released, the FPGA pin is pulled high. When depressed, the FPGA pin is pulled low.