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

Subversion Repositories aes_core

[/] [aes_core/] [trunk/] [rtl/] [verilog/] [aes_inv_sbox.v] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 rudi
/////////////////////////////////////////////////////////////////////
2
////                                                             ////
3
////  AES Inverse SBOX (ROM)                                     ////
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
//  CVS Log
40
//
41
//  $Id: aes_inv_sbox.v,v 1.1.1.1 2002-11-09 11:22:55 rudi Exp $
42
//
43
//  $Date: 2002-11-09 11:22:55 $
44
//  $Revision: 1.1.1.1 $
45
//  $Author: rudi $
46
//  $Locker:  $
47
//  $State: Exp $
48
//
49
// Change History:
50
//               $Log: not supported by cvs2svn $
51
//
52
//
53
//
54
//
55
//
56
 
57
`include "timescale.v"
58
 
59
module aes_inv_sbox(a,d);
60
input   [7:0]    a;
61
output  [7:0]    d;
62
reg     [7:0]    d;
63
 
64
always @(a)
65
        case(a)         // synopsys full_case parallel_case
66
           8'h00: d=8'h52;
67
           8'h01: d=8'h09;
68
           8'h02: d=8'h6a;
69
           8'h03: d=8'hd5;
70
           8'h04: d=8'h30;
71
           8'h05: d=8'h36;
72
           8'h06: d=8'ha5;
73
           8'h07: d=8'h38;
74
           8'h08: d=8'hbf;
75
           8'h09: d=8'h40;
76
           8'h0a: d=8'ha3;
77
           8'h0b: d=8'h9e;
78
           8'h0c: d=8'h81;
79
           8'h0d: d=8'hf3;
80
           8'h0e: d=8'hd7;
81
           8'h0f: d=8'hfb;
82
           8'h10: d=8'h7c;
83
           8'h11: d=8'he3;
84
           8'h12: d=8'h39;
85
           8'h13: d=8'h82;
86
           8'h14: d=8'h9b;
87
           8'h15: d=8'h2f;
88
           8'h16: d=8'hff;
89
           8'h17: d=8'h87;
90
           8'h18: d=8'h34;
91
           8'h19: d=8'h8e;
92
           8'h1a: d=8'h43;
93
           8'h1b: d=8'h44;
94
           8'h1c: d=8'hc4;
95
           8'h1d: d=8'hde;
96
           8'h1e: d=8'he9;
97
           8'h1f: d=8'hcb;
98
           8'h20: d=8'h54;
99
           8'h21: d=8'h7b;
100
           8'h22: d=8'h94;
101
           8'h23: d=8'h32;
102
           8'h24: d=8'ha6;
103
           8'h25: d=8'hc2;
104
           8'h26: d=8'h23;
105
           8'h27: d=8'h3d;
106
           8'h28: d=8'hee;
107
           8'h29: d=8'h4c;
108
           8'h2a: d=8'h95;
109
           8'h2b: d=8'h0b;
110
           8'h2c: d=8'h42;
111
           8'h2d: d=8'hfa;
112
           8'h2e: d=8'hc3;
113
           8'h2f: d=8'h4e;
114
           8'h30: d=8'h08;
115
           8'h31: d=8'h2e;
116
           8'h32: d=8'ha1;
117
           8'h33: d=8'h66;
118
           8'h34: d=8'h28;
119
           8'h35: d=8'hd9;
120
           8'h36: d=8'h24;
121
           8'h37: d=8'hb2;
122
           8'h38: d=8'h76;
123
           8'h39: d=8'h5b;
124
           8'h3a: d=8'ha2;
125
           8'h3b: d=8'h49;
126
           8'h3c: d=8'h6d;
127
           8'h3d: d=8'h8b;
128
           8'h3e: d=8'hd1;
129
           8'h3f: d=8'h25;
130
           8'h40: d=8'h72;
131
           8'h41: d=8'hf8;
132
           8'h42: d=8'hf6;
133
           8'h43: d=8'h64;
134
           8'h44: d=8'h86;
135
           8'h45: d=8'h68;
136
           8'h46: d=8'h98;
137
           8'h47: d=8'h16;
138
           8'h48: d=8'hd4;
139
           8'h49: d=8'ha4;
140
           8'h4a: d=8'h5c;
141
           8'h4b: d=8'hcc;
142
           8'h4c: d=8'h5d;
143
           8'h4d: d=8'h65;
144
           8'h4e: d=8'hb6;
145
           8'h4f: d=8'h92;
146
           8'h50: d=8'h6c;
147
           8'h51: d=8'h70;
148
           8'h52: d=8'h48;
149
           8'h53: d=8'h50;
150
           8'h54: d=8'hfd;
151
           8'h55: d=8'hed;
152
           8'h56: d=8'hb9;
153
           8'h57: d=8'hda;
154
           8'h58: d=8'h5e;
155
           8'h59: d=8'h15;
156
           8'h5a: d=8'h46;
157
           8'h5b: d=8'h57;
158
           8'h5c: d=8'ha7;
159
           8'h5d: d=8'h8d;
160
           8'h5e: d=8'h9d;
161
           8'h5f: d=8'h84;
162
           8'h60: d=8'h90;
163
           8'h61: d=8'hd8;
164
           8'h62: d=8'hab;
165
           8'h63: d=8'h00;
166
           8'h64: d=8'h8c;
167
           8'h65: d=8'hbc;
168
           8'h66: d=8'hd3;
169
           8'h67: d=8'h0a;
170
           8'h68: d=8'hf7;
171
           8'h69: d=8'he4;
172
           8'h6a: d=8'h58;
173
           8'h6b: d=8'h05;
174
           8'h6c: d=8'hb8;
175
           8'h6d: d=8'hb3;
176
           8'h6e: d=8'h45;
177
           8'h6f: d=8'h06;
178
           8'h70: d=8'hd0;
179
           8'h71: d=8'h2c;
180
           8'h72: d=8'h1e;
181
           8'h73: d=8'h8f;
182
           8'h74: d=8'hca;
183
           8'h75: d=8'h3f;
184
           8'h76: d=8'h0f;
185
           8'h77: d=8'h02;
186
           8'h78: d=8'hc1;
187
           8'h79: d=8'haf;
188
           8'h7a: d=8'hbd;
189
           8'h7b: d=8'h03;
190
           8'h7c: d=8'h01;
191
           8'h7d: d=8'h13;
192
           8'h7e: d=8'h8a;
193
           8'h7f: d=8'h6b;
194
           8'h80: d=8'h3a;
195
           8'h81: d=8'h91;
196
           8'h82: d=8'h11;
197
           8'h83: d=8'h41;
198
           8'h84: d=8'h4f;
199
           8'h85: d=8'h67;
200
           8'h86: d=8'hdc;
201
           8'h87: d=8'hea;
202
           8'h88: d=8'h97;
203
           8'h89: d=8'hf2;
204
           8'h8a: d=8'hcf;
205
           8'h8b: d=8'hce;
206
           8'h8c: d=8'hf0;
207
           8'h8d: d=8'hb4;
208
           8'h8e: d=8'he6;
209
           8'h8f: d=8'h73;
210
           8'h90: d=8'h96;
211
           8'h91: d=8'hac;
212
           8'h92: d=8'h74;
213
           8'h93: d=8'h22;
214
           8'h94: d=8'he7;
215
           8'h95: d=8'had;
216
           8'h96: d=8'h35;
217
           8'h97: d=8'h85;
218
           8'h98: d=8'he2;
219
           8'h99: d=8'hf9;
220
           8'h9a: d=8'h37;
221
           8'h9b: d=8'he8;
222
           8'h9c: d=8'h1c;
223
           8'h9d: d=8'h75;
224
           8'h9e: d=8'hdf;
225
           8'h9f: d=8'h6e;
226
           8'ha0: d=8'h47;
227
           8'ha1: d=8'hf1;
228
           8'ha2: d=8'h1a;
229
           8'ha3: d=8'h71;
230
           8'ha4: d=8'h1d;
231
           8'ha5: d=8'h29;
232
           8'ha6: d=8'hc5;
233
           8'ha7: d=8'h89;
234
           8'ha8: d=8'h6f;
235
           8'ha9: d=8'hb7;
236
           8'haa: d=8'h62;
237
           8'hab: d=8'h0e;
238
           8'hac: d=8'haa;
239
           8'had: d=8'h18;
240
           8'hae: d=8'hbe;
241
           8'haf: d=8'h1b;
242
           8'hb0: d=8'hfc;
243
           8'hb1: d=8'h56;
244
           8'hb2: d=8'h3e;
245
           8'hb3: d=8'h4b;
246
           8'hb4: d=8'hc6;
247
           8'hb5: d=8'hd2;
248
           8'hb6: d=8'h79;
249
           8'hb7: d=8'h20;
250
           8'hb8: d=8'h9a;
251
           8'hb9: d=8'hdb;
252
           8'hba: d=8'hc0;
253
           8'hbb: d=8'hfe;
254
           8'hbc: d=8'h78;
255
           8'hbd: d=8'hcd;
256
           8'hbe: d=8'h5a;
257
           8'hbf: d=8'hf4;
258
           8'hc0: d=8'h1f;
259
           8'hc1: d=8'hdd;
260
           8'hc2: d=8'ha8;
261
           8'hc3: d=8'h33;
262
           8'hc4: d=8'h88;
263
           8'hc5: d=8'h07;
264
           8'hc6: d=8'hc7;
265
           8'hc7: d=8'h31;
266
           8'hc8: d=8'hb1;
267
           8'hc9: d=8'h12;
268
           8'hca: d=8'h10;
269
           8'hcb: d=8'h59;
270
           8'hcc: d=8'h27;
271
           8'hcd: d=8'h80;
272
           8'hce: d=8'hec;
273
           8'hcf: d=8'h5f;
274
           8'hd0: d=8'h60;
275
           8'hd1: d=8'h51;
276
           8'hd2: d=8'h7f;
277
           8'hd3: d=8'ha9;
278
           8'hd4: d=8'h19;
279
           8'hd5: d=8'hb5;
280
           8'hd6: d=8'h4a;
281
           8'hd7: d=8'h0d;
282
           8'hd8: d=8'h2d;
283
           8'hd9: d=8'he5;
284
           8'hda: d=8'h7a;
285
           8'hdb: d=8'h9f;
286
           8'hdc: d=8'h93;
287
           8'hdd: d=8'hc9;
288
           8'hde: d=8'h9c;
289
           8'hdf: d=8'hef;
290
           8'he0: d=8'ha0;
291
           8'he1: d=8'he0;
292
           8'he2: d=8'h3b;
293
           8'he3: d=8'h4d;
294
           8'he4: d=8'hae;
295
           8'he5: d=8'h2a;
296
           8'he6: d=8'hf5;
297
           8'he7: d=8'hb0;
298
           8'he8: d=8'hc8;
299
           8'he9: d=8'heb;
300
           8'hea: d=8'hbb;
301
           8'heb: d=8'h3c;
302
           8'hec: d=8'h83;
303
           8'hed: d=8'h53;
304
           8'hee: d=8'h99;
305
           8'hef: d=8'h61;
306
           8'hf0: d=8'h17;
307
           8'hf1: d=8'h2b;
308
           8'hf2: d=8'h04;
309
           8'hf3: d=8'h7e;
310
           8'hf4: d=8'hba;
311
           8'hf5: d=8'h77;
312
           8'hf6: d=8'hd6;
313
           8'hf7: d=8'h26;
314
           8'hf8: d=8'he1;
315
           8'hf9: d=8'h69;
316
           8'hfa: d=8'h14;
317
           8'hfb: d=8'h63;
318
           8'hfc: d=8'h55;
319
           8'hfd: d=8'h21;
320
           8'hfe: d=8'h0c;
321
           8'hff: d=8'h7d;
322
        endcase
323
endmodule
324
 
325
 

powered by: WebSVN 2.1.0

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