R
rajan
Hi,
I want to have a glitch filter for 100 MHz clock and the time is 8 us
(i.e. 8 us filter). I have the following description:
signal t1 : std_ulogic; -- spike event
signal t2 : std_ulogic; -- spike event
signal t3 : std_ulogic; -- spike event
signal t4 : std_ulogic; -- spike event
signal count : unsigned(3 downto 0); -- time counter
process(reset, clk)
begin
if reset = '1' then
t1 <= (others => '0');
t2 <= (others => '0');
t3 <= (others => '0');
t4 <= (others => '0');
count <= (others => '0');
elsif clk'event and clk = '1' then
t2 <= input1; -- input port
t3 <= t2;
t4 <= t3;
if t3 = '1' then
if t4 = '0' then
count <= (others => '0');
elsif count < 15 then
count <= count+1;
else
t1 <= '1'
end if;
else
t1 <= '0';
end if;
end if;
end process;
I want to have a glitch filter for 100 MHz clock and the time is 8 us
(i.e. 8 us filter). I have the following description:
signal t1 : std_ulogic; -- spike event
signal t2 : std_ulogic; -- spike event
signal t3 : std_ulogic; -- spike event
signal t4 : std_ulogic; -- spike event
signal count : unsigned(3 downto 0); -- time counter
process(reset, clk)
begin
if reset = '1' then
t1 <= (others => '0');
t2 <= (others => '0');
t3 <= (others => '0');
t4 <= (others => '0');
count <= (others => '0');
elsif clk'event and clk = '1' then
t2 <= input1; -- input port
t3 <= t2;
t4 <= t3;
if t3 = '1' then
if t4 = '0' then
count <= (others => '0');
elsif count < 15 then
count <= count+1;
else
t1 <= '1'
end if;
else
t1 <= '0';
end if;
end if;
end process;