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

Subversion Repositories aes-encryption

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

powered by: WebSVN 2.1.0

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