I have built a very simple test case, built for a Basys3, in an effort to isolate my mental error. In the VHDL below I am expecting that the process(btn) will only be triggered when the input "btn" changes. The ila I have in place shows that the process is running continuously. Well at least that is what I think it is showing me. The ila shows "btn" signal remains at zero while the up_test is increasing at a rate that appears to be free running.
I must have some horrible misunderstanding about the behavior of a process with respect to its sensitivity list.
Please set me straight.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.numeric_std.all;
entity btn_test is
Port (
clk_100M : in STD_LOGIC;
btn : in STD_LOGIC_VECTOR (4 downto 0);
led : out STD_LOGIC_VECTOR (15 downto 0);
seg : out STD_LOGIC_VECTOR (6 downto 0);
an : out STD_LOGIC_VECTOR (3 downto 0);
dp : out STD_LOGIC
);
end btn_test;
architecture Behavioral of btn_test is
signal up_test : natural := 0;
signal up_test_i : std_logic_vector (31 downto 0);
COMPONENT ila_0
PORT (
clk : IN STD_LOGIC;
probe0 : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
probe1 : IN STD_LOGIC_VECTOR(4 DOWNTO 0)
);
END COMPONENT ;
begin
up_test_i <= std_logic_vector(to_unsigned(up_test,32));
up_test_ila : ila_0
PORT MAP (
clk => clk_100M,
probe0 => up_test_i,
probe1 => btn
);
count_button_process_triggers: process(btn)
begin
up_test <= up_test +1;
end process;
led <= (others => '0');
seg <= (others => '0');
an <= (others => '1');
dp <= '0';
end Behavioral;
Question
FlyingBlindOnARocketCycle
I have built a very simple test case, built for a Basys3, in an effort to isolate my mental error. In the VHDL below I am expecting that the process(btn) will only be triggered when the input "btn" changes. The ila I have in place shows that the process is running continuously. Well at least that is what I think it is showing me. The ila shows "btn" signal remains at zero while the up_test is increasing at a rate that appears to be free running.
I must have some horrible misunderstanding about the behavior of a process with respect to its sensitivity list.
Please set me straight.
Link to comment
Share on other sites
32 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.