summaryrefslogtreecommitdiffstats
path: root/smh-ac415-fpga/lcd_driver/debounce.vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'smh-ac415-fpga/lcd_driver/debounce.vhdl')
-rw-r--r--smh-ac415-fpga/lcd_driver/debounce.vhdl32
1 files changed, 0 insertions, 32 deletions
diff --git a/smh-ac415-fpga/lcd_driver/debounce.vhdl b/smh-ac415-fpga/lcd_driver/debounce.vhdl
deleted file mode 100644
index 654a2f3..0000000
--- a/smh-ac415-fpga/lcd_driver/debounce.vhdl
+++ /dev/null
@@ -1,32 +0,0 @@
-library IEEE;
-use IEEE.STD_LOGIC_1164.all;
-
-entity debounce is
- generic (stages : natural := 1);
- port (clk : in std_logic;
- i : in std_logic;
- o : out std_logic);
-end debounce;
-
-architecture Behavioral of debounce is
- signal flipflops : std_logic_vector(stages-1 downto 0) := (others => '0');
- constant zero : std_logic_vector(stages-1 downto 0) := (others => '0');
- constant one : std_logic_vector(stages-1 downto 0) := (others => '1');
- signal output : std_logic := '0';
-begin
-
- o <= output;
-
- process (clk,flipflops,i)
- begin
- if rising_edge(clk) then
- flipflops <= flipflops(flipflops'high-1 downto 0) & i;
- if flipflops = one and i = '1' then
- output <= '1';
- elsif flipflops = zero and i = '0' then
- output <= '0';
- end if;
- end if;
- end process;
-
-end architecture;