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

Subversion Repositories noekeoncore

[/] [noekeoncore/] [trunk/] [tb/] [tb_round_f.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_round_f IS
21
END tb_round_f;
22
 
23
ARCHITECTURE behavior OF tb_round_f IS
24
 
25
    -- Component Declaration for the Unit Under Test (UUT)
26
 
27
    COMPONENT round_f
28
    PORT(
29
         clk : IN  std_logic;
30
         rc_in : IN  std_logic_vector(31 downto 0);
31
         a_0_in : IN  std_logic_vector(31 downto 0);
32
         a_1_in : IN  std_logic_vector(31 downto 0);
33
         a_2_in : IN  std_logic_vector(31 downto 0);
34
         a_3_in : IN  std_logic_vector(31 downto 0);
35
         k_0_in : IN  std_logic_vector(31 downto 0);
36
         k_1_in : IN  std_logic_vector(31 downto 0);
37
         k_2_in : IN  std_logic_vector(31 downto 0);
38
         k_3_in : IN  std_logic_vector(31 downto 0);
39
         a_0_out : OUT  std_logic_vector(31 downto 0);
40
         a_1_out : OUT  std_logic_vector(31 downto 0);
41
         a_2_out : OUT  std_logic_vector(31 downto 0);
42
         a_3_out : OUT  std_logic_vector(31 downto 0)
43
        );
44
    END COMPONENT;
45
 
46
 
47
   --Inputs
48
   signal clk : std_logic := '0';
49
   signal rc_in : std_logic_vector(31 downto 0) := (others => '0');
50
   signal a_0_in : std_logic_vector(31 downto 0) := (others => '0');
51
   signal a_1_in : std_logic_vector(31 downto 0) := (others => '0');
52
   signal a_2_in : std_logic_vector(31 downto 0) := (others => '0');
53
   signal a_3_in : std_logic_vector(31 downto 0) := (others => '0');
54
   signal k_0_in : std_logic_vector(31 downto 0) := (others => '0');
55
   signal k_1_in : std_logic_vector(31 downto 0) := (others => '0');
56
   signal k_2_in : std_logic_vector(31 downto 0) := (others => '0');
57
   signal k_3_in : std_logic_vector(31 downto 0) := (others => '0');
58
 
59
        --Outputs
60
   signal a_0_out : std_logic_vector(31 downto 0);
61
   signal a_1_out : std_logic_vector(31 downto 0);
62
   signal a_2_out : std_logic_vector(31 downto 0);
63
   signal a_3_out : std_logic_vector(31 downto 0);
64
 
65
   -- Clock period definitions
66
   constant clk_period : time := 10 ns;
67
 
68
BEGIN
69
 
70
        -- Instantiate the Unit Under Test (UUT)
71
   uut: round_f PORT MAP (
72
          clk => clk,
73
          rc_in => rc_in,
74
          a_0_in => a_0_in,
75
          a_1_in => a_1_in,
76
          a_2_in => a_2_in,
77
          a_3_in => a_3_in,
78
          k_0_in => k_0_in,
79
          k_1_in => k_1_in,
80
          k_2_in => k_2_in,
81
          k_3_in => k_3_in,
82
          a_0_out => a_0_out,
83
          a_1_out => a_1_out,
84
          a_2_out => a_2_out,
85
          a_3_out => a_3_out
86
        );
87
 
88
   -- Clock process definitions
89
   clk_process :process
90
   begin
91
                clk <= '0';
92
                wait for clk_period/2;
93
                clk <= '1';
94
                wait for clk_period/2;
95
   end process;
96
 
97
 
98
   -- Stimulus process
99
   stim_proc: process
100
   begin
101
      -- hold reset state for 100 ns.
102
      wait for 100 ns;
103
 
104
      wait for clk_period*10;
105
 
106
                rc_in  <= X"00000080";
107
 
108
                a_0_in <= X"61396c93";
109
                a_1_in <= X"637434b8";
110
                a_2_in <= X"fc6559a9";
111
                a_3_in <= X"5b643f2c";
112
 
113
                k_0_in <= X"1c1c1c1c";
114
                k_1_in <= X"1c1c1c1c";
115
                k_2_in <= X"1c1c1c1c";
116
                k_3_in <= X"1c1c1c1c";
117
 
118
      wait;
119
   end process;
120
 
121
END;

powered by: WebSVN 2.1.0

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