I have the Xilinx Spartan6 and next VHDL code:
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity Switches_Leds is
Port (switch_0: in STD_LOGIC;
LED_0 : out STD_LOGIC);
end Switches_Leds;
architecture Behavioral of Switches_Leds is
begin
LED_0 <= switch_0;
end;
Here is my User constraint file:
NET "switch_0" LOC = C3;
NET "LED_0" LOC = P4;
My question is: Why the led is always is turned on, but it goes off if I click on button ?
I explain: I program my fpga - the led is turned on, I press the switch button - the led is turned off, I unpress the button - led goes on.