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

Subversion Repositories noekeoncore

[/] [noekeoncore/] [trunk/] [rtl/] [output_trans.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 output_trans is
21
        port(clk     : in std_logic;
22
                  enc            : in std_logic; -- (enc, 0) / (dec, 1)
23
                  rc_in   : in std_logic_vector(31 downto 0);
24
                  a_0_in  : in std_logic_vector(31 downto 0);
25
                  a_1_in  : in std_logic_vector(31 downto 0);
26
                  a_2_in  : in std_logic_vector(31 downto 0);
27
                  a_3_in  : in std_logic_vector(31 downto 0);
28
                  k_0_in  : in std_logic_vector(31 downto 0);
29
                  k_1_in  : in std_logic_vector(31 downto 0);
30
                  k_2_in  : in std_logic_vector(31 downto 0);
31
                  k_3_in  : in std_logic_vector(31 downto 0);
32
                  a_0_out : out std_logic_vector(31 downto 0);
33
                  a_1_out : out std_logic_vector(31 downto 0);
34
                  a_2_out : out std_logic_vector(31 downto 0);
35
                  a_3_out : out std_logic_vector(31 downto 0));
36
end output_trans;
37
 
38
architecture Behavioral of output_trans is
39
 
40
        component theta is
41
        port(clk : in std_logic;
42
 
43
             a_0_in : in std_logic_vector(31 downto 0);
44
             a_1_in : in std_logic_vector(31 downto 0);
45
             a_2_in : in std_logic_vector(31 downto 0);
46
             a_3_in : in std_logic_vector(31 downto 0);
47
 
48
             k_0_in : in std_logic_vector(31 downto 0);
49
             k_1_in : in std_logic_vector(31 downto 0);
50
             k_2_in : in std_logic_vector(31 downto 0);
51
             k_3_in : in std_logic_vector(31 downto 0);
52
 
53
             a_0_out : out std_logic_vector(31 downto 0);
54
             a_1_out : out std_logic_vector(31 downto 0);
55
             a_2_out : out std_logic_vector(31 downto 0);
56
             a_3_out : out std_logic_vector(31 downto 0));
57
        end component;
58
 
59
        signal a_0_s : std_logic_vector(31 downto 0);
60
        signal a_0_in_s : std_logic_vector(31 downto 0);
61
        signal a_0_out_s : std_logic_vector(31 downto 0);
62
 
63
begin
64
 
65
        a_0_s <= a_0_in xor rc_in;
66
        a_0_in_s <= a_0_s when enc = '0' else a_0_in;
67
 
68
        THETA_0 : theta port map (clk,
69
                                                                          a_0_in_s,
70
                                                                          a_1_in,
71
                                                                     a_2_in,
72
                                                                          a_3_in,
73
                                                                          k_0_in,
74
                                                                          k_1_in,
75
                                                                          k_2_in,
76
                                                                          k_3_in,
77
                                                                          a_0_out_s,
78
                                                                          a_1_out,
79
                                                                     a_2_out,
80
                                                                          a_3_out);
81
 
82
        a_0_out <= (a_0_out_s xor rc_in) when enc = '1' else a_0_out_s;
83
 
84
end Behavioral;
85
 

powered by: WebSVN 2.1.0

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