lentin
Newbie level 2
Hi, Guys after 4 days and over 40 working hours, finally I get stucked with the following example (I am trying to executed in XUP V2P platform):
What I am trying to do is to connect RESET and BUTTON_2 to user board buttons, therefore pressing the RESET should initialize the system and pressing the BUTTON_2 should couse the LED to go in ON or OFF state.
The example is NOT working - Could you help me?!
Please do not redirect me to google - I do my best, but I cannot resolve the problem....
Thanks in advance!
Code:
entity main_button is
port( CLK : in STD_LOGIC;
RESET : in STD_LOGIC;
BUTTON_2 : in STD_LOGIC;
LED_2 : out STD_LOGIC);
end;
architecture button of main_button is
signal sig_temp : STD_LOGIC; --LED_2 output
begin
process(CLK, RESET, BUTTON_2)
begin
if(RESET='1') then
sig_temp<='0';
elsif(rising_edge(CLK)) then
if (BUTTON_2='1') then
sig_temp<=not sig_temp;
end if;
end if;
end process;
LED_2<=sig_temp;
end;
What I am trying to do is to connect RESET and BUTTON_2 to user board buttons, therefore pressing the RESET should initialize the system and pressing the BUTTON_2 should couse the LED to go in ON or OFF state.
The example is NOT working - Could you help me?!
Please do not redirect me to google - I do my best, but I cannot resolve the problem....
Thanks in advance!