OpenCores
URL https://opencores.org/ocsvn/camellia-vhdl/camellia-vhdl/trunk

Subversion Repositories camellia-vhdl

[/] [camellia-vhdl/] [trunk/] [pipelining/] [f_tb.vhd] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 pfulgoni
 
2
--------------------------------------------------------------------------------
3
-- Designer:      Paolo Fulgoni <pfulgoni@opencores.org>
4
--
5
-- Create Date:   09/14/2007
6
-- Last Update:   09/25/2007
7
-- Project Name:  camellia-vhdl
8
-- Description:   VHDL Test Bench for module F
9
--
10
-- Copyright (C) 2007  Paolo Fulgoni
11
-- This file is part of camellia-vhdl.
12
-- camellia-vhdl is free software; you can redistribute it and/or modify
13
-- it under the terms of the GNU General Public License as published by
14
-- the Free Software Foundation; either version 3 of the License, or
15
-- (at your option) any later version.
16
-- camellia-vhdl is distributed in the hope that it will be useful,
17
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
18
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
-- GNU General Public License for more details.
20
-- You should have received a copy of the GNU General Public License
21
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
--
23
-- The Camellia cipher algorithm is 128 bit cipher developed by NTT and
24
-- Mitsubishi Electric researchers.
25
-- http://info.isl.ntt.co.jp/crypt/eng/camellia/
26
--------------------------------------------------------------------------------
27
library IEEE;
28
use IEEE.std_logic_1164.all;
29
 
30
entity f_tb is
31
end f_tb;
32
 
33
ARCHITECTURE behavior of f_tb is
34
 
35
    -- Component Declaration for the Unit Under Test (UUT)
36
    component F
37
        port    (
38
                reset : in STD_LOGIC;
39
                clk   : in STD_LOGIC;
40
                x     : in STD_LOGIC_VECTOR (0 to 63);
41
                k     : in STD_LOGIC_VECTOR (0 to 63);
42
                z     : out STD_LOGIC_VECTOR (0 to 63)
43
                );
44
    end component;
45
 
46
    --Inputs
47
    signal reset : STD_LOGIC;
48
    signal clk   : STD_LOGIC;
49
    signal x     : STD_LOGIC_VECTOR(0 to 63)    := (others=>'0');
50
    signal k     : STD_LOGIC_VECTOR(0 to 63)    := (others=>'0');
51
 
52
    --Outputs
53
    signal z     : STD_LOGIC_VECTOR(0 to 63);
54
 
55
begin
56
 
57
    -- Instantiate the Unit Under Test (UUT)
58
    uut: F port map(
59
        reset => reset,
60
        clk   => clk,
61
        x     => x,
62
        k     => k,
63
        z     => z
64
    );
65
 
66
    tb    : process
67
    begin
68
        reset <= '1';
69
        wait for 10 ns;
70
        reset <= '0';
71
        x <= X"abcdef1234567890";
72
        k <= X"0987654321abcdef";
73
        wait for 30 ns;
74
        x <= X"0000000000000000";
75
        k <= X"0000000000000000";
76
        wait;
77
    end process;
78
 
79
    ck : process
80
    begin
81
        clk <= '0';
82
        wait for 15 ns;
83
        clk <= '1';
84
        wait for 15 ns;
85
    end process;
86
 
87
end;

powered by: WebSVN 2.1.0

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