]> rtime.felk.cvut.cz Git - fpga/quadcount.git/blob - quadcount_tb.vhdl
silly manual testbench added (now should be makeable)
[fpga/quadcount.git] / quadcount_tb.vhdl
1 library ieee;
2 use ieee.std_logic_1164.all;
3 use ieee.std_logic_arith.all;
4 use ieee.std_logic_unsigned.all;
5 use ieee.numeric_std.all;
6
7 entity quadcount_tb is
8 end quadcount_tb;
9
10 architecture behavioral of quadcount_tb is
11   component qcounter
12     port (
13       clock: in std_logic;
14       reset: in std_logic;
15       a, b: in std_logic;
16       qcount: out std_logic_vector (31 downto 0);
17       a_rise, a_fall, b_rise, b_fall, ab_event: out std_logic;
18       ab_error: out std_logic
19     );
20   end component;
21
22   signal clock, reset, a, b: std_logic;
23 begin
24   qc0: qcounter
25     port map (
26       clock => clock,
27       reset => reset,
28       a => a,
29       b => b
30     );
31
32   reset <= '0';
33   a <= '0';
34   b <= '0';
35   
36   test: process
37   begin
38     clock <= '0';
39     wait for 1 us;
40     clock <= '1';
41     wait for 1 us;
42   end process;
43 end behavioral;