source: firmware/FTM/Lightpulser_interface/Basic_Version/single_LP_Basci_tb.vhd@ 12890

Last change on this file since 12890 was 10855, checked in by vogler, 13 years ago
Lightpulser Basic version with 50MHz clock only added
File size: 2.8 KB
Line 
1--------------------------------------------------------------------------------
2-- Company: IPP
3-- Engineer: Patrick Vogler
4--
5-- Create Date: 10:45:29 05/27/2011
6-- Design Name:
7-- Module Name: /home/pavogler/ISDC_repos/firmware/FTM/Lightpulser_interface/Basic_Version//single_LP_Basci_tb.vhd
8-- Project Name: Lightpulser_Basic
9-- Target Device:
10-- Tool versions:
11-- Description:
12--
13-- VHDL Test Bench Created by ISE for module: single_LP_Basic
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--------------------------------------------------------------------------------
28LIBRARY ieee;
29USE ieee.std_logic_1164.ALL;
30USE ieee.std_logic_unsigned.all;
31USE ieee.numeric_std.ALL;
32
33ENTITY single_LP_Basci_tb IS
34END single_LP_Basci_tb;
35
36ARCHITECTURE behavior OF single_LP_Basci_tb IS
37
38 -- Component Declaration for the Unit Under Test (UUT)
39
40 COMPONENT single_LP_Basic
41 PORT(
42 clk_50 : IN std_logic;
43 LP_Pulse_out : OUT std_logic;
44 LP_pulse_in : IN std_logic
45 );
46 END COMPONENT;
47
48
49 --Inputs
50 signal clk_50 : std_logic := '0';
51 signal LP_pulse_in : std_logic := '0';
52
53 --Outputs
54 signal LP_Pulse_out : std_logic;
55
56 -- Clock period definitions
57 constant clk_50_period : time := 20 ns;
58
59BEGIN
60
61 -- Instantiate the Unit Under Test (UUT)
62 uut: single_LP_Basic PORT MAP (
63 clk_50 => clk_50,
64 LP_Pulse_out => LP_Pulse_out,
65 LP_pulse_in => LP_pulse_in
66 );
67
68 -- Clock process definitions
69 clk_50_process :process
70 begin
71 clk_50 <= '0';
72 wait for clk_50_period/2;
73 clk_50 <= '1';
74 wait for clk_50_period/2;
75 end process;
76
77
78 -- Stimulus process
79 stim_proc: process
80 begin
81 -- hold reset state for 100 ms.
82 -- wait for 100 ms;
83
84 wait for clk_50_period*10;
85
86 -- insert stimulus here
87
88 LP_pulse_in <= '0'; -- init input
89 wait for clk_50_period*10;
90
91 LP_pulse_in <= '1'; -- short 20ns pulse
92 wait for clk_50_period*1;
93 LP_pulse_in <= '0';
94 wait for clk_50_period*10;
95
96
97
98 LP_pulse_in <= '1'; -- 60ns pulse
99 wait for clk_50_period*3;
100 LP_pulse_in <= '0';
101 wait for clk_50_period*10;
102
103
104
105 LP_pulse_in <= '1'; -- long 200ns pulse
106 wait for clk_50_period*10;
107 LP_pulse_in <= '0';
108 wait for clk_50_period*10;
109
110
111
112
113
114
115 wait;
116 end process;
117
118END;
Note: See TracBrowser for help on using the repository browser.