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

Subversion Repositories modbus

[/] [modbus/] [trunk/] [enlace/] [bin_ascii_TB.vhd] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 guanucolui
 
2
-- VHDL Test Bench Created from source file bin_ascii.vhd -- 14:56:18 11/03/2010
3
--
4
-- Notes: 
5
-- This testbench has been automatically generated using types std_logic and
6
-- std_logic_vector for the ports of the unit under test.  Xilinx recommends 
7
-- that these types always be used for the top-level I/O of a design in order 
8
-- to guarantee that the testbench will bind correctly to the post-implementation 
9
-- simulation model.
10
--
11
LIBRARY ieee;
12
USE ieee.std_logic_1164.ALL;
13
USE ieee.numeric_std.ALL;
14
 
15
ENTITY bin_ascii_bin_ascii_TB_vhd_tb IS
16
END bin_ascii_bin_ascii_TB_vhd_tb;
17
 
18
ARCHITECTURE behavior OF bin_ascii_bin_ascii_TB_vhd_tb IS
19
 
20
        COMPONENT bin_ascii
21
        PORT(
22
                clk : IN std_logic;
23
                reset : IN std_logic;
24
                bin : IN std_logic_vector(7 downto 0);
25
                ascii_h : OUT std_logic_vector(7 downto 0);
26
                ascii_l : OUT std_logic_vector(7 downto 0)
27
                );
28
        END COMPONENT;
29
 
30
        SIGNAL clk :  std_logic;
31
        SIGNAL reset :  std_logic;
32
        SIGNAL bin :  std_logic_vector(7 downto 0);
33
        SIGNAL ascii_h :  std_logic_vector(7 downto 0);
34
        SIGNAL ascii_l :  std_logic_vector(7 downto 0);
35
           -- Clock period definitions
36
   constant clk_period : time := 20ns;
37
 
38
 
39
BEGIN
40
   clk_process :process
41
   begin
42
                clk <= '0';
43
                wait for clk_period/2;
44
                clk <= '1';
45
                wait for clk_period/2;
46
   end process;
47
 
48
        uut: bin_ascii PORT MAP(
49
                clk => clk,
50
                reset => reset,
51
                bin => bin,
52
                ascii_h => ascii_h,
53
                ascii_l => ascii_l
54
        );
55
 
56
 
57
-- *** Test Bench - User Defined Section ***
58
   tb : PROCESS
59
   BEGIN
60
         reset <= '1';
61
         wait for 100ns;
62
         reset <= '0';
63
         wait for 100ns;
64
--       bin <= "11101110"; -- hex 
65
         wait; -- will wait forever
66
   END PROCESS;
67
-- *** End Test Bench - User Defined Section ***
68
 
69
END;

powered by: WebSVN 2.1.0

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