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

Subversion Repositories rtea

[/] [rtea/] [trunk/] [sim/] [rtea_tb.vhdl] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 strijar
-- Copyright © 2009 Belousov Oleg <belousov.oleg@gmail.com>
2
--
3
-- This program is free software: you can redistribute it and/or modify
4
-- it under the terms of the GNU General Public License as published by
5
-- the Free Software Foundation, either version 3 of the License, or
6
-- (at your option) any later version.
7
-- 
8
-- This program is distributed in the hope that it will be useful,
9
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
10
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
-- GNU General Public License for more details.
12
-- 
13
-- You should have received a copy of the GNU General Public License
14
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
 
16
library ieee;
17
use ieee.std_logic_1164.all;
18
use ieee.numeric_std.all;
19
 
20
entity rtea_tb is
21
end rtea_tb;
22
 
23
architecture behav of rtea_tb is
24
    component rtea is
25
        generic(
26
            KEY_SIZE        : in integer := 256
27
        );
28
        port (
29
            clk             : in std_logic;
30
            start           : in std_logic;
31
            mode            : in std_logic;
32
            din             : in std_logic_vector(63 downto 0);
33
            key             : in std_logic_vector(KEY_SIZE-1 downto 0);
34
            dout            : out std_logic_vector(63 downto 0);
35
            busy            : out std_logic);
36
    end component;
37
 
38
    constant key_size   : integer := 256;
39
 
40
    signal clk          : std_logic := '0';
41
    signal start        : std_logic;
42
    signal busy         : std_logic;
43
    signal din          : std_logic_vector(63 downto 0);
44
    signal key          : std_logic_vector(key_size-1 downto 0);
45
    signal dout         : std_logic_vector(63 downto 0);
46
begin
47
 
48
    rtea_i : rtea
49
        generic map(
50
            key_size    => key_size
51
        )
52
        port map(
53
            clk         => clk,
54
            start       => start,
55
            mode        => '0',
56
            din         => din,
57
            key         => key,
58
            dout        => dout
59
        );
60
 
61
    process begin
62
        clk <= '0';
63
        wait for 10.0 ns;
64
        clk <= '1';
65
        wait for 10.0 ns;
66
    end process;
67
 
68
    process is begin
69
        start <= '0';
70
        wait until rising_edge(clk);
71
        start <= '1';
72
        wait;
73
    end process;
74
 
75
    din <= x"11112222_12345678";
76
    key <=  (others => '0');
77
 
78
    process begin
79
        wait for 100 ns;
80
        assert false report "end of test" severity note;
81
        wait;
82
    end process;
83
 
84
end behav;

powered by: WebSVN 2.1.0

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