2 use IEEE.STD_LOGIC_1164.all;
3 use IEEE.STD_LOGIC_ARITH.all;
4 use IEEE.STD_LOGIC_UNSIGNED.all;
6 --------------------------------------------------------------------------------
7 -- This is the top module instantiating quadratic counter with output to the
8 -- on-board LCD. See 'top_counter.ucf' and read how a quadratic encoder is
10 --------------------------------------------------------------------------------
19 rot_press : in std_logic;
20 rot_feed : out std_logic;
22 lcd_com : out std_logic;
23 lcd2_dp : out std_logic;
24 lcd1_dp : out std_logic;
25 lcd1 : out std_logic_vector(6 downto 0);
26 lcd2 : out std_logic_vector(6 downto 0));
29 --------------------------------------------------------------------------------
31 architecture behavioral of top_counter is
33 signal lcd_clk : std_logic;
34 signal lcd1_out : std_logic_vector (6 downto 0);
35 signal lcd2_out : std_logic_vector (6 downto 0);
37 signal qcount_data : std_logic_vector (31 downto 0);
38 signal qcount_reset : std_logic;
40 --------------------------------------------------------------------------------
44 div_20_1 : entity work.div_20
49 hex2lcd_1 : entity work.hex2lcd
51 hex => qcount_data(5 downto 2),
54 hex2lcd_2 : entity work.hex2lcd
56 hex => qcount_data(9 downto 6),
59 lcd_mux_1 : entity work.lcd_mux
68 lcd_mux_2 : entity work.lcd_mux
77 qcounter_1 : entity work.qcounter
80 reset => qcount_reset,
83 qcount => qcount_data,
91 --------------------------------------------------------------------------------
95 qcount_reset <= not reset or rot_press;