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

Subversion Repositories noekeoncore

[/] [noekeoncore/] [trunk/] [rtl/] [t_m_3.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 t_m_3 is
21
        port(clk : in std_logic;
22
                  a_0_in : in std_logic_vector(31 downto 0);
23
                  a_1_in : in std_logic_vector(31 downto 0);
24
                  a_2_in : in std_logic_vector(31 downto 0);
25
                  a_3_in : in std_logic_vector(31 downto 0);
26
                  a_0_out : out std_logic_vector(31 downto 0);
27
                  a_2_out : out std_logic_vector(31 downto 0));
28
end t_m_3;
29
 
30
architecture Behavioral of t_m_3 is
31
 
32
        signal tmp_0_s : std_logic_vector(31 downto 0);
33
        signal tmp_1_s : std_logic_vector(31 downto 0);
34
        signal tmp_2_s : std_logic_vector(31 downto 0);
35
        signal tmp_3_s : std_logic_vector(31 downto 0);
36
 
37
begin
38
 
39
        -- temp = a[1]^a[3]; 
40
        -- temp ^= temp>>>8 ^ temp<<<8;
41
 
42
        -- a[0] ^= temp;
43
        -- a[2] ^= temp;
44
 
45
        tmp_0_s <= a_1_in xor a_3_in;
46
        tmp_1_s <= tmp_0_s(23 downto 0) & tmp_0_s(31 downto 24);
47
        tmp_2_s <= tmp_0_s(7 downto 0) & tmp_0_s(31 downto 8);
48
        tmp_3_s <= tmp_0_s xor tmp_1_s xor tmp_2_s;
49
 
50
        a_0_out <= a_0_in xor tmp_3_s;
51
        a_2_out <= a_2_in xor tmp_3_s;
52
 
53
end Behavioral;
54
 
55
 

powered by: WebSVN 2.1.0

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