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

Subversion Repositories lcd1

[/] [lcd1/] [trunk/] [src/] [BACKUP/] [topEntity_tb.vhd] - Blame information for rev 2

Go to most recent revision | 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 topEntity_tb IS
34
END topEntity_tb;
35
 
36
ARCHITECTURE behavior OF topEntity_tb IS
37
 
38
        -- Component Declaration for the Unit Under Test (UUT)
39
        COMPONENT topEntity
40
        PORT(
41
                clk : IN std_logic;
42
                j_down, j_left, j_right, j_up : IN std_logic;
43
                led : OUT std_logic_vector(3 downto 0) );
44
        END COMPONENT;
45
 
46
        --Inputs
47
        SIGNAL clk :  std_logic := '0';
48
        signal j_down : std_logic := '1';
49
        SIGNAL j_right : std_logic := '1';
50
        SIGNAL j_left : std_logic := '1';
51
        signal j_up : std_logic := '1';
52
 
53
        --Outputs
54
        SIGNAL led :  std_logic_vector(3 downto 0);
55
 
56
BEGIN
57
 
58
        -- Instantiate the Unit Under Test (UUT)
59
        uut: topEntity PORT MAP(
60
                clk => clk,
61
                j_down => j_down, j_left => j_left, j_right => j_right, j_up => j_up,
62
                led => led
63
        );
64
 
65
        tb_clk : PROCESS
66
        BEGIN
67
 
68
                -- Wait 100 ns for global reset to finish
69
                --wait for 100 ns;
70
 
71
                clk <= not clk;
72
                wait for 5 ns;
73
                -- Place stimulus here
74
        END PROCESS;
75
 
76
        tb_s: PROCESS
77
        BEGIN
78
                wait for 15 ms;
79
                j_down <= '0';
80
                wait for 25 ms;
81
                j_down <= '1';
82
                wait for 150 ms;
83
                j_left <= '0';
84
                wait for 35 ms;
85
                j_left <= '1';
86
                wait for 100 ms;
87
                j_right <= '0';
88
                wait for 30 ms;
89
                j_right <= '1';
90
--                wait for 70 ms;
91
--                j_left <= '0';
92
--                wait for 30 ms ;
93
--                j_left <= '1';
94
--                wait for 100 ms;
95
--                j_up <= '0';
96
--                wait for 40 ms;
97
--                j_up <= '1';
98
--                wait for 120 ms;
99
--                j_right <= '0';
100
--                wait for 35 ms;
101
--                j_right <= '1';
102
                wait;
103
 
104
        END PROCESS;
105
END;

powered by: WebSVN 2.1.0

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