OpenCores
URL https://opencores.org/ocsvn/openverifla/openverifla/trunk

Subversion Repositories openverifla

[/] [openverifla/] [trunk/] [openverifla_2.4/] [vhdl/] [examples/] [test_counters.vhd] - Blame information for rev 46

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 46 laurentiud
-- author: Laurentiu-Cristian Duca
2
-- license: GNU GPL
3
--------------------------------------------------------------------------------
4
LIBRARY ieee;
5
USE ieee.std_logic_1164.ALL;
6
 
7
-- Uncomment the following library declaration if using
8
-- arithmetic functions with Signed or Unsigned values
9
--USE ieee.numeric_std.ALL;
10
 
11
ENTITY test_counters IS
12
END test_counters;
13
 
14
ARCHITECTURE behavior OF test_counters IS
15
 
16
    -- Component Declaration for the Unit Under Test (UUT)
17
 
18
    COMPONENT counters
19
    PORT(
20
         cntb : OUT  std_logic_vector(7 downto 0);
21
         clk : IN  std_logic;
22
         reset : IN  std_logic;
23
         uart_XMIT_dataH : OUT  std_logic;
24
         uart_REC_dataH : IN  std_logic
25
        );
26
    END COMPONENT;
27
 
28
 
29
   --Inputs
30
   signal clk : std_logic := '0';
31
   signal reset : std_logic := '0';
32
   signal uart_REC_dataH : std_logic := '0';
33
 
34
        --Outputs
35
   signal cntb : std_logic_vector(7 downto 0);
36
   signal uart_XMIT_dataH : std_logic;
37
 
38
   -- Clock period definitions
39
   constant clk_period : time := 10 ns;
40
 
41
BEGIN
42
 
43
        -- Instantiate the Unit Under Test (UUT)
44
   uut: counters PORT MAP (
45
          cntb => cntb,
46
          clk => clk,
47
          reset => reset,
48
          uart_XMIT_dataH => uart_XMIT_dataH,
49
          uart_REC_dataH => uart_REC_dataH
50
        );
51
 
52
   -- Clock process definitions
53
   clk_process :process
54
   begin
55
                clk <= '0';
56
                wait for clk_period/2;
57
                clk <= '1';
58
                wait for clk_period/2;
59
   end process;
60
 
61
 
62
   -- Stimulus process
63
   stim_proc: process
64
   begin
65
      -- hold reset state for 100 ns.
66
                reset <= '1';
67
      wait for 100 ns;
68
                reset <= '0';
69
 
70
      wait for clk_period*10;
71
 
72
      -- insert stimulus here 
73
 
74
      wait;
75
   end process;
76
 
77
END;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.