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

Subversion Repositories noekeoncore

[/] [noekeoncore/] [trunk/] [tb/] [tb_theta.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 entactogen
 
2
-- Copyright (c) 2013 Antonio de la Piedra
3
 
4
-- This program is free software: you can redistribute it and/or modify
5
-- it under the terms of the GNU General Public License as published by
6
-- the Free Software Foundation, either version 3 of the License, or
7
-- (at your option) any later version.
8
 
9
-- This program is distributed in the hope that it will be useful,
10
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-- GNU General Public License for more details.
13
 
14
-- You should have received a copy of the GNU General Public License
15
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
LIBRARY ieee;
18
USE ieee.std_logic_1164.ALL;
19
 
20
ENTITY tb_theta IS
21
END tb_theta;
22
 
23
ARCHITECTURE behavior OF tb_theta IS
24
 
25
    -- Component Declaration for the Unit Under Test (UUT)
26
 
27
    COMPONENT theta
28
    PORT(
29
         clk : IN  std_logic;
30
         a_0_in : IN  std_logic_vector(31 downto 0);
31
         a_1_in : IN  std_logic_vector(31 downto 0);
32
         a_2_in : IN  std_logic_vector(31 downto 0);
33
         a_3_in : IN  std_logic_vector(31 downto 0);
34
         k_0_in : IN  std_logic_vector(31 downto 0);
35
         k_1_in : IN  std_logic_vector(31 downto 0);
36
         k_2_in : IN  std_logic_vector(31 downto 0);
37
         k_3_in : IN  std_logic_vector(31 downto 0);
38
         a_0_out : OUT  std_logic_vector(31 downto 0);
39
         a_1_out : OUT  std_logic_vector(31 downto 0);
40
         a_2_out : OUT  std_logic_vector(31 downto 0);
41
         a_3_out : OUT  std_logic_vector(31 downto 0)
42
        );
43
    END COMPONENT;
44
 
45
 
46
   --Inputs
47
   signal clk : std_logic := '0';
48
   signal a_0_in : std_logic_vector(31 downto 0) := (others => '0');
49
   signal a_1_in : std_logic_vector(31 downto 0) := (others => '0');
50
   signal a_2_in : std_logic_vector(31 downto 0) := (others => '0');
51
   signal a_3_in : std_logic_vector(31 downto 0) := (others => '0');
52
   signal k_0_in : std_logic_vector(31 downto 0) := (others => '0');
53
   signal k_1_in : std_logic_vector(31 downto 0) := (others => '0');
54
   signal k_2_in : std_logic_vector(31 downto 0) := (others => '0');
55
   signal k_3_in : std_logic_vector(31 downto 0) := (others => '0');
56
 
57
        --Outputs
58
   signal a_0_out : std_logic_vector(31 downto 0);
59
   signal a_1_out : std_logic_vector(31 downto 0);
60
   signal a_2_out : std_logic_vector(31 downto 0);
61
   signal a_3_out : std_logic_vector(31 downto 0);
62
 
63
   -- Clock period definitions
64
   constant clk_period : time := 10 ns;
65
 
66
BEGIN
67
 
68
        -- Instantiate the Unit Under Test (UUT)
69
   uut: theta PORT MAP (
70
          clk => clk,
71
          a_0_in => a_0_in,
72
          a_1_in => a_1_in,
73
          a_2_in => a_2_in,
74
          a_3_in => a_3_in,
75
          k_0_in => k_0_in,
76
          k_1_in => k_1_in,
77
          k_2_in => k_2_in,
78
          k_3_in => k_3_in,
79
          a_0_out => a_0_out,
80
          a_1_out => a_1_out,
81
          a_2_out => a_2_out,
82
          a_3_out => a_3_out
83
        );
84
 
85
   -- Clock process definitions
86
   clk_process :process
87
   begin
88
                clk <= '0';
89
                wait for clk_period/2;
90
                clk <= '1';
91
                wait for clk_period/2;
92
   end process;
93
 
94
 
95
   -- Stimulus process
96
   stim_proc: process
97
   begin
98
                wait for clk_period/2 + clk_period;
99
 
100
                a_0_in <= X"61396c13";
101
                a_1_in <= X"637434b8";
102
                a_2_in <= X"fc6559a9";
103
                a_3_in <= X"5b643f2c";
104
 
105
                k_0_in <= X"4ED2552D";
106
                k_1_in <= X"1AE69D5D";
107
                k_2_in <= X"C9B75C29";
108
                k_3_in <= X"0C49E157";
109
 
110
                wait for clk_period;
111
 
112
                k_0_in <= (others => '0');
113
                k_1_in <= (others => '0');
114
                k_2_in <= (others => '0');
115
                k_3_in <= (others => '0');
116
 
117
                a_0_in <= X"4ED2552D";
118
                a_1_in <= X"1AE69D5D";
119
                a_2_in <= X"C9B75C29";
120
                a_3_in <= X"0C49E157";
121
 
122
                wait for clk_period;
123
 
124
                a_0_in <= X"200d6ff9";
125
                a_1_in <= X"02667af7";
126
                a_2_in <= X"3a345347";
127
                a_3_in <= X"2cd90d69";
128
 
129
                k_0_in <= X"fd178c4d";
130
                k_1_in <= X"fc0df5d7";
131
                k_2_in <= X"7a728549";
132
                k_3_in <= X"eaa289dd";
133
 
134
      wait;
135
   end process;
136
 
137
END;

powered by: WebSVN 2.1.0

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