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

Subversion Repositories present_encryptor

[/] [present_encryptor/] [trunk/] [rtl/] [verilog/] [permutation.v] - Blame information for rev 21

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 21 rameli
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@//
2
// Design Name: Permutation Layer for Present Cipher              //
3
// Module Name: permutation                                       //
4
// Language:    Verilog                                           //
5
// Date Created: 1/16/2011                                        //
6
// Author: Reza Ameli                                             //
7
//         Digital Systems Lab                                    //
8
//         Ferdowsi University of Mashhad, Iran                   //
9
//         http://commeng.um.ac.ir/dslab                          //
10
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@//
11
//                                                                //
12
// This source file may be used and distributed without           //
13
// restriction provided that this copyright statement is not      //
14
// removed from the file and that any derivative work contains    //
15
// the original copyright notice and the associated disclaimer.   //
16
//                                                                //
17
// This source file is free software; you can redistribute it     //
18
// and/or modify it under the terms of the GNU Lesser General     //
19
// Public License as published by the Free Software Foundation;   //
20
// either version 2.1 of the License, or (at your option) any     //
21
// later version.                                                 //
22
//                                                                //
23
// This source is distributed in the hope that it will be         //
24
// useful, but WITHOUT ANY WARRANTY; without even the implied     //
25
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR        //
26
// PURPOSE. See the GNU Lesser General Public License for more    //
27
// details.                                                       //
28
//                                                                //
29
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@//
30
 
31
module permutation(data_o,data_i);
32
 
33
//- Module IOs ----------------------------------------------------------------
34
 
35
output wire[63:0] data_o;
36
input  wire[63:0] data_i;
37
 
38
//- Continuous Assigments------------------------------------------------------
39
 
40
assign data_o[0 ] = data_i[0 ];
41
assign data_o[16] = data_i[1 ];
42
assign data_o[32] = data_i[2 ];
43
assign data_o[48] = data_i[3 ];
44
assign data_o[1 ] = data_i[4 ];
45
assign data_o[17] = data_i[5 ];
46
assign data_o[33] = data_i[6 ];
47
assign data_o[49] = data_i[7 ];
48
assign data_o[2 ] = data_i[8 ];
49
assign data_o[18] = data_i[9 ];
50
assign data_o[34] = data_i[10];
51
assign data_o[50] = data_i[11];
52
assign data_o[3 ] = data_i[12];
53
assign data_o[19] = data_i[13];
54
assign data_o[35] = data_i[14];
55
assign data_o[51] = data_i[15];
56
 
57
assign data_o[4 ] = data_i[16];
58
assign data_o[20] = data_i[17];
59
assign data_o[36] = data_i[18];
60
assign data_o[52] = data_i[19];
61
assign data_o[5 ] = data_i[20];
62
assign data_o[21] = data_i[21];
63
assign data_o[37] = data_i[22];
64
assign data_o[53] = data_i[23];
65
assign data_o[6 ] = data_i[24];
66
assign data_o[22] = data_i[25];
67
assign data_o[38] = data_i[26];
68
assign data_o[54] = data_i[27];
69
assign data_o[7 ] = data_i[28];
70
assign data_o[23] = data_i[29];
71
assign data_o[39] = data_i[30];
72
assign data_o[55] = data_i[31];
73
 
74
assign data_o[8 ] = data_i[32];
75
assign data_o[24] = data_i[33];
76
assign data_o[40] = data_i[34];
77
assign data_o[56] = data_i[35];
78
assign data_o[9 ] = data_i[36];
79
assign data_o[25] = data_i[37];
80
assign data_o[41] = data_i[38];
81
assign data_o[57] = data_i[39];
82
assign data_o[10] = data_i[40];
83
assign data_o[26] = data_i[41];
84
assign data_o[42] = data_i[42];
85
assign data_o[58] = data_i[43];
86
assign data_o[11] = data_i[44];
87
assign data_o[27] = data_i[45];
88
assign data_o[43] = data_i[46];
89
assign data_o[59] = data_i[47];
90
 
91
assign data_o[12] = data_i[48];
92
assign data_o[28] = data_i[49];
93
assign data_o[44] = data_i[50];
94
assign data_o[60] = data_i[51];
95
assign data_o[13] = data_i[52];
96
assign data_o[29] = data_i[53];
97
assign data_o[45] = data_i[54];
98
assign data_o[61] = data_i[55];
99
assign data_o[14] = data_i[56];
100
assign data_o[30] = data_i[57];
101
assign data_o[46] = data_i[58];
102
assign data_o[62] = data_i[59];
103
assign data_o[15] = data_i[60];
104
assign data_o[31] = data_i[61];
105
assign data_o[47] = data_i[62];
106
assign data_o[63] = data_i[63];
107
 
108
//-----------------------------------------------------------------------------
109
endmodule

powered by: WebSVN 2.1.0

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