Bench.vhd


1
--------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer:
4
--
5
-- Create Date:   11:33:42 02/26/2010
6
-- Design Name:   
7
-- Module Name:   C:/Xilinx/Simulator/Simulator_Version01/Bench.vhd
8
-- Project Name:  Simulator_Version01
9
-- Target Device:  
10
-- Tool versions:  
11
-- Description:   
12
-- 
13
-- VHDL Test Bench Created by ISE for module: Flanken_Detektierung_AD_Wandler
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
 
33
ENTITY Bench IS
34
END Bench;
35
 
36
ARCHITECTURE behavior OF Bench IS 
37
 
38
    -- Component Declaration for the Unit Under Test (UUT)
39
 
40
    COMPONENT Flanken_Detektierung_AD_Wandler
41
    PORT(
42
         Eingang_Flanken_Detektierung_AD_Wandler : IN  std_logic_vector(11 downto 0);
43
         Clk_20Mhz_Flanken_Detektierung : IN  std_logic;
44
         Analoge_Maximale_Amplitude_AD_Wandler : OUT  std_logic_vector(11 downto 0);
45
         Analoge_Flanke_wurde_erkannt_vom_AD_Wandler : OUT  std_logic
46
        );
47
    END COMPONENT;
48
    
49
50
   --Inputs
51
   signal Eingang_Flanken_Detektierung_AD_Wandler : std_logic_vector(11 downto 0) := (others => '0');
52
   signal Clk_20Mhz_Flanken_Detektierung : std_logic := '0';
53
54
   --Outputs
55
   signal Analoge_Maximale_Amplitude_AD_Wandler : std_logic_vector(11 downto 0);
56
   signal Analoge_Flanke_wurde_erkannt_vom_AD_Wandler : std_logic;
57
58
   -- Clock period definitions
59
   constant Clk_20Mhz_Flanken_Detektierung_period : time := 50000 ps;
60
 
61
BEGIN
62
 
63
  -- Instantiate the Unit Under Test (UUT)
64
   uut: Flanken_Detektierung_AD_Wandler PORT MAP (
65
          Eingang_Flanken_Detektierung_AD_Wandler => Eingang_Flanken_Detektierung_AD_Wandler,
66
          Clk_20Mhz_Flanken_Detektierung => Clk_20Mhz_Flanken_Detektierung,
67
          Analoge_Maximale_Amplitude_AD_Wandler => Analoge_Maximale_Amplitude_AD_Wandler,
68
          Analoge_Flanke_wurde_erkannt_vom_AD_Wandler => Analoge_Flanke_wurde_erkannt_vom_AD_Wandler
69
        );
70
71
   -- Clock process definitions
72
   Clk_20Mhz_Flanken_Detektierung_process :process
73
   begin
74
    Clk_20Mhz_Flanken_Detektierung <= '0';
75
    wait for Clk_20Mhz_Flanken_Detektierung_period/2;
76
    Clk_20Mhz_Flanken_Detektierung <= '1';
77
    wait for Clk_20Mhz_Flanken_Detektierung_period/2;
78
   end process;
79
 
80
81
   -- Stimulus process
82
   stim_proc: process
83
   begin    
84
      -- hold reset state for 100ms.
85
      wait for 100ms;  
86
87
      wait for Clk_20Mhz_Flanken_Detektierung_period*10;
88
89
      -- insert stimulus here 
90
91
      wait;
92
   end process;
93
94
END;