tb_test3.vhd


1
--------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer:
4
--
5
-- Create Date:   09:14:26 10/15/2009
6
-- Design Name:   
7
-- Module Name:   D:/PROJECTS/GiGe_Kamera/VHDL/Test S3A Starter/IDDR2_Daten_out/tb_test3.vhd
8
-- Project Name:  IDDR2_Daten_out
9
-- Target Device:  
10
-- Tool versions:  
11
-- Description:   
12
-- 
13
-- VHDL Test Bench Created by ISE for module: LVDS_CLOCK_IN
14
-- 
15
-- Dependencies:
16
-- 
17
-- Revision:
18
-- Revision 0.01 - File Created
19
-- Additional Comments:
20
--
21
-- Notes: 
22
-- This testbench has been automatically generated using types std_logic and
23
-- std_logic_vector for the ports of the unit under test.  Xilinx recommends
24
-- that these types always be used for the top-level I/O of a design in order
25
-- to guarantee that the testbench will bind correctly to the post-implementation 
26
-- simulation model.
27
--------------------------------------------------------------------------------
28
LIBRARY ieee;
29
USE ieee.std_logic_1164.ALL;
30
USE ieee.std_logic_unsigned.all;
31
USE ieee.numeric_std.ALL;
32
Library UNISIM;
33
use UNISIM.vcomponents.all;
34
 
35
ENTITY tb_test3 IS
36
END tb_test3;
37
 
38
ARCHITECTURE behavior OF tb_test3 IS 
39
 
40
    -- Component Declaration for the Unit Under Test (UUT)
41
 
42
    COMPONENT LVDS_CLOCK_IN
43
    PORT(
44
         AFE_CLK_P : IN  std_logic;
45
         AFE_CLK_N : IN  std_logic;
46
         DCM_RESET : IN  std_logic;
47
         CLOCK_OUT0 : OUT  std_logic;
48
         CLOCK_OUT180 : OUT  std_logic
49
        );
50
    END COMPONENT;
51
    
52
   constant AFE_CLK_P_period : time := 10ns;
53
   --Inputs
54
   signal AFE_CLK_P : std_logic := '0';
55
   signal AFE_CLK_N : std_logic := '0';
56
   signal DCM_RESET : std_logic := '0';
57
58
   --Outputs
59
   signal CLOCK_OUT0 : std_logic;
60
   signal CLOCK_OUT180 : std_logic;
61
 
62
BEGIN
63
 
64
  -- Instantiate the Unit Under Test (UUT)
65
   uut: LVDS_CLOCK_IN PORT MAP (
66
          AFE_CLK_P => AFE_CLK_P,
67
          AFE_CLK_N => AFE_CLK_N,
68
          DCM_RESET => DCM_RESET,
69
          CLOCK_OUT0 => CLOCK_OUT0,
70
          CLOCK_OUT180 => CLOCK_OUT180
71
        );
72
 
73
   -- No clocks detected in port list. Replace <clock> below with 
74
   -- appropriate port name 
75
 
76
   AFE_CLK_P_process :process
77
   begin
78
    AFE_CLK_P <= '0';
79
    AFE_CLK_N <= '1';
80
    wait for AFE_CLK_P_period/2;
81
    AFE_CLK_P <= '1';
82
    AFE_CLK_N <= '0';
83
    wait for AFE_CLK_P_period/2;
84
   end process;
85
 
86
87
   -- Stimulus process
88
   stim_proc: process
89
   begin    
90
      -- hold reset state for 100ms.
91
      wait for 100ms;  
92
93
      wait for AFE_CLK_P_period*10;
94
95
      -- insert stimulus here 
96
97
      wait;
98
   end process;
99
100
END;