1 | --------------------------------------------------------------------------------
|
2 | -- Company:
|
3 | -- Engineer:
|
4 | --
|
5 | -- Create Date: 22:06:36 04/15/2014
|
6 | -- Design Name:
|
7 | -- Module Name: C:/Users/Steffen Kern/Documents/Xilinx/Aufgabe_3/tb_002.vhd
|
8 | -- Project Name: Aufgabe_3
|
9 | -- Target Device:
|
10 | -- Tool versions:
|
11 | -- Description:
|
12 | --
|
13 | -- VHDL Test Bench Created by ISE for module: nBit_PZG_SGA
|
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 |
|
31 | -- Uncomment the following library declaration if using
|
32 | -- arithmetic functions with Signed or Unsigned values
|
33 | --USE ieee.numeric_std.ALL;
|
34 |
|
35 | ENTITY tb_002 IS
|
36 | END tb_002;
|
37 |
|
38 | ARCHITECTURE behavior OF tb_002 IS
|
39 |
|
40 | -- Component Declaration for the Unit Under Test (UUT)
|
41 |
|
42 | COMPONENT nBit_PZG_SGA
|
43 | PORT(
|
44 | func_select : IN std_logic;
|
45 | coefficient_vector : IN std_logic_vector(0 to 7);
|
46 | data_in_for_signature : IN std_logic;
|
47 | clk : IN std_logic;
|
48 | rst : IN std_logic;
|
49 | x : OUT std_logic_vector(0 to 7)
|
50 | );
|
51 | END COMPONENT;
|
52 |
|
53 |
|
54 | --Inputs
|
55 | signal func_select : std_logic := '0';
|
56 | signal coefficient_vector : std_logic_vector(0 to 7) := (others => '0');
|
57 | signal data_in_for_signature : std_logic := '0';
|
58 | signal clk : std_logic := '0';
|
59 | signal rst : std_logic := '0';
|
60 |
|
61 | --Outputs
|
62 | signal x : std_logic_vector(0 to 7);
|
63 |
|
64 | -- Clock period definitions
|
65 | constant clk_period : time := 10 ns;
|
66 |
|
67 | BEGIN
|
68 |
|
69 | -- Instantiate the Unit Under Test (UUT)
|
70 | uut: nBit_PZG_SGA PORT MAP (
|
71 | func_select => func_select,
|
72 | coefficient_vector => coefficient_vector,
|
73 | data_in_for_signature => data_in_for_signature,
|
74 | clk => clk,
|
75 | rst => rst,
|
76 | x => x
|
77 | );
|
78 |
|
79 | -- Clock process definitions
|
80 | clk_process :process
|
81 | begin
|
82 | clk <= '0';
|
83 | wait for clk_period/2;
|
84 | clk <= '1';
|
85 | wait for clk_period/2;
|
86 | end process;
|
87 |
|
88 |
|
89 | -- Stimulus
|
90 | func_select <= '0'; -- PZG selected
|
91 | coefficient_vector <= "11111111";
|
92 |
|
93 |
|
94 | END;
|