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

Subversion Repositories lcd1

[/] [lcd1/] [tags/] [ver/] [src/] [topEntity_tb.vhd] - Blame information for rev 3

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
                rst : IN std_logic;
43
                lcd_data : OUT std_logic_vector(7 downto 0);
44
                lcd_ena, lcd_rs, lcd_rw : out std_logic;
45
                led : out std_logic_vector (0 downto 0) );
46
 
47
        END COMPONENT;
48
 
49
        --Inputs
50
        SIGNAL clk :  std_logic := '0';
51
        signal rst : std_logic := '1'; -- low active reset
52
 
53
        --Outputs
54
        SIGNAL lcd_data :  std_logic_vector(7 downto 0);
55
        signal lcd_ena, lcd_rs, lcd_rw : std_logic;
56
        signal led : std_logic_vector (0 downto 0);
57
 
58
BEGIN
59
 
60
        -- Instantiate the Unit Under Test (UUT)
61
        uut: topEntity PORT MAP(
62
                clk => clk,
63
                rst => rst, lcd_ena => lcd_ena, lcd_rs => lcd_rs, lcd_rw => lcd_rw,
64
                lcd_data => lcd_data, led => led
65
        );
66
 
67
        tb_clk : PROCESS
68
        BEGIN
69
 
70
                -- Wait 100 ns for global reset to finish
71
                --wait for 100 ns;
72
 
73
                clk <= not clk;
74
                wait for 5 ns;
75
                -- Place stimulus here
76
        END PROCESS;
77
 
78
        tb_s: PROCESS
79
        BEGIN
80
                wait for 15 ms;
81
                rst <= '0';
82
                wait for 25 ms;
83
                rst <= '1';
84
                wait;
85
 
86
        END PROCESS;
87
END;

powered by: WebSVN 2.1.0

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