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

Subversion Repositories tlc2

[/] [tlc2/] [trunk/] [src/] [tlc2_tb.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimo
 
2
--------------------------------------------------------------------------------
3
-- Company: 
4
-- Engineer:
5
--
6
-- Create Date:   09:44:54 03/26/2008
7
-- Design Name:   counter
8
-- Module Name:   counter_tb.vhd
9
-- Project Name:  clk_tb
10
-- Target Device:  
11
-- Tool versions:  
12
-- Description:   
13
-- 
14
-- VHDL Test Bench Created by ISE for module: counter
15
--
16
-- Dependencies:
17
-- 
18
-- Revision:
19
-- Revision 0.01 - File Created
20
-- Additional Comments:
21
--
22
-- Notes: 
23
-- This testbench has been automatically generated using types std_logic and
24
-- std_logic_vector for the ports of the unit under test.  Xilinx recommends 
25
-- that these types always be used for the top-level I/O of a design in order 
26
-- to guarantee that the testbench will bind correctly to the post-implementation 
27
-- simulation model.
28
--------------------------------------------------------------------------------
29
LIBRARY ieee;
30
USE ieee.std_logic_1164.ALL;
31
USE ieee.numeric_std.ALL;
32
 
33
ENTITY tlc2_tb IS
34
END tlc2_tb;
35
 
36
ARCHITECTURE behavior OF tlc2_tb IS
37
 
38
        -- Component Declaration for the Unit Under Test (UUT)
39
        COMPONENT tlc2
40
        PORT(
41
                clk : IN std_logic;
42
                rst, j_left, j_right : IN std_logic;
43
                led : OUT std_logic_vector(2 downto 0) );
44
        END COMPONENT;
45
 
46
        --Inputs
47
        SIGNAL clk :  std_logic := '0';
48
        SIGNAL rst :  std_logic := '0';
49
        SIGNAL j_right : std_logic := '1';
50
        SIGNAL j_left : std_logic := '1';
51
 
52
        --Outputs
53
        SIGNAL led :  std_logic_vector(2 downto 0);
54
 
55
BEGIN
56
 
57
        -- Instantiate the Unit Under Test (UUT)
58
        uut: tlc2 PORT MAP(
59
                clk => clk,
60
                rst => rst, j_left => j_left, j_right => j_right,
61
                led => led
62
        );
63
 
64
        tb_clk : PROCESS
65
        BEGIN
66
 
67
                -- Wait 100 ns for global reset to finish
68
                --wait for 100 ns;
69
 
70
                clk <= not clk;
71
                wait for 5 ns;
72
                -- Place stimulus here
73
        END PROCESS;
74
 
75
        tb_s: PROCESS
76
        BEGIN
77
                wait for 15 ns;
78
                rst <= '0';
79
                wait for 25 ns;
80
                rst <= '1';
81
                wait for 15 ns;
82
                j_left <= '0';
83
                wait for 30 ns;
84
                j_left <= '1';
85
                wait for 13000 ns;
86
                j_right <= '0';
87
                wait for 100 ns;
88
                j_right <= '1';
89
    --            wait for 1000 ns;
90
      --          j_left <= '0';
91
        --        wait for 100 ns ;
92
          --      j_left <= '1';
93
            --    wait for 1500 ns;
94
              --  j_right <= '0';
95
              --  wait for 50 ns;
96
              ---  j_right <= '1';
97
                wait;
98
 
99
        END PROCESS;
100
END;

powered by: WebSVN 2.1.0

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