OpenCores
URL https://opencores.org/ocsvn/aes-encryption/aes-encryption/trunk

Subversion Repositories aes-encryption

[/] [aes-encryption/] [trunk/] [aes_10cycle_10stage/] [aes_rcon.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 tariq786
/////////////////////////////////////////////////////////////////////
2
////                                                             ////
3
////  AES RCON Block                                             ////
4
////                                                             ////
5
////                                                             ////
6
////  Author: Rudolf Usselmann                                   ////
7
////          rudi@asics.ws                                      ////
8
////                                                             ////
9
////                                                             ////
10
////                                                             ////
11
/////////////////////////////////////////////////////////////////////
12
////                                                             ////
13
//// Copyright (C) 2000-2002 Rudolf Usselmann                    ////
14
////                         www.asics.ws                        ////
15
////                         rudi@asics.ws                       ////
16
////                                                             ////
17
//// This source file may be used and distributed without        ////
18
//// restriction provided that this copyright statement is not   ////
19
//// removed from the file and that any derivative work contains ////
20
//// the original copyright notice and the associated disclaimer.////
21
////                                                             ////
22
////     THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY     ////
23
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   ////
24
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS   ////
25
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR      ////
26
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,         ////
27
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES    ////
28
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE   ////
29
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR        ////
30
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF  ////
31
//// LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT  ////
32
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  ////
33
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE         ////
34
//// POSSIBILITY OF SUCH DAMAGE.                                 ////
35
////                                                             ////
36
/////////////////////////////////////////////////////////////////////
37
 
38
 
39
`timescale 1 ns/1 ps
40
 
41
module aes_rcon(clk,out,out2,out3,out4,out5,out6,out7,out8,out9,out10);
42
 
43
input           clk;
44
 
45
output [7:0] out,out2,out3,out4,out5,out6,out7,out8,out9,out10;
46
 
47
 
48
 
49
assign          out  = frcon(0);
50
assign          out2 = frcon(1);
51
assign          out3 = frcon(2);
52
assign          out4 = frcon(3);
53
assign          out5 = frcon(4);
54
assign          out6 = frcon(5);
55
assign          out7 = frcon(6);
56
assign          out8 = frcon(7);
57
assign          out9 = frcon(8);
58
assign          out10 = frcon(9);
59
 
60
function [7:0]   frcon;
61
 
62
input   [3:0]    i;
63
 
64
case(i) // synopsys parallel_case
65
   4'h0: frcon=8'h01;           //1
66
   4'h1: frcon=8'h02;           //x
67
   4'h2: frcon=8'h04;           //x^2
68
   4'h3: frcon=8'h08;           //x^3
69
   4'h4: frcon=8'h10;           //x^4
70
   4'h5: frcon=8'h20;           //x^5
71
   4'h6: frcon=8'h40;           //x^6
72
   4'h7: frcon=8'h80;           //x^7
73
   4'h8: frcon=8'h1b;           //x^8
74
   4'h9: frcon=8'h36;           //x^9
75
   default: frcon=8'h00;
76
endcase
77
 
78
endfunction
79
 
80
 
81
 
82
endmodule

powered by: WebSVN 2.1.0

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