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

Subversion Repositories aes_decry_ip_128bit

[/] [aes_decry_ip_128bit/] [trunk/] [rtl/] [Inv_Sub_4bytes.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 ghegde
--************************************************************
2
--Copyright 2015, Ganesh Hegde < ghegde@opencores.org >      
3
--                                                           
4
--This source file may be used and distributed without  
5
--restriction provided that this copyright statement is not 
6
--removed from the file and that any derivative work contains
7
--the original copyright notice and the associated disclaimer.
8
--
9
--This source is distributed in the hope that it will be
10
--useful, but WITHOUT ANY WARRANTY; without even the implied
11
--warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
--PURPOSE.  See the GNU Lesser General Public License for more
13
--details.
14
--
15
--You should have received a copy of the GNU Lesser General
16
--Public License along with this source; if not, download it
17
--from http://www.opencores.org/lgpl.shtml
18
--
19
--*************************************************************
20
 
21
--*************************************************************
22
--This module will perform inverse byte substitution for the 
23
--given input word.
24
--
25
--Logic type : Combinational
26
--*************************************************************
27
 
28
library ieee;
29
use ieee.std_logic_1164.all;
30
 
31
entity Inv_Sub_4bytes is
32
port(
33
     word_in: in std_logic_vector(31 downto 0);
34
         word_out: out std_logic_vector(31 downto 0)
35
     );
36
end Inv_Sub_4bytes;
37
 
38
architecture Inv_Sub_4bytes_beh of Inv_Sub_4bytes is
39
   signal b0,b1,b2,b3: std_logic_vector(7 downto 0);
40
   component Inv_Sbox
41
   port (
42
        data_in: in std_logic_vector(7 downto 0);
43
        data_out:out std_logic_vector(7 downto 0)
44
   );
45
   end component;
46
begin
47
   b0<=word_in(31 downto 24);
48
   b1<=word_in(23 downto 16);
49
   b2<=word_in(15 downto 8);
50
   b3<=word_in(7 downto 0);
51
 
52
   Inst1:Inv_Sbox
53
      port map(data_in=>b0,data_out=>word_out(31 downto 24));
54
   Inst2:Inv_Sbox
55
      port map(data_in=>b1,data_out=>word_out(23 downto 16));
56
   Inst3:Inv_Sbox
57
      port map(data_in=>b2,data_out=>word_out(15 downto 8));
58
   Inst4:Inv_Sbox
59
      port map(data_in=>b3,data_out=>word_out(7 downto 0));
60
 
61
end Inv_Sub_4bytes_beh;

powered by: WebSVN 2.1.0

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