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

Subversion Repositories reed_solomon_codec_generator

[/] [reed_solomon_codec_generator/] [trunk/] [example/] [rtl/] [RsDecodeChien.v] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 issei
//===================================================================
2
// Module Name : RsDecodeChien
3
// File Name   : RsDecodeChien.v
4
// Function    : Rs Decoder Chien search algorithm Module
5
// 
6
// Revision History:
7
// Date          By           Version    Change Description
8
//===================================================================
9
// 2009/02/03  Gael Sapience     1.0       Original
10
//
11
//===================================================================
12
// (C) COPYRIGHT 2009 SYSTEM LSI CO., Ltd.
13
//
14
 
15
 
16
module RsDecodeChien(
17
   CLK,            // system clock
18
   RESET,          // system reset
19
   enable,         // enable signal
20
   sync,           // sync signal
21
   erasureIn,      // erasure input
22
   lambdaIn_0,     // lambda polynom 0
23
   lambdaIn_1,     // lambda polynom 1
24
   lambdaIn_2,     // lambda polynom 2
25
   lambdaIn_3,     // lambda polynom 3
26
   lambdaIn_4,     // lambda polynom 4
27
   lambdaIn_5,     // lambda polynom 5
28
   lambdaIn_6,     // lambda polynom 6
29
   lambdaIn_7,     // lambda polynom 7
30
   lambdaIn_8,     // lambda polynom 8
31
   lambdaIn_9,     // lambda polynom 9
32
   lambdaIn_10,    // lambda polynom 10
33
   lambdaIn_11,    // lambda polynom 11
34
   lambdaIn_12,    // lambda polynom 12
35
   lambdaIn_13,    // lambda polynom 13
36
   lambdaIn_14,    // lambda polynom 14
37
   lambdaIn_15,    // lambda polynom 15
38
   lambdaIn_16,    // lambda polynom 16
39
   lambdaIn_17,    // lambda polynom 17
40
   lambdaIn_18,    // lambda polynom 18
41
   lambdaIn_19,    // lambda polynom 19
42
   lambdaIn_20,    // lambda polynom 20
43
   lambdaIn_21,    // lambda polynom 21
44
   omegaIn_0,      // omega polynom 0
45
   omegaIn_1,      // omega polynom 1
46
   omegaIn_2,      // omega polynom 2
47
   omegaIn_3,      // omega polynom 3
48
   omegaIn_4,      // omega polynom 4
49
   omegaIn_5,      // omega polynom 5
50
   omegaIn_6,      // omega polynom 6
51
   omegaIn_7,      // omega polynom 7
52
   omegaIn_8,      // omega polynom 8
53
   omegaIn_9,      // omega polynom 9
54
   omegaIn_10,     // omega polynom 10
55
   omegaIn_11,     // omega polynom 11
56
   omegaIn_12,     // omega polynom 12
57
   omegaIn_13,     // omega polynom 13
58
   omegaIn_14,     // omega polynom 14
59
   omegaIn_15,     // omega polynom 15
60
   omegaIn_16,     // omega polynom 16
61
   omegaIn_17,     // omega polynom 17
62
   omegaIn_18,     // omega polynom 18
63
   omegaIn_19,     // omega polynom 19
64
   omegaIn_20,     // omega polynom 20
65
   omegaIn_21,     // omega polynom 21
66
   epsilonIn_0,    // epsilon polynom 0
67
   epsilonIn_1,    // epsilon polynom 1
68
   epsilonIn_2,    // epsilon polynom 2
69
   epsilonIn_3,    // epsilon polynom 3
70
   epsilonIn_4,    // epsilon polynom 4
71
   epsilonIn_5,    // epsilon polynom 5
72
   epsilonIn_6,    // epsilon polynom 6
73
   epsilonIn_7,    // epsilon polynom 7
74
   epsilonIn_8,    // epsilon polynom 8
75
   epsilonIn_9,    // epsilon polynom 9
76
   epsilonIn_10,   // epsilon polynom 10
77
   epsilonIn_11,   // epsilon polynom 11
78
   epsilonIn_12,   // epsilon polynom 12
79
   epsilonIn_13,   // epsilon polynom 13
80
   epsilonIn_14,   // epsilon polynom 14
81
   epsilonIn_15,   // epsilon polynom 15
82
   epsilonIn_16,   // epsilon polynom 16
83
   epsilonIn_17,   // epsilon polynom 17
84
   epsilonIn_18,   // epsilon polynom 18
85
   epsilonIn_19,   // epsilon polynom 19
86
   epsilonIn_20,   // epsilon polynom 20
87
   epsilonIn_21,   // epsilon polynom 21
88
   epsilonIn_22,   // epsilon polynom 22
89
   errorOut,       // error output
90
   numError,       // error amount
91
   done            // done signal
92
);
93
 
94
 
95
   input          CLK;            // system clock
96
   input          RESET;          // system reset
97
   input          enable;         // enable signal
98
   input          sync;           // sync signal
99
   input          erasureIn;      // erasure input
100
   input  [7:0]   lambdaIn_0;     // lambda polynom 0
101
   input  [7:0]   lambdaIn_1;     // lambda polynom 1
102
   input  [7:0]   lambdaIn_2;     // lambda polynom 2
103
   input  [7:0]   lambdaIn_3;     // lambda polynom 3
104
   input  [7:0]   lambdaIn_4;     // lambda polynom 4
105
   input  [7:0]   lambdaIn_5;     // lambda polynom 5
106
   input  [7:0]   lambdaIn_6;     // lambda polynom 6
107
   input  [7:0]   lambdaIn_7;     // lambda polynom 7
108
   input  [7:0]   lambdaIn_8;     // lambda polynom 8
109
   input  [7:0]   lambdaIn_9;     // lambda polynom 9
110
   input  [7:0]   lambdaIn_10;    // lambda polynom 10
111
   input  [7:0]   lambdaIn_11;    // lambda polynom 11
112
   input  [7:0]   lambdaIn_12;    // lambda polynom 12
113
   input  [7:0]   lambdaIn_13;    // lambda polynom 13
114
   input  [7:0]   lambdaIn_14;    // lambda polynom 14
115
   input  [7:0]   lambdaIn_15;    // lambda polynom 15
116
   input  [7:0]   lambdaIn_16;    // lambda polynom 16
117
   input  [7:0]   lambdaIn_17;    // lambda polynom 17
118
   input  [7:0]   lambdaIn_18;    // lambda polynom 18
119
   input  [7:0]   lambdaIn_19;    // lambda polynom 19
120
   input  [7:0]   lambdaIn_20;    // lambda polynom 20
121
   input  [7:0]   lambdaIn_21;    // lambda polynom 21
122
   input  [7:0]   omegaIn_0;      // omega polynom 0
123
   input  [7:0]   omegaIn_1;      // omega polynom 1
124
   input  [7:0]   omegaIn_2;      // omega polynom 2
125
   input  [7:0]   omegaIn_3;      // omega polynom 3
126
   input  [7:0]   omegaIn_4;      // omega polynom 4
127
   input  [7:0]   omegaIn_5;      // omega polynom 5
128
   input  [7:0]   omegaIn_6;      // omega polynom 6
129
   input  [7:0]   omegaIn_7;      // omega polynom 7
130
   input  [7:0]   omegaIn_8;      // omega polynom 8
131
   input  [7:0]   omegaIn_9;      // omega polynom 9
132
   input  [7:0]   omegaIn_10;     // omega polynom 10
133
   input  [7:0]   omegaIn_11;     // omega polynom 11
134
   input  [7:0]   omegaIn_12;     // omega polynom 12
135
   input  [7:0]   omegaIn_13;     // omega polynom 13
136
   input  [7:0]   omegaIn_14;     // omega polynom 14
137
   input  [7:0]   omegaIn_15;     // omega polynom 15
138
   input  [7:0]   omegaIn_16;     // omega polynom 16
139
   input  [7:0]   omegaIn_17;     // omega polynom 17
140
   input  [7:0]   omegaIn_18;     // omega polynom 18
141
   input  [7:0]   omegaIn_19;     // omega polynom 19
142
   input  [7:0]   omegaIn_20;     // omega polynom 20
143
   input  [7:0]   omegaIn_21;     // omega polynom 21
144
 
145
   input  [7:0]   epsilonIn_0;    // epsilon polynom 0
146
   input  [7:0]   epsilonIn_1;    // epsilon polynom 1
147
   input  [7:0]   epsilonIn_2;    // epsilon polynom 2
148
   input  [7:0]   epsilonIn_3;    // epsilon polynom 3
149
   input  [7:0]   epsilonIn_4;    // epsilon polynom 4
150
   input  [7:0]   epsilonIn_5;    // epsilon polynom 5
151
   input  [7:0]   epsilonIn_6;    // epsilon polynom 6
152
   input  [7:0]   epsilonIn_7;    // epsilon polynom 7
153
   input  [7:0]   epsilonIn_8;    // epsilon polynom 8
154
   input  [7:0]   epsilonIn_9;    // epsilon polynom 9
155
   input  [7:0]   epsilonIn_10;   // epsilon polynom 10
156
   input  [7:0]   epsilonIn_11;   // epsilon polynom 11
157
   input  [7:0]   epsilonIn_12;   // epsilon polynom 12
158
   input  [7:0]   epsilonIn_13;   // epsilon polynom 13
159
   input  [7:0]   epsilonIn_14;   // epsilon polynom 14
160
   input  [7:0]   epsilonIn_15;   // epsilon polynom 15
161
   input  [7:0]   epsilonIn_16;   // epsilon polynom 16
162
   input  [7:0]   epsilonIn_17;   // epsilon polynom 17
163
   input  [7:0]   epsilonIn_18;   // epsilon polynom 18
164
   input  [7:0]   epsilonIn_19;   // epsilon polynom 19
165
   input  [7:0]   epsilonIn_20;   // epsilon polynom 20
166
   input  [7:0]   epsilonIn_21;   // epsilon polynom 21
167
   input  [7:0]   epsilonIn_22;   // epsilon polynom 22
168
   output [7:0]   errorOut;       // error output
169
   output [4:0]   numError;       // error amount
170
   output         done;           // done signal
171
 
172
 
173
 
174
   //------------------------------------------------------------------------
175
   // + 
176
   //- registers
177
   //------------------------------------------------------------------------
178
   reg  [7:0]   lambdaSum;
179
   reg  [7:0]   lambdaSumReg;
180
   reg  [7:0]   lambdaEven;
181
   reg  [7:0]   lambdaEvenReg;
182
   reg  [7:0]   lambdaEvenReg2;
183
   reg  [7:0]   lambdaEvenReg3;
184
   reg  [7:0]   lambdaOdd;
185
   reg  [7:0]   lambdaOddReg;
186
   reg  [7:0]   lambdaOddReg2;
187
   reg  [7:0]   lambdaOddReg3;
188
   wire [7:0]   denomE0;
189
   wire [7:0]   denomE1;
190
   reg  [7:0]   denomE0Reg;
191
   reg  [7:0]   denomE1Reg;
192
   wire [7:0]   denomE0Inv;
193
   wire [7:0]   denomE1Inv;
194
   reg  [7:0]   denomE0InvReg;
195
   reg  [7:0]   denomE1InvReg;
196
   reg  [7:0]   omegaSum;
197
   reg  [7:0]   omegaSumReg;
198
   reg  [7:0]   numeReg;
199
   reg  [7:0]   numeReg2;
200
   reg  [7:0]   epsilonSum;
201
   reg  [7:0]   epsilonSumReg;
202
   reg  [7:0]   epsilonOdd;
203
   reg  [7:0]   epsilonOddReg;
204
   wire [7:0]   errorValueE0;
205
   wire [7:0]   errorValueE1;
206
   reg  [7:0]   count;
207
   reg          doneOrg;
208
 
209
 
210
 
211
 
212
 
213
   //------------------------------------------------------------------
214
   // + count
215
   //------------------------------------------------------------------
216
   always @(posedge CLK or negedge RESET) begin
217
      if (~RESET) begin
218
         count [7:0] <= 8'd0;
219
      end
220
      else if (enable == 1'b1) begin
221
         if (sync == 1'b1) begin
222
            count[7:0] <= 8'd1;
223
         end
224
         else if ((count[7:0] ==8'd0) || (count[7:0] ==8'd255)) begin
225
            count[7:0] <= 8'd0;
226
         end
227
         else begin
228
            count[7:0] <= count[7:0] + 8'd1;
229
         end
230
      end
231
   end
232
 
233
 
234
 
235
   //------------------------------------------------------------------
236
   // + doneOrg
237
   //------------------------------------------------------------------
238
   always @(count) begin
239
      if (count[7:0] == 8'd255) begin
240
         doneOrg   = 1'b1;
241
      end else begin
242
         doneOrg   = 1'b0;
243
      end
244
   end
245
 
246
   assign   done   = doneOrg;
247
 
248
 
249
 
250
   //------------------------------------------------------------------------
251
   //- lambdaIni
252
   //------------------------------------------------------------------------
253
   wire [7:0]   lambdaIni_0;
254
   wire [7:0]   lambdaIni_1;
255
   wire [7:0]   lambdaIni_2;
256
   wire [7:0]   lambdaIni_3;
257
   wire [7:0]   lambdaIni_4;
258
   wire [7:0]   lambdaIni_5;
259
   wire [7:0]   lambdaIni_6;
260
   wire [7:0]   lambdaIni_7;
261
   wire [7:0]   lambdaIni_8;
262
   wire [7:0]   lambdaIni_9;
263
   wire [7:0]   lambdaIni_10;
264
   wire [7:0]   lambdaIni_11;
265
   wire [7:0]   lambdaIni_12;
266
   wire [7:0]   lambdaIni_13;
267
   wire [7:0]   lambdaIni_14;
268
   wire [7:0]   lambdaIni_15;
269
   wire [7:0]   lambdaIni_16;
270
   wire [7:0]   lambdaIni_17;
271
   wire [7:0]   lambdaIni_18;
272
   wire [7:0]   lambdaIni_19;
273
   wire [7:0]   lambdaIni_20;
274
   wire [7:0]   lambdaIni_21;
275
 
276
 
277
   assign lambdaIni_0 [0] = lambdaIn_0[0];
278
   assign lambdaIni_0 [1] = lambdaIn_0[1];
279
   assign lambdaIni_0 [2] = lambdaIn_0[2];
280
   assign lambdaIni_0 [3] = lambdaIn_0[3];
281
   assign lambdaIni_0 [4] = lambdaIn_0[4];
282
   assign lambdaIni_0 [5] = lambdaIn_0[5];
283
   assign lambdaIni_0 [6] = lambdaIn_0[6];
284
   assign lambdaIni_0 [7] = lambdaIn_0[7];
285
   assign lambdaIni_1 [0] = lambdaIn_1[7];
286
   assign lambdaIni_1 [1] = lambdaIn_1[0];
287
   assign lambdaIni_1 [2] = lambdaIn_1[1] ^ lambdaIn_1[7];
288
   assign lambdaIni_1 [3] = lambdaIn_1[2] ^ lambdaIn_1[7];
289
   assign lambdaIni_1 [4] = lambdaIn_1[3] ^ lambdaIn_1[7];
290
   assign lambdaIni_1 [5] = lambdaIn_1[4];
291
   assign lambdaIni_1 [6] = lambdaIn_1[5];
292
   assign lambdaIni_1 [7] = lambdaIn_1[6];
293
   assign lambdaIni_2 [0] = lambdaIn_2[6];
294
   assign lambdaIni_2 [1] = lambdaIn_2[7];
295
   assign lambdaIni_2 [2] = lambdaIn_2[0] ^ lambdaIn_2[6];
296
   assign lambdaIni_2 [3] = lambdaIn_2[1] ^ lambdaIn_2[6] ^ lambdaIn_2[7];
297
   assign lambdaIni_2 [4] = lambdaIn_2[2] ^ lambdaIn_2[6] ^ lambdaIn_2[7];
298
   assign lambdaIni_2 [5] = lambdaIn_2[3] ^ lambdaIn_2[7];
299
   assign lambdaIni_2 [6] = lambdaIn_2[4];
300
   assign lambdaIni_2 [7] = lambdaIn_2[5];
301
   assign lambdaIni_3 [0] = lambdaIn_3[5];
302
   assign lambdaIni_3 [1] = lambdaIn_3[6];
303
   assign lambdaIni_3 [2] = lambdaIn_3[5] ^ lambdaIn_3[7];
304
   assign lambdaIni_3 [3] = lambdaIn_3[0] ^ lambdaIn_3[5] ^ lambdaIn_3[6];
305
   assign lambdaIni_3 [4] = lambdaIn_3[1] ^ lambdaIn_3[5] ^ lambdaIn_3[6] ^ lambdaIn_3[7];
306
   assign lambdaIni_3 [5] = lambdaIn_3[2] ^ lambdaIn_3[6] ^ lambdaIn_3[7];
307
   assign lambdaIni_3 [6] = lambdaIn_3[3] ^ lambdaIn_3[7];
308
   assign lambdaIni_3 [7] = lambdaIn_3[4];
309
   assign lambdaIni_4 [0] = lambdaIn_4[4];
310
   assign lambdaIni_4 [1] = lambdaIn_4[5];
311
   assign lambdaIni_4 [2] = lambdaIn_4[4] ^ lambdaIn_4[6];
312
   assign lambdaIni_4 [3] = lambdaIn_4[4] ^ lambdaIn_4[5] ^ lambdaIn_4[7];
313
   assign lambdaIni_4 [4] = lambdaIn_4[0] ^ lambdaIn_4[4] ^ lambdaIn_4[5] ^ lambdaIn_4[6];
314
   assign lambdaIni_4 [5] = lambdaIn_4[1] ^ lambdaIn_4[5] ^ lambdaIn_4[6] ^ lambdaIn_4[7];
315
   assign lambdaIni_4 [6] = lambdaIn_4[2] ^ lambdaIn_4[6] ^ lambdaIn_4[7];
316
   assign lambdaIni_4 [7] = lambdaIn_4[3] ^ lambdaIn_4[7];
317
   assign lambdaIni_5 [0] = lambdaIn_5[3] ^ lambdaIn_5[7];
318
   assign lambdaIni_5 [1] = lambdaIn_5[4];
319
   assign lambdaIni_5 [2] = lambdaIn_5[3] ^ lambdaIn_5[5] ^ lambdaIn_5[7];
320
   assign lambdaIni_5 [3] = lambdaIn_5[3] ^ lambdaIn_5[4] ^ lambdaIn_5[6] ^ lambdaIn_5[7];
321
   assign lambdaIni_5 [4] = lambdaIn_5[3] ^ lambdaIn_5[4] ^ lambdaIn_5[5];
322
   assign lambdaIni_5 [5] = lambdaIn_5[0] ^ lambdaIn_5[4] ^ lambdaIn_5[5] ^ lambdaIn_5[6];
323
   assign lambdaIni_5 [6] = lambdaIn_5[1] ^ lambdaIn_5[5] ^ lambdaIn_5[6] ^ lambdaIn_5[7];
324
   assign lambdaIni_5 [7] = lambdaIn_5[2] ^ lambdaIn_5[6] ^ lambdaIn_5[7];
325
   assign lambdaIni_6 [0] = lambdaIn_6[2] ^ lambdaIn_6[6] ^ lambdaIn_6[7];
326
   assign lambdaIni_6 [1] = lambdaIn_6[3] ^ lambdaIn_6[7];
327
   assign lambdaIni_6 [2] = lambdaIn_6[2] ^ lambdaIn_6[4] ^ lambdaIn_6[6] ^ lambdaIn_6[7];
328
   assign lambdaIni_6 [3] = lambdaIn_6[2] ^ lambdaIn_6[3] ^ lambdaIn_6[5] ^ lambdaIn_6[6];
329
   assign lambdaIni_6 [4] = lambdaIn_6[2] ^ lambdaIn_6[3] ^ lambdaIn_6[4];
330
   assign lambdaIni_6 [5] = lambdaIn_6[3] ^ lambdaIn_6[4] ^ lambdaIn_6[5];
331
   assign lambdaIni_6 [6] = lambdaIn_6[0] ^ lambdaIn_6[4] ^ lambdaIn_6[5] ^ lambdaIn_6[6];
332
   assign lambdaIni_6 [7] = lambdaIn_6[1] ^ lambdaIn_6[5] ^ lambdaIn_6[6] ^ lambdaIn_6[7];
333
   assign lambdaIni_7 [0] = lambdaIn_7[1] ^ lambdaIn_7[5] ^ lambdaIn_7[6] ^ lambdaIn_7[7];
334
   assign lambdaIni_7 [1] = lambdaIn_7[2] ^ lambdaIn_7[6] ^ lambdaIn_7[7];
335
   assign lambdaIni_7 [2] = lambdaIn_7[1] ^ lambdaIn_7[3] ^ lambdaIn_7[5] ^ lambdaIn_7[6];
336
   assign lambdaIni_7 [3] = lambdaIn_7[1] ^ lambdaIn_7[2] ^ lambdaIn_7[4] ^ lambdaIn_7[5];
337
   assign lambdaIni_7 [4] = lambdaIn_7[1] ^ lambdaIn_7[2] ^ lambdaIn_7[3] ^ lambdaIn_7[7];
338
   assign lambdaIni_7 [5] = lambdaIn_7[2] ^ lambdaIn_7[3] ^ lambdaIn_7[4];
339
   assign lambdaIni_7 [6] = lambdaIn_7[3] ^ lambdaIn_7[4] ^ lambdaIn_7[5];
340
   assign lambdaIni_7 [7] = lambdaIn_7[0] ^ lambdaIn_7[4] ^ lambdaIn_7[5] ^ lambdaIn_7[6];
341
   assign lambdaIni_8 [0] = lambdaIn_8[0] ^ lambdaIn_8[4] ^ lambdaIn_8[5] ^ lambdaIn_8[6];
342
   assign lambdaIni_8 [1] = lambdaIn_8[1] ^ lambdaIn_8[5] ^ lambdaIn_8[6] ^ lambdaIn_8[7];
343
   assign lambdaIni_8 [2] = lambdaIn_8[0] ^ lambdaIn_8[2] ^ lambdaIn_8[4] ^ lambdaIn_8[5] ^ lambdaIn_8[7];
344
   assign lambdaIni_8 [3] = lambdaIn_8[0] ^ lambdaIn_8[1] ^ lambdaIn_8[3] ^ lambdaIn_8[4];
345
   assign lambdaIni_8 [4] = lambdaIn_8[0] ^ lambdaIn_8[1] ^ lambdaIn_8[2] ^ lambdaIn_8[6];
346
   assign lambdaIni_8 [5] = lambdaIn_8[1] ^ lambdaIn_8[2] ^ lambdaIn_8[3] ^ lambdaIn_8[7];
347
   assign lambdaIni_8 [6] = lambdaIn_8[2] ^ lambdaIn_8[3] ^ lambdaIn_8[4];
348
   assign lambdaIni_8 [7] = lambdaIn_8[3] ^ lambdaIn_8[4] ^ lambdaIn_8[5];
349
   assign lambdaIni_9 [0] = lambdaIn_9[3] ^ lambdaIn_9[4] ^ lambdaIn_9[5];
350
   assign lambdaIni_9 [1] = lambdaIn_9[0] ^ lambdaIn_9[4] ^ lambdaIn_9[5] ^ lambdaIn_9[6];
351
   assign lambdaIni_9 [2] = lambdaIn_9[1] ^ lambdaIn_9[3] ^ lambdaIn_9[4] ^ lambdaIn_9[6] ^ lambdaIn_9[7];
352
   assign lambdaIni_9 [3] = lambdaIn_9[0] ^ lambdaIn_9[2] ^ lambdaIn_9[3] ^ lambdaIn_9[7];
353
   assign lambdaIni_9 [4] = lambdaIn_9[0] ^ lambdaIn_9[1] ^ lambdaIn_9[5];
354
   assign lambdaIni_9 [5] = lambdaIn_9[0] ^ lambdaIn_9[1] ^ lambdaIn_9[2] ^ lambdaIn_9[6];
355
   assign lambdaIni_9 [6] = lambdaIn_9[1] ^ lambdaIn_9[2] ^ lambdaIn_9[3] ^ lambdaIn_9[7];
356
   assign lambdaIni_9 [7] = lambdaIn_9[2] ^ lambdaIn_9[3] ^ lambdaIn_9[4];
357
   assign lambdaIni_10 [0] = lambdaIn_10[2] ^ lambdaIn_10[3] ^ lambdaIn_10[4];
358
   assign lambdaIni_10 [1] = lambdaIn_10[3] ^ lambdaIn_10[4] ^ lambdaIn_10[5];
359
   assign lambdaIni_10 [2] = lambdaIn_10[0] ^ lambdaIn_10[2] ^ lambdaIn_10[3] ^ lambdaIn_10[5] ^ lambdaIn_10[6];
360
   assign lambdaIni_10 [3] = lambdaIn_10[1] ^ lambdaIn_10[2] ^ lambdaIn_10[6] ^ lambdaIn_10[7];
361
   assign lambdaIni_10 [4] = lambdaIn_10[0] ^ lambdaIn_10[4] ^ lambdaIn_10[7];
362
   assign lambdaIni_10 [5] = lambdaIn_10[0] ^ lambdaIn_10[1] ^ lambdaIn_10[5];
363
   assign lambdaIni_10 [6] = lambdaIn_10[0] ^ lambdaIn_10[1] ^ lambdaIn_10[2] ^ lambdaIn_10[6];
364
   assign lambdaIni_10 [7] = lambdaIn_10[1] ^ lambdaIn_10[2] ^ lambdaIn_10[3] ^ lambdaIn_10[7];
365
   assign lambdaIni_11 [0] = lambdaIn_11[1] ^ lambdaIn_11[2] ^ lambdaIn_11[3] ^ lambdaIn_11[7];
366
   assign lambdaIni_11 [1] = lambdaIn_11[2] ^ lambdaIn_11[3] ^ lambdaIn_11[4];
367
   assign lambdaIni_11 [2] = lambdaIn_11[1] ^ lambdaIn_11[2] ^ lambdaIn_11[4] ^ lambdaIn_11[5] ^ lambdaIn_11[7];
368
   assign lambdaIni_11 [3] = lambdaIn_11[0] ^ lambdaIn_11[1] ^ lambdaIn_11[5] ^ lambdaIn_11[6] ^ lambdaIn_11[7];
369
   assign lambdaIni_11 [4] = lambdaIn_11[3] ^ lambdaIn_11[6];
370
   assign lambdaIni_11 [5] = lambdaIn_11[0] ^ lambdaIn_11[4] ^ lambdaIn_11[7];
371
   assign lambdaIni_11 [6] = lambdaIn_11[0] ^ lambdaIn_11[1] ^ lambdaIn_11[5];
372
   assign lambdaIni_11 [7] = lambdaIn_11[0] ^ lambdaIn_11[1] ^ lambdaIn_11[2] ^ lambdaIn_11[6];
373
   assign lambdaIni_12 [0] = lambdaIn_12[0] ^ lambdaIn_12[1] ^ lambdaIn_12[2] ^ lambdaIn_12[6];
374
   assign lambdaIni_12 [1] = lambdaIn_12[1] ^ lambdaIn_12[2] ^ lambdaIn_12[3] ^ lambdaIn_12[7];
375
   assign lambdaIni_12 [2] = lambdaIn_12[0] ^ lambdaIn_12[1] ^ lambdaIn_12[3] ^ lambdaIn_12[4] ^ lambdaIn_12[6];
376
   assign lambdaIni_12 [3] = lambdaIn_12[0] ^ lambdaIn_12[4] ^ lambdaIn_12[5] ^ lambdaIn_12[6] ^ lambdaIn_12[7];
377
   assign lambdaIni_12 [4] = lambdaIn_12[2] ^ lambdaIn_12[5] ^ lambdaIn_12[7];
378
   assign lambdaIni_12 [5] = lambdaIn_12[3] ^ lambdaIn_12[6];
379
   assign lambdaIni_12 [6] = lambdaIn_12[0] ^ lambdaIn_12[4] ^ lambdaIn_12[7];
380
   assign lambdaIni_12 [7] = lambdaIn_12[0] ^ lambdaIn_12[1] ^ lambdaIn_12[5];
381
   assign lambdaIni_13 [0] = lambdaIn_13[0] ^ lambdaIn_13[1] ^ lambdaIn_13[5];
382
   assign lambdaIni_13 [1] = lambdaIn_13[0] ^ lambdaIn_13[1] ^ lambdaIn_13[2] ^ lambdaIn_13[6];
383
   assign lambdaIni_13 [2] = lambdaIn_13[0] ^ lambdaIn_13[2] ^ lambdaIn_13[3] ^ lambdaIn_13[5] ^ lambdaIn_13[7];
384
   assign lambdaIni_13 [3] = lambdaIn_13[3] ^ lambdaIn_13[4] ^ lambdaIn_13[5] ^ lambdaIn_13[6];
385
   assign lambdaIni_13 [4] = lambdaIn_13[1] ^ lambdaIn_13[4] ^ lambdaIn_13[6] ^ lambdaIn_13[7];
386
   assign lambdaIni_13 [5] = lambdaIn_13[2] ^ lambdaIn_13[5] ^ lambdaIn_13[7];
387
   assign lambdaIni_13 [6] = lambdaIn_13[3] ^ lambdaIn_13[6];
388
   assign lambdaIni_13 [7] = lambdaIn_13[0] ^ lambdaIn_13[4] ^ lambdaIn_13[7];
389
   assign lambdaIni_14 [0] = lambdaIn_14[0] ^ lambdaIn_14[4] ^ lambdaIn_14[7];
390
   assign lambdaIni_14 [1] = lambdaIn_14[0] ^ lambdaIn_14[1] ^ lambdaIn_14[5];
391
   assign lambdaIni_14 [2] = lambdaIn_14[1] ^ lambdaIn_14[2] ^ lambdaIn_14[4] ^ lambdaIn_14[6] ^ lambdaIn_14[7];
392
   assign lambdaIni_14 [3] = lambdaIn_14[2] ^ lambdaIn_14[3] ^ lambdaIn_14[4] ^ lambdaIn_14[5];
393
   assign lambdaIni_14 [4] = lambdaIn_14[0] ^ lambdaIn_14[3] ^ lambdaIn_14[5] ^ lambdaIn_14[6] ^ lambdaIn_14[7];
394
   assign lambdaIni_14 [5] = lambdaIn_14[1] ^ lambdaIn_14[4] ^ lambdaIn_14[6] ^ lambdaIn_14[7];
395
   assign lambdaIni_14 [6] = lambdaIn_14[2] ^ lambdaIn_14[5] ^ lambdaIn_14[7];
396
   assign lambdaIni_14 [7] = lambdaIn_14[3] ^ lambdaIn_14[6];
397
   assign lambdaIni_15 [0] = lambdaIn_15[3] ^ lambdaIn_15[6];
398
   assign lambdaIni_15 [1] = lambdaIn_15[0] ^ lambdaIn_15[4] ^ lambdaIn_15[7];
399
   assign lambdaIni_15 [2] = lambdaIn_15[0] ^ lambdaIn_15[1] ^ lambdaIn_15[3] ^ lambdaIn_15[5] ^ lambdaIn_15[6];
400
   assign lambdaIni_15 [3] = lambdaIn_15[1] ^ lambdaIn_15[2] ^ lambdaIn_15[3] ^ lambdaIn_15[4] ^ lambdaIn_15[7];
401
   assign lambdaIni_15 [4] = lambdaIn_15[2] ^ lambdaIn_15[4] ^ lambdaIn_15[5] ^ lambdaIn_15[6];
402
   assign lambdaIni_15 [5] = lambdaIn_15[0] ^ lambdaIn_15[3] ^ lambdaIn_15[5] ^ lambdaIn_15[6] ^ lambdaIn_15[7];
403
   assign lambdaIni_15 [6] = lambdaIn_15[1] ^ lambdaIn_15[4] ^ lambdaIn_15[6] ^ lambdaIn_15[7];
404
   assign lambdaIni_15 [7] = lambdaIn_15[2] ^ lambdaIn_15[5] ^ lambdaIn_15[7];
405
   assign lambdaIni_16 [0] = lambdaIn_16[2] ^ lambdaIn_16[5] ^ lambdaIn_16[7];
406
   assign lambdaIni_16 [1] = lambdaIn_16[3] ^ lambdaIn_16[6];
407
   assign lambdaIni_16 [2] = lambdaIn_16[0] ^ lambdaIn_16[2] ^ lambdaIn_16[4] ^ lambdaIn_16[5];
408
   assign lambdaIni_16 [3] = lambdaIn_16[0] ^ lambdaIn_16[1] ^ lambdaIn_16[2] ^ lambdaIn_16[3] ^ lambdaIn_16[6] ^ lambdaIn_16[7];
409
   assign lambdaIni_16 [4] = lambdaIn_16[1] ^ lambdaIn_16[3] ^ lambdaIn_16[4] ^ lambdaIn_16[5];
410
   assign lambdaIni_16 [5] = lambdaIn_16[2] ^ lambdaIn_16[4] ^ lambdaIn_16[5] ^ lambdaIn_16[6];
411
   assign lambdaIni_16 [6] = lambdaIn_16[0] ^ lambdaIn_16[3] ^ lambdaIn_16[5] ^ lambdaIn_16[6] ^ lambdaIn_16[7];
412
   assign lambdaIni_16 [7] = lambdaIn_16[1] ^ lambdaIn_16[4] ^ lambdaIn_16[6] ^ lambdaIn_16[7];
413
   assign lambdaIni_17 [0] = lambdaIn_17[1] ^ lambdaIn_17[4] ^ lambdaIn_17[6] ^ lambdaIn_17[7];
414
   assign lambdaIni_17 [1] = lambdaIn_17[2] ^ lambdaIn_17[5] ^ lambdaIn_17[7];
415
   assign lambdaIni_17 [2] = lambdaIn_17[1] ^ lambdaIn_17[3] ^ lambdaIn_17[4] ^ lambdaIn_17[7];
416
   assign lambdaIni_17 [3] = lambdaIn_17[0] ^ lambdaIn_17[1] ^ lambdaIn_17[2] ^ lambdaIn_17[5] ^ lambdaIn_17[6] ^ lambdaIn_17[7];
417
   assign lambdaIni_17 [4] = lambdaIn_17[0] ^ lambdaIn_17[2] ^ lambdaIn_17[3] ^ lambdaIn_17[4];
418
   assign lambdaIni_17 [5] = lambdaIn_17[1] ^ lambdaIn_17[3] ^ lambdaIn_17[4] ^ lambdaIn_17[5];
419
   assign lambdaIni_17 [6] = lambdaIn_17[2] ^ lambdaIn_17[4] ^ lambdaIn_17[5] ^ lambdaIn_17[6];
420
   assign lambdaIni_17 [7] = lambdaIn_17[0] ^ lambdaIn_17[3] ^ lambdaIn_17[5] ^ lambdaIn_17[6] ^ lambdaIn_17[7];
421
   assign lambdaIni_18 [0] = lambdaIn_18[0] ^ lambdaIn_18[3] ^ lambdaIn_18[5] ^ lambdaIn_18[6] ^ lambdaIn_18[7];
422
   assign lambdaIni_18 [1] = lambdaIn_18[1] ^ lambdaIn_18[4] ^ lambdaIn_18[6] ^ lambdaIn_18[7];
423
   assign lambdaIni_18 [2] = lambdaIn_18[0] ^ lambdaIn_18[2] ^ lambdaIn_18[3] ^ lambdaIn_18[6];
424
   assign lambdaIni_18 [3] = lambdaIn_18[0] ^ lambdaIn_18[1] ^ lambdaIn_18[4] ^ lambdaIn_18[5] ^ lambdaIn_18[6];
425
   assign lambdaIni_18 [4] = lambdaIn_18[1] ^ lambdaIn_18[2] ^ lambdaIn_18[3];
426
   assign lambdaIni_18 [5] = lambdaIn_18[0] ^ lambdaIn_18[2] ^ lambdaIn_18[3] ^ lambdaIn_18[4];
427
   assign lambdaIni_18 [6] = lambdaIn_18[1] ^ lambdaIn_18[3] ^ lambdaIn_18[4] ^ lambdaIn_18[5];
428
   assign lambdaIni_18 [7] = lambdaIn_18[2] ^ lambdaIn_18[4] ^ lambdaIn_18[5] ^ lambdaIn_18[6];
429
   assign lambdaIni_19 [0] = lambdaIn_19[2] ^ lambdaIn_19[4] ^ lambdaIn_19[5] ^ lambdaIn_19[6];
430
   assign lambdaIni_19 [1] = lambdaIn_19[0] ^ lambdaIn_19[3] ^ lambdaIn_19[5] ^ lambdaIn_19[6] ^ lambdaIn_19[7];
431
   assign lambdaIni_19 [2] = lambdaIn_19[1] ^ lambdaIn_19[2] ^ lambdaIn_19[5] ^ lambdaIn_19[7];
432
   assign lambdaIni_19 [3] = lambdaIn_19[0] ^ lambdaIn_19[3] ^ lambdaIn_19[4] ^ lambdaIn_19[5];
433
   assign lambdaIni_19 [4] = lambdaIn_19[0] ^ lambdaIn_19[1] ^ lambdaIn_19[2];
434
   assign lambdaIni_19 [5] = lambdaIn_19[1] ^ lambdaIn_19[2] ^ lambdaIn_19[3];
435
   assign lambdaIni_19 [6] = lambdaIn_19[0] ^ lambdaIn_19[2] ^ lambdaIn_19[3] ^ lambdaIn_19[4];
436
   assign lambdaIni_19 [7] = lambdaIn_19[1] ^ lambdaIn_19[3] ^ lambdaIn_19[4] ^ lambdaIn_19[5];
437
   assign lambdaIni_20 [0] = lambdaIn_20[1] ^ lambdaIn_20[3] ^ lambdaIn_20[4] ^ lambdaIn_20[5];
438
   assign lambdaIni_20 [1] = lambdaIn_20[2] ^ lambdaIn_20[4] ^ lambdaIn_20[5] ^ lambdaIn_20[6];
439
   assign lambdaIni_20 [2] = lambdaIn_20[0] ^ lambdaIn_20[1] ^ lambdaIn_20[4] ^ lambdaIn_20[6] ^ lambdaIn_20[7];
440
   assign lambdaIni_20 [3] = lambdaIn_20[2] ^ lambdaIn_20[3] ^ lambdaIn_20[4] ^ lambdaIn_20[7];
441
   assign lambdaIni_20 [4] = lambdaIn_20[0] ^ lambdaIn_20[1];
442
   assign lambdaIni_20 [5] = lambdaIn_20[0] ^ lambdaIn_20[1] ^ lambdaIn_20[2];
443
   assign lambdaIni_20 [6] = lambdaIn_20[1] ^ lambdaIn_20[2] ^ lambdaIn_20[3];
444
   assign lambdaIni_20 [7] = lambdaIn_20[0] ^ lambdaIn_20[2] ^ lambdaIn_20[3] ^ lambdaIn_20[4];
445
   assign lambdaIni_21 [0] = lambdaIn_21[0] ^ lambdaIn_21[2] ^ lambdaIn_21[3] ^ lambdaIn_21[4];
446
   assign lambdaIni_21 [1] = lambdaIn_21[1] ^ lambdaIn_21[3] ^ lambdaIn_21[4] ^ lambdaIn_21[5];
447
   assign lambdaIni_21 [2] = lambdaIn_21[0] ^ lambdaIn_21[3] ^ lambdaIn_21[5] ^ lambdaIn_21[6];
448
   assign lambdaIni_21 [3] = lambdaIn_21[1] ^ lambdaIn_21[2] ^ lambdaIn_21[3] ^ lambdaIn_21[6] ^ lambdaIn_21[7];
449
   assign lambdaIni_21 [4] = lambdaIn_21[0] ^ lambdaIn_21[7];
450
   assign lambdaIni_21 [5] = lambdaIn_21[0] ^ lambdaIn_21[1];
451
   assign lambdaIni_21 [6] = lambdaIn_21[0] ^ lambdaIn_21[1] ^ lambdaIn_21[2];
452
   assign lambdaIni_21 [7] = lambdaIn_21[1] ^ lambdaIn_21[2] ^ lambdaIn_21[3];
453
 
454
 
455
 
456
   //------------------------------------------------------------------------
457
   //- lambdaNew
458
   //------------------------------------------------------------------------
459
   reg  [7:0]   lambdaReg_0;
460
   reg  [7:0]   lambdaReg_1;
461
   reg  [7:0]   lambdaReg_2;
462
   reg  [7:0]   lambdaReg_3;
463
   reg  [7:0]   lambdaReg_4;
464
   reg  [7:0]   lambdaReg_5;
465
   reg  [7:0]   lambdaReg_6;
466
   reg  [7:0]   lambdaReg_7;
467
   reg  [7:0]   lambdaReg_8;
468
   reg  [7:0]   lambdaReg_9;
469
   reg  [7:0]   lambdaReg_10;
470
   reg  [7:0]   lambdaReg_11;
471
   reg  [7:0]   lambdaReg_12;
472
   reg  [7:0]   lambdaReg_13;
473
   reg  [7:0]   lambdaReg_14;
474
   reg  [7:0]   lambdaReg_15;
475
   reg  [7:0]   lambdaReg_16;
476
   reg  [7:0]   lambdaReg_17;
477
   reg  [7:0]   lambdaReg_18;
478
   reg  [7:0]   lambdaReg_19;
479
   reg  [7:0]   lambdaReg_20;
480
   reg  [7:0]   lambdaReg_21;
481
   wire [7:0]   lambdaUp_0;
482
   wire [7:0]   lambdaUp_1;
483
   wire [7:0]   lambdaUp_2;
484
   wire [7:0]   lambdaUp_3;
485
   wire [7:0]   lambdaUp_4;
486
   wire [7:0]   lambdaUp_5;
487
   wire [7:0]   lambdaUp_6;
488
   wire [7:0]   lambdaUp_7;
489
   wire [7:0]   lambdaUp_8;
490
   wire [7:0]   lambdaUp_9;
491
   wire [7:0]   lambdaUp_10;
492
   wire [7:0]   lambdaUp_11;
493
   wire [7:0]   lambdaUp_12;
494
   wire [7:0]   lambdaUp_13;
495
   wire [7:0]   lambdaUp_14;
496
   wire [7:0]   lambdaUp_15;
497
   wire [7:0]   lambdaUp_16;
498
   wire [7:0]   lambdaUp_17;
499
   wire [7:0]   lambdaUp_18;
500
   wire [7:0]   lambdaUp_19;
501
   wire [7:0]   lambdaUp_20;
502
   wire [7:0]   lambdaUp_21;
503
 
504
 
505
   assign lambdaUp_0 [0] = lambdaReg_0[0];
506
   assign lambdaUp_0 [1] = lambdaReg_0[1];
507
   assign lambdaUp_0 [2] = lambdaReg_0[2];
508
   assign lambdaUp_0 [3] = lambdaReg_0[3];
509
   assign lambdaUp_0 [4] = lambdaReg_0[4];
510
   assign lambdaUp_0 [5] = lambdaReg_0[5];
511
   assign lambdaUp_0 [6] = lambdaReg_0[6];
512
   assign lambdaUp_0 [7] = lambdaReg_0[7];
513
   assign lambdaUp_1 [0] = lambdaReg_1[7];
514
   assign lambdaUp_1 [1] = lambdaReg_1[0];
515
   assign lambdaUp_1 [2] = lambdaReg_1[1] ^ lambdaReg_1[7];
516
   assign lambdaUp_1 [3] = lambdaReg_1[2] ^ lambdaReg_1[7];
517
   assign lambdaUp_1 [4] = lambdaReg_1[3] ^ lambdaReg_1[7];
518
   assign lambdaUp_1 [5] = lambdaReg_1[4];
519
   assign lambdaUp_1 [6] = lambdaReg_1[5];
520
   assign lambdaUp_1 [7] = lambdaReg_1[6];
521
   assign lambdaUp_2 [0] = lambdaReg_2[6];
522
   assign lambdaUp_2 [1] = lambdaReg_2[7];
523
   assign lambdaUp_2 [2] = lambdaReg_2[0] ^ lambdaReg_2[6];
524
   assign lambdaUp_2 [3] = lambdaReg_2[1] ^ lambdaReg_2[6] ^ lambdaReg_2[7];
525
   assign lambdaUp_2 [4] = lambdaReg_2[2] ^ lambdaReg_2[6] ^ lambdaReg_2[7];
526
   assign lambdaUp_2 [5] = lambdaReg_2[3] ^ lambdaReg_2[7];
527
   assign lambdaUp_2 [6] = lambdaReg_2[4];
528
   assign lambdaUp_2 [7] = lambdaReg_2[5];
529
   assign lambdaUp_3 [0] = lambdaReg_3[5];
530
   assign lambdaUp_3 [1] = lambdaReg_3[6];
531
   assign lambdaUp_3 [2] = lambdaReg_3[5] ^ lambdaReg_3[7];
532
   assign lambdaUp_3 [3] = lambdaReg_3[0] ^ lambdaReg_3[5] ^ lambdaReg_3[6];
533
   assign lambdaUp_3 [4] = lambdaReg_3[1] ^ lambdaReg_3[5] ^ lambdaReg_3[6] ^ lambdaReg_3[7];
534
   assign lambdaUp_3 [5] = lambdaReg_3[2] ^ lambdaReg_3[6] ^ lambdaReg_3[7];
535
   assign lambdaUp_3 [6] = lambdaReg_3[3] ^ lambdaReg_3[7];
536
   assign lambdaUp_3 [7] = lambdaReg_3[4];
537
   assign lambdaUp_4 [0] = lambdaReg_4[4];
538
   assign lambdaUp_4 [1] = lambdaReg_4[5];
539
   assign lambdaUp_4 [2] = lambdaReg_4[4] ^ lambdaReg_4[6];
540
   assign lambdaUp_4 [3] = lambdaReg_4[4] ^ lambdaReg_4[5] ^ lambdaReg_4[7];
541
   assign lambdaUp_4 [4] = lambdaReg_4[0] ^ lambdaReg_4[4] ^ lambdaReg_4[5] ^ lambdaReg_4[6];
542
   assign lambdaUp_4 [5] = lambdaReg_4[1] ^ lambdaReg_4[5] ^ lambdaReg_4[6] ^ lambdaReg_4[7];
543
   assign lambdaUp_4 [6] = lambdaReg_4[2] ^ lambdaReg_4[6] ^ lambdaReg_4[7];
544
   assign lambdaUp_4 [7] = lambdaReg_4[3] ^ lambdaReg_4[7];
545
   assign lambdaUp_5 [0] = lambdaReg_5[3] ^ lambdaReg_5[7];
546
   assign lambdaUp_5 [1] = lambdaReg_5[4];
547
   assign lambdaUp_5 [2] = lambdaReg_5[3] ^ lambdaReg_5[5] ^ lambdaReg_5[7];
548
   assign lambdaUp_5 [3] = lambdaReg_5[3] ^ lambdaReg_5[4] ^ lambdaReg_5[6] ^ lambdaReg_5[7];
549
   assign lambdaUp_5 [4] = lambdaReg_5[3] ^ lambdaReg_5[4] ^ lambdaReg_5[5];
550
   assign lambdaUp_5 [5] = lambdaReg_5[0] ^ lambdaReg_5[4] ^ lambdaReg_5[5] ^ lambdaReg_5[6];
551
   assign lambdaUp_5 [6] = lambdaReg_5[1] ^ lambdaReg_5[5] ^ lambdaReg_5[6] ^ lambdaReg_5[7];
552
   assign lambdaUp_5 [7] = lambdaReg_5[2] ^ lambdaReg_5[6] ^ lambdaReg_5[7];
553
   assign lambdaUp_6 [0] = lambdaReg_6[2] ^ lambdaReg_6[6] ^ lambdaReg_6[7];
554
   assign lambdaUp_6 [1] = lambdaReg_6[3] ^ lambdaReg_6[7];
555
   assign lambdaUp_6 [2] = lambdaReg_6[2] ^ lambdaReg_6[4] ^ lambdaReg_6[6] ^ lambdaReg_6[7];
556
   assign lambdaUp_6 [3] = lambdaReg_6[2] ^ lambdaReg_6[3] ^ lambdaReg_6[5] ^ lambdaReg_6[6];
557
   assign lambdaUp_6 [4] = lambdaReg_6[2] ^ lambdaReg_6[3] ^ lambdaReg_6[4];
558
   assign lambdaUp_6 [5] = lambdaReg_6[3] ^ lambdaReg_6[4] ^ lambdaReg_6[5];
559
   assign lambdaUp_6 [6] = lambdaReg_6[0] ^ lambdaReg_6[4] ^ lambdaReg_6[5] ^ lambdaReg_6[6];
560
   assign lambdaUp_6 [7] = lambdaReg_6[1] ^ lambdaReg_6[5] ^ lambdaReg_6[6] ^ lambdaReg_6[7];
561
   assign lambdaUp_7 [0] = lambdaReg_7[1] ^ lambdaReg_7[5] ^ lambdaReg_7[6] ^ lambdaReg_7[7];
562
   assign lambdaUp_7 [1] = lambdaReg_7[2] ^ lambdaReg_7[6] ^ lambdaReg_7[7];
563
   assign lambdaUp_7 [2] = lambdaReg_7[1] ^ lambdaReg_7[3] ^ lambdaReg_7[5] ^ lambdaReg_7[6];
564
   assign lambdaUp_7 [3] = lambdaReg_7[1] ^ lambdaReg_7[2] ^ lambdaReg_7[4] ^ lambdaReg_7[5];
565
   assign lambdaUp_7 [4] = lambdaReg_7[1] ^ lambdaReg_7[2] ^ lambdaReg_7[3] ^ lambdaReg_7[7];
566
   assign lambdaUp_7 [5] = lambdaReg_7[2] ^ lambdaReg_7[3] ^ lambdaReg_7[4];
567
   assign lambdaUp_7 [6] = lambdaReg_7[3] ^ lambdaReg_7[4] ^ lambdaReg_7[5];
568
   assign lambdaUp_7 [7] = lambdaReg_7[0] ^ lambdaReg_7[4] ^ lambdaReg_7[5] ^ lambdaReg_7[6];
569
   assign lambdaUp_8 [0] = lambdaReg_8[0] ^ lambdaReg_8[4] ^ lambdaReg_8[5] ^ lambdaReg_8[6];
570
   assign lambdaUp_8 [1] = lambdaReg_8[1] ^ lambdaReg_8[5] ^ lambdaReg_8[6] ^ lambdaReg_8[7];
571
   assign lambdaUp_8 [2] = lambdaReg_8[0] ^ lambdaReg_8[2] ^ lambdaReg_8[4] ^ lambdaReg_8[5] ^ lambdaReg_8[7];
572
   assign lambdaUp_8 [3] = lambdaReg_8[0] ^ lambdaReg_8[1] ^ lambdaReg_8[3] ^ lambdaReg_8[4];
573
   assign lambdaUp_8 [4] = lambdaReg_8[0] ^ lambdaReg_8[1] ^ lambdaReg_8[2] ^ lambdaReg_8[6];
574
   assign lambdaUp_8 [5] = lambdaReg_8[1] ^ lambdaReg_8[2] ^ lambdaReg_8[3] ^ lambdaReg_8[7];
575
   assign lambdaUp_8 [6] = lambdaReg_8[2] ^ lambdaReg_8[3] ^ lambdaReg_8[4];
576
   assign lambdaUp_8 [7] = lambdaReg_8[3] ^ lambdaReg_8[4] ^ lambdaReg_8[5];
577
   assign lambdaUp_9 [0] = lambdaReg_9[3] ^ lambdaReg_9[4] ^ lambdaReg_9[5];
578
   assign lambdaUp_9 [1] = lambdaReg_9[0] ^ lambdaReg_9[4] ^ lambdaReg_9[5] ^ lambdaReg_9[6];
579
   assign lambdaUp_9 [2] = lambdaReg_9[1] ^ lambdaReg_9[3] ^ lambdaReg_9[4] ^ lambdaReg_9[6] ^ lambdaReg_9[7];
580
   assign lambdaUp_9 [3] = lambdaReg_9[0] ^ lambdaReg_9[2] ^ lambdaReg_9[3] ^ lambdaReg_9[7];
581
   assign lambdaUp_9 [4] = lambdaReg_9[0] ^ lambdaReg_9[1] ^ lambdaReg_9[5];
582
   assign lambdaUp_9 [5] = lambdaReg_9[0] ^ lambdaReg_9[1] ^ lambdaReg_9[2] ^ lambdaReg_9[6];
583
   assign lambdaUp_9 [6] = lambdaReg_9[1] ^ lambdaReg_9[2] ^ lambdaReg_9[3] ^ lambdaReg_9[7];
584
   assign lambdaUp_9 [7] = lambdaReg_9[2] ^ lambdaReg_9[3] ^ lambdaReg_9[4];
585
   assign lambdaUp_10 [0] = lambdaReg_10[2] ^ lambdaReg_10[3] ^ lambdaReg_10[4];
586
   assign lambdaUp_10 [1] = lambdaReg_10[3] ^ lambdaReg_10[4] ^ lambdaReg_10[5];
587
   assign lambdaUp_10 [2] = lambdaReg_10[0] ^ lambdaReg_10[2] ^ lambdaReg_10[3] ^ lambdaReg_10[5] ^ lambdaReg_10[6];
588
   assign lambdaUp_10 [3] = lambdaReg_10[1] ^ lambdaReg_10[2] ^ lambdaReg_10[6] ^ lambdaReg_10[7];
589
   assign lambdaUp_10 [4] = lambdaReg_10[0] ^ lambdaReg_10[4] ^ lambdaReg_10[7];
590
   assign lambdaUp_10 [5] = lambdaReg_10[0] ^ lambdaReg_10[1] ^ lambdaReg_10[5];
591
   assign lambdaUp_10 [6] = lambdaReg_10[0] ^ lambdaReg_10[1] ^ lambdaReg_10[2] ^ lambdaReg_10[6];
592
   assign lambdaUp_10 [7] = lambdaReg_10[1] ^ lambdaReg_10[2] ^ lambdaReg_10[3] ^ lambdaReg_10[7];
593
   assign lambdaUp_11 [0] = lambdaReg_11[1] ^ lambdaReg_11[2] ^ lambdaReg_11[3] ^ lambdaReg_11[7];
594
   assign lambdaUp_11 [1] = lambdaReg_11[2] ^ lambdaReg_11[3] ^ lambdaReg_11[4];
595
   assign lambdaUp_11 [2] = lambdaReg_11[1] ^ lambdaReg_11[2] ^ lambdaReg_11[4] ^ lambdaReg_11[5] ^ lambdaReg_11[7];
596
   assign lambdaUp_11 [3] = lambdaReg_11[0] ^ lambdaReg_11[1] ^ lambdaReg_11[5] ^ lambdaReg_11[6] ^ lambdaReg_11[7];
597
   assign lambdaUp_11 [4] = lambdaReg_11[3] ^ lambdaReg_11[6];
598
   assign lambdaUp_11 [5] = lambdaReg_11[0] ^ lambdaReg_11[4] ^ lambdaReg_11[7];
599
   assign lambdaUp_11 [6] = lambdaReg_11[0] ^ lambdaReg_11[1] ^ lambdaReg_11[5];
600
   assign lambdaUp_11 [7] = lambdaReg_11[0] ^ lambdaReg_11[1] ^ lambdaReg_11[2] ^ lambdaReg_11[6];
601
   assign lambdaUp_12 [0] = lambdaReg_12[0] ^ lambdaReg_12[1] ^ lambdaReg_12[2] ^ lambdaReg_12[6];
602
   assign lambdaUp_12 [1] = lambdaReg_12[1] ^ lambdaReg_12[2] ^ lambdaReg_12[3] ^ lambdaReg_12[7];
603
   assign lambdaUp_12 [2] = lambdaReg_12[0] ^ lambdaReg_12[1] ^ lambdaReg_12[3] ^ lambdaReg_12[4] ^ lambdaReg_12[6];
604
   assign lambdaUp_12 [3] = lambdaReg_12[0] ^ lambdaReg_12[4] ^ lambdaReg_12[5] ^ lambdaReg_12[6] ^ lambdaReg_12[7];
605
   assign lambdaUp_12 [4] = lambdaReg_12[2] ^ lambdaReg_12[5] ^ lambdaReg_12[7];
606
   assign lambdaUp_12 [5] = lambdaReg_12[3] ^ lambdaReg_12[6];
607
   assign lambdaUp_12 [6] = lambdaReg_12[0] ^ lambdaReg_12[4] ^ lambdaReg_12[7];
608
   assign lambdaUp_12 [7] = lambdaReg_12[0] ^ lambdaReg_12[1] ^ lambdaReg_12[5];
609
   assign lambdaUp_13 [0] = lambdaReg_13[0] ^ lambdaReg_13[1] ^ lambdaReg_13[5];
610
   assign lambdaUp_13 [1] = lambdaReg_13[0] ^ lambdaReg_13[1] ^ lambdaReg_13[2] ^ lambdaReg_13[6];
611
   assign lambdaUp_13 [2] = lambdaReg_13[0] ^ lambdaReg_13[2] ^ lambdaReg_13[3] ^ lambdaReg_13[5] ^ lambdaReg_13[7];
612
   assign lambdaUp_13 [3] = lambdaReg_13[3] ^ lambdaReg_13[4] ^ lambdaReg_13[5] ^ lambdaReg_13[6];
613
   assign lambdaUp_13 [4] = lambdaReg_13[1] ^ lambdaReg_13[4] ^ lambdaReg_13[6] ^ lambdaReg_13[7];
614
   assign lambdaUp_13 [5] = lambdaReg_13[2] ^ lambdaReg_13[5] ^ lambdaReg_13[7];
615
   assign lambdaUp_13 [6] = lambdaReg_13[3] ^ lambdaReg_13[6];
616
   assign lambdaUp_13 [7] = lambdaReg_13[0] ^ lambdaReg_13[4] ^ lambdaReg_13[7];
617
   assign lambdaUp_14 [0] = lambdaReg_14[0] ^ lambdaReg_14[4] ^ lambdaReg_14[7];
618
   assign lambdaUp_14 [1] = lambdaReg_14[0] ^ lambdaReg_14[1] ^ lambdaReg_14[5];
619
   assign lambdaUp_14 [2] = lambdaReg_14[1] ^ lambdaReg_14[2] ^ lambdaReg_14[4] ^ lambdaReg_14[6] ^ lambdaReg_14[7];
620
   assign lambdaUp_14 [3] = lambdaReg_14[2] ^ lambdaReg_14[3] ^ lambdaReg_14[4] ^ lambdaReg_14[5];
621
   assign lambdaUp_14 [4] = lambdaReg_14[0] ^ lambdaReg_14[3] ^ lambdaReg_14[5] ^ lambdaReg_14[6] ^ lambdaReg_14[7];
622
   assign lambdaUp_14 [5] = lambdaReg_14[1] ^ lambdaReg_14[4] ^ lambdaReg_14[6] ^ lambdaReg_14[7];
623
   assign lambdaUp_14 [6] = lambdaReg_14[2] ^ lambdaReg_14[5] ^ lambdaReg_14[7];
624
   assign lambdaUp_14 [7] = lambdaReg_14[3] ^ lambdaReg_14[6];
625
   assign lambdaUp_15 [0] = lambdaReg_15[3] ^ lambdaReg_15[6];
626
   assign lambdaUp_15 [1] = lambdaReg_15[0] ^ lambdaReg_15[4] ^ lambdaReg_15[7];
627
   assign lambdaUp_15 [2] = lambdaReg_15[0] ^ lambdaReg_15[1] ^ lambdaReg_15[3] ^ lambdaReg_15[5] ^ lambdaReg_15[6];
628
   assign lambdaUp_15 [3] = lambdaReg_15[1] ^ lambdaReg_15[2] ^ lambdaReg_15[3] ^ lambdaReg_15[4] ^ lambdaReg_15[7];
629
   assign lambdaUp_15 [4] = lambdaReg_15[2] ^ lambdaReg_15[4] ^ lambdaReg_15[5] ^ lambdaReg_15[6];
630
   assign lambdaUp_15 [5] = lambdaReg_15[0] ^ lambdaReg_15[3] ^ lambdaReg_15[5] ^ lambdaReg_15[6] ^ lambdaReg_15[7];
631
   assign lambdaUp_15 [6] = lambdaReg_15[1] ^ lambdaReg_15[4] ^ lambdaReg_15[6] ^ lambdaReg_15[7];
632
   assign lambdaUp_15 [7] = lambdaReg_15[2] ^ lambdaReg_15[5] ^ lambdaReg_15[7];
633
   assign lambdaUp_16 [0] = lambdaReg_16[2] ^ lambdaReg_16[5] ^ lambdaReg_16[7];
634
   assign lambdaUp_16 [1] = lambdaReg_16[3] ^ lambdaReg_16[6];
635
   assign lambdaUp_16 [2] = lambdaReg_16[0] ^ lambdaReg_16[2] ^ lambdaReg_16[4] ^ lambdaReg_16[5];
636
   assign lambdaUp_16 [3] = lambdaReg_16[0] ^ lambdaReg_16[1] ^ lambdaReg_16[2] ^ lambdaReg_16[3] ^ lambdaReg_16[6] ^ lambdaReg_16[7];
637
   assign lambdaUp_16 [4] = lambdaReg_16[1] ^ lambdaReg_16[3] ^ lambdaReg_16[4] ^ lambdaReg_16[5];
638
   assign lambdaUp_16 [5] = lambdaReg_16[2] ^ lambdaReg_16[4] ^ lambdaReg_16[5] ^ lambdaReg_16[6];
639
   assign lambdaUp_16 [6] = lambdaReg_16[0] ^ lambdaReg_16[3] ^ lambdaReg_16[5] ^ lambdaReg_16[6] ^ lambdaReg_16[7];
640
   assign lambdaUp_16 [7] = lambdaReg_16[1] ^ lambdaReg_16[4] ^ lambdaReg_16[6] ^ lambdaReg_16[7];
641
   assign lambdaUp_17 [0] = lambdaReg_17[1] ^ lambdaReg_17[4] ^ lambdaReg_17[6] ^ lambdaReg_17[7];
642
   assign lambdaUp_17 [1] = lambdaReg_17[2] ^ lambdaReg_17[5] ^ lambdaReg_17[7];
643
   assign lambdaUp_17 [2] = lambdaReg_17[1] ^ lambdaReg_17[3] ^ lambdaReg_17[4] ^ lambdaReg_17[7];
644
   assign lambdaUp_17 [3] = lambdaReg_17[0] ^ lambdaReg_17[1] ^ lambdaReg_17[2] ^ lambdaReg_17[5] ^ lambdaReg_17[6] ^ lambdaReg_17[7];
645
   assign lambdaUp_17 [4] = lambdaReg_17[0] ^ lambdaReg_17[2] ^ lambdaReg_17[3] ^ lambdaReg_17[4];
646
   assign lambdaUp_17 [5] = lambdaReg_17[1] ^ lambdaReg_17[3] ^ lambdaReg_17[4] ^ lambdaReg_17[5];
647
   assign lambdaUp_17 [6] = lambdaReg_17[2] ^ lambdaReg_17[4] ^ lambdaReg_17[5] ^ lambdaReg_17[6];
648
   assign lambdaUp_17 [7] = lambdaReg_17[0] ^ lambdaReg_17[3] ^ lambdaReg_17[5] ^ lambdaReg_17[6] ^ lambdaReg_17[7];
649
   assign lambdaUp_18 [0] = lambdaReg_18[0] ^ lambdaReg_18[3] ^ lambdaReg_18[5] ^ lambdaReg_18[6] ^ lambdaReg_18[7];
650
   assign lambdaUp_18 [1] = lambdaReg_18[1] ^ lambdaReg_18[4] ^ lambdaReg_18[6] ^ lambdaReg_18[7];
651
   assign lambdaUp_18 [2] = lambdaReg_18[0] ^ lambdaReg_18[2] ^ lambdaReg_18[3] ^ lambdaReg_18[6];
652
   assign lambdaUp_18 [3] = lambdaReg_18[0] ^ lambdaReg_18[1] ^ lambdaReg_18[4] ^ lambdaReg_18[5] ^ lambdaReg_18[6];
653
   assign lambdaUp_18 [4] = lambdaReg_18[1] ^ lambdaReg_18[2] ^ lambdaReg_18[3];
654
   assign lambdaUp_18 [5] = lambdaReg_18[0] ^ lambdaReg_18[2] ^ lambdaReg_18[3] ^ lambdaReg_18[4];
655
   assign lambdaUp_18 [6] = lambdaReg_18[1] ^ lambdaReg_18[3] ^ lambdaReg_18[4] ^ lambdaReg_18[5];
656
   assign lambdaUp_18 [7] = lambdaReg_18[2] ^ lambdaReg_18[4] ^ lambdaReg_18[5] ^ lambdaReg_18[6];
657
   assign lambdaUp_19 [0] = lambdaReg_19[2] ^ lambdaReg_19[4] ^ lambdaReg_19[5] ^ lambdaReg_19[6];
658
   assign lambdaUp_19 [1] = lambdaReg_19[0] ^ lambdaReg_19[3] ^ lambdaReg_19[5] ^ lambdaReg_19[6] ^ lambdaReg_19[7];
659
   assign lambdaUp_19 [2] = lambdaReg_19[1] ^ lambdaReg_19[2] ^ lambdaReg_19[5] ^ lambdaReg_19[7];
660
   assign lambdaUp_19 [3] = lambdaReg_19[0] ^ lambdaReg_19[3] ^ lambdaReg_19[4] ^ lambdaReg_19[5];
661
   assign lambdaUp_19 [4] = lambdaReg_19[0] ^ lambdaReg_19[1] ^ lambdaReg_19[2];
662
   assign lambdaUp_19 [5] = lambdaReg_19[1] ^ lambdaReg_19[2] ^ lambdaReg_19[3];
663
   assign lambdaUp_19 [6] = lambdaReg_19[0] ^ lambdaReg_19[2] ^ lambdaReg_19[3] ^ lambdaReg_19[4];
664
   assign lambdaUp_19 [7] = lambdaReg_19[1] ^ lambdaReg_19[3] ^ lambdaReg_19[4] ^ lambdaReg_19[5];
665
   assign lambdaUp_20 [0] = lambdaReg_20[1] ^ lambdaReg_20[3] ^ lambdaReg_20[4] ^ lambdaReg_20[5];
666
   assign lambdaUp_20 [1] = lambdaReg_20[2] ^ lambdaReg_20[4] ^ lambdaReg_20[5] ^ lambdaReg_20[6];
667
   assign lambdaUp_20 [2] = lambdaReg_20[0] ^ lambdaReg_20[1] ^ lambdaReg_20[4] ^ lambdaReg_20[6] ^ lambdaReg_20[7];
668
   assign lambdaUp_20 [3] = lambdaReg_20[2] ^ lambdaReg_20[3] ^ lambdaReg_20[4] ^ lambdaReg_20[7];
669
   assign lambdaUp_20 [4] = lambdaReg_20[0] ^ lambdaReg_20[1];
670
   assign lambdaUp_20 [5] = lambdaReg_20[0] ^ lambdaReg_20[1] ^ lambdaReg_20[2];
671
   assign lambdaUp_20 [6] = lambdaReg_20[1] ^ lambdaReg_20[2] ^ lambdaReg_20[3];
672
   assign lambdaUp_20 [7] = lambdaReg_20[0] ^ lambdaReg_20[2] ^ lambdaReg_20[3] ^ lambdaReg_20[4];
673
   assign lambdaUp_21 [0] = lambdaReg_21[0] ^ lambdaReg_21[2] ^ lambdaReg_21[3] ^ lambdaReg_21[4];
674
   assign lambdaUp_21 [1] = lambdaReg_21[1] ^ lambdaReg_21[3] ^ lambdaReg_21[4] ^ lambdaReg_21[5];
675
   assign lambdaUp_21 [2] = lambdaReg_21[0] ^ lambdaReg_21[3] ^ lambdaReg_21[5] ^ lambdaReg_21[6];
676
   assign lambdaUp_21 [3] = lambdaReg_21[1] ^ lambdaReg_21[2] ^ lambdaReg_21[3] ^ lambdaReg_21[6] ^ lambdaReg_21[7];
677
   assign lambdaUp_21 [4] = lambdaReg_21[0] ^ lambdaReg_21[7];
678
   assign lambdaUp_21 [5] = lambdaReg_21[0] ^ lambdaReg_21[1];
679
   assign lambdaUp_21 [6] = lambdaReg_21[0] ^ lambdaReg_21[1] ^ lambdaReg_21[2];
680
   assign lambdaUp_21 [7] = lambdaReg_21[1] ^ lambdaReg_21[2] ^ lambdaReg_21[3];
681
 
682
 
683
 
684
   //------------------------------------------------------------------------
685
   // + lambdaReg_0,...,lambdaReg_21
686
   //- registers
687
   //------------------------------------------------------------------------
688
   always @(posedge CLK or negedge RESET) begin
689
      if (~RESET) begin
690
         lambdaReg_0 [7:0]  <= 8'd0;
691
         lambdaReg_1 [7:0]  <= 8'd0;
692
         lambdaReg_2 [7:0]  <= 8'd0;
693
         lambdaReg_3 [7:0]  <= 8'd0;
694
         lambdaReg_4 [7:0]  <= 8'd0;
695
         lambdaReg_5 [7:0]  <= 8'd0;
696
         lambdaReg_6 [7:0]  <= 8'd0;
697
         lambdaReg_7 [7:0]  <= 8'd0;
698
         lambdaReg_8 [7:0]  <= 8'd0;
699
         lambdaReg_9 [7:0]  <= 8'd0;
700
         lambdaReg_10 [7:0] <=  8'd0;
701
         lambdaReg_11 [7:0] <=  8'd0;
702
         lambdaReg_12 [7:0] <=  8'd0;
703
         lambdaReg_13 [7:0] <=  8'd0;
704
         lambdaReg_14 [7:0] <=  8'd0;
705
         lambdaReg_15 [7:0] <=  8'd0;
706
         lambdaReg_16 [7:0] <=  8'd0;
707
         lambdaReg_17 [7:0] <=  8'd0;
708
         lambdaReg_18 [7:0] <=  8'd0;
709
         lambdaReg_19 [7:0] <=  8'd0;
710
         lambdaReg_20 [7:0] <=  8'd0;
711
         lambdaReg_21 [7:0] <=  8'd0;
712
      end
713
      else if (enable == 1'b1) begin
714
         if (sync == 1'b1) begin
715
            lambdaReg_0 [7:0]  <= lambdaIni_0 [7:0];
716
            lambdaReg_1 [7:0]  <= lambdaIni_1 [7:0];
717
            lambdaReg_2 [7:0]  <= lambdaIni_2 [7:0];
718
            lambdaReg_3 [7:0]  <= lambdaIni_3 [7:0];
719
            lambdaReg_4 [7:0]  <= lambdaIni_4 [7:0];
720
            lambdaReg_5 [7:0]  <= lambdaIni_5 [7:0];
721
            lambdaReg_6 [7:0]  <= lambdaIni_6 [7:0];
722
            lambdaReg_7 [7:0]  <= lambdaIni_7 [7:0];
723
            lambdaReg_8 [7:0]  <= lambdaIni_8 [7:0];
724
            lambdaReg_9 [7:0]  <= lambdaIni_9 [7:0];
725
            lambdaReg_10 [7:0] <= lambdaIni_10 [7:0];
726
            lambdaReg_11 [7:0] <= lambdaIni_11 [7:0];
727
            lambdaReg_12 [7:0] <= lambdaIni_12 [7:0];
728
            lambdaReg_13 [7:0] <= lambdaIni_13 [7:0];
729
            lambdaReg_14 [7:0] <= lambdaIni_14 [7:0];
730
            lambdaReg_15 [7:0] <= lambdaIni_15 [7:0];
731
            lambdaReg_16 [7:0] <= lambdaIni_16 [7:0];
732
            lambdaReg_17 [7:0] <= lambdaIni_17 [7:0];
733
            lambdaReg_18 [7:0] <= lambdaIni_18 [7:0];
734
            lambdaReg_19 [7:0] <= lambdaIni_19 [7:0];
735
            lambdaReg_20 [7:0] <= lambdaIni_20 [7:0];
736
            lambdaReg_21 [7:0] <= lambdaIni_21 [7:0];
737
        end
738
        else begin
739
           lambdaReg_0 [7:0]  <= lambdaUp_0 [7:0];
740
           lambdaReg_1 [7:0]  <= lambdaUp_1 [7:0];
741
           lambdaReg_2 [7:0]  <= lambdaUp_2 [7:0];
742
           lambdaReg_3 [7:0]  <= lambdaUp_3 [7:0];
743
           lambdaReg_4 [7:0]  <= lambdaUp_4 [7:0];
744
           lambdaReg_5 [7:0]  <= lambdaUp_5 [7:0];
745
           lambdaReg_6 [7:0]  <= lambdaUp_6 [7:0];
746
           lambdaReg_7 [7:0]  <= lambdaUp_7 [7:0];
747
           lambdaReg_8 [7:0]  <= lambdaUp_8 [7:0];
748
           lambdaReg_9 [7:0]  <= lambdaUp_9 [7:0];
749
           lambdaReg_10 [7:0] <= lambdaUp_10 [7:0];
750
           lambdaReg_11 [7:0] <= lambdaUp_11 [7:0];
751
           lambdaReg_12 [7:0] <= lambdaUp_12 [7:0];
752
           lambdaReg_13 [7:0] <= lambdaUp_13 [7:0];
753
           lambdaReg_14 [7:0] <= lambdaUp_14 [7:0];
754
           lambdaReg_15 [7:0] <= lambdaUp_15 [7:0];
755
           lambdaReg_16 [7:0] <= lambdaUp_16 [7:0];
756
           lambdaReg_17 [7:0] <= lambdaUp_17 [7:0];
757
           lambdaReg_18 [7:0] <= lambdaUp_18 [7:0];
758
           lambdaReg_19 [7:0] <= lambdaUp_19 [7:0];
759
           lambdaReg_20 [7:0] <= lambdaUp_20 [7:0];
760
           lambdaReg_21 [7:0] <= lambdaUp_21 [7:0];
761
         end
762
      end
763
   end
764
 
765
 
766
 
767
   //------------------------------------------------------------------------
768
   //- omegaIni
769
   //------------------------------------------------------------------------
770
   wire [7:0]  omegaIni_0;
771
   wire [7:0]  omegaIni_1;
772
   wire [7:0]  omegaIni_2;
773
   wire [7:0]  omegaIni_3;
774
   wire [7:0]  omegaIni_4;
775
   wire [7:0]  omegaIni_5;
776
   wire [7:0]  omegaIni_6;
777
   wire [7:0]  omegaIni_7;
778
   wire [7:0]  omegaIni_8;
779
   wire [7:0]  omegaIni_9;
780
   wire [7:0]  omegaIni_10;
781
   wire [7:0]  omegaIni_11;
782
   wire [7:0]  omegaIni_12;
783
   wire [7:0]  omegaIni_13;
784
   wire [7:0]  omegaIni_14;
785
   wire [7:0]  omegaIni_15;
786
   wire [7:0]  omegaIni_16;
787
   wire [7:0]  omegaIni_17;
788
   wire [7:0]  omegaIni_18;
789
   wire [7:0]  omegaIni_19;
790
   wire [7:0]  omegaIni_20;
791
   wire [7:0]  omegaIni_21;
792
 
793
 
794
   assign omegaIni_0 [0] = omegaIn_0[0];
795
   assign omegaIni_0 [1] = omegaIn_0[1];
796
   assign omegaIni_0 [2] = omegaIn_0[2];
797
   assign omegaIni_0 [3] = omegaIn_0[3];
798
   assign omegaIni_0 [4] = omegaIn_0[4];
799
   assign omegaIni_0 [5] = omegaIn_0[5];
800
   assign omegaIni_0 [6] = omegaIn_0[6];
801
   assign omegaIni_0 [7] = omegaIn_0[7];
802
   assign omegaIni_1 [0] = omegaIn_1[7];
803
   assign omegaIni_1 [1] = omegaIn_1[0];
804
   assign omegaIni_1 [2] = omegaIn_1[1] ^ omegaIn_1[7];
805
   assign omegaIni_1 [3] = omegaIn_1[2] ^ omegaIn_1[7];
806
   assign omegaIni_1 [4] = omegaIn_1[3] ^ omegaIn_1[7];
807
   assign omegaIni_1 [5] = omegaIn_1[4];
808
   assign omegaIni_1 [6] = omegaIn_1[5];
809
   assign omegaIni_1 [7] = omegaIn_1[6];
810
   assign omegaIni_2 [0] = omegaIn_2[6];
811
   assign omegaIni_2 [1] = omegaIn_2[7];
812
   assign omegaIni_2 [2] = omegaIn_2[0] ^ omegaIn_2[6];
813
   assign omegaIni_2 [3] = omegaIn_2[1] ^ omegaIn_2[6] ^ omegaIn_2[7];
814
   assign omegaIni_2 [4] = omegaIn_2[2] ^ omegaIn_2[6] ^ omegaIn_2[7];
815
   assign omegaIni_2 [5] = omegaIn_2[3] ^ omegaIn_2[7];
816
   assign omegaIni_2 [6] = omegaIn_2[4];
817
   assign omegaIni_2 [7] = omegaIn_2[5];
818
   assign omegaIni_3 [0] = omegaIn_3[5];
819
   assign omegaIni_3 [1] = omegaIn_3[6];
820
   assign omegaIni_3 [2] = omegaIn_3[5] ^ omegaIn_3[7];
821
   assign omegaIni_3 [3] = omegaIn_3[0] ^ omegaIn_3[5] ^ omegaIn_3[6];
822
   assign omegaIni_3 [4] = omegaIn_3[1] ^ omegaIn_3[5] ^ omegaIn_3[6] ^ omegaIn_3[7];
823
   assign omegaIni_3 [5] = omegaIn_3[2] ^ omegaIn_3[6] ^ omegaIn_3[7];
824
   assign omegaIni_3 [6] = omegaIn_3[3] ^ omegaIn_3[7];
825
   assign omegaIni_3 [7] = omegaIn_3[4];
826
   assign omegaIni_4 [0] = omegaIn_4[4];
827
   assign omegaIni_4 [1] = omegaIn_4[5];
828
   assign omegaIni_4 [2] = omegaIn_4[4] ^ omegaIn_4[6];
829
   assign omegaIni_4 [3] = omegaIn_4[4] ^ omegaIn_4[5] ^ omegaIn_4[7];
830
   assign omegaIni_4 [4] = omegaIn_4[0] ^ omegaIn_4[4] ^ omegaIn_4[5] ^ omegaIn_4[6];
831
   assign omegaIni_4 [5] = omegaIn_4[1] ^ omegaIn_4[5] ^ omegaIn_4[6] ^ omegaIn_4[7];
832
   assign omegaIni_4 [6] = omegaIn_4[2] ^ omegaIn_4[6] ^ omegaIn_4[7];
833
   assign omegaIni_4 [7] = omegaIn_4[3] ^ omegaIn_4[7];
834
   assign omegaIni_5 [0] = omegaIn_5[3] ^ omegaIn_5[7];
835
   assign omegaIni_5 [1] = omegaIn_5[4];
836
   assign omegaIni_5 [2] = omegaIn_5[3] ^ omegaIn_5[5] ^ omegaIn_5[7];
837
   assign omegaIni_5 [3] = omegaIn_5[3] ^ omegaIn_5[4] ^ omegaIn_5[6] ^ omegaIn_5[7];
838
   assign omegaIni_5 [4] = omegaIn_5[3] ^ omegaIn_5[4] ^ omegaIn_5[5];
839
   assign omegaIni_5 [5] = omegaIn_5[0] ^ omegaIn_5[4] ^ omegaIn_5[5] ^ omegaIn_5[6];
840
   assign omegaIni_5 [6] = omegaIn_5[1] ^ omegaIn_5[5] ^ omegaIn_5[6] ^ omegaIn_5[7];
841
   assign omegaIni_5 [7] = omegaIn_5[2] ^ omegaIn_5[6] ^ omegaIn_5[7];
842
   assign omegaIni_6 [0] = omegaIn_6[2] ^ omegaIn_6[6] ^ omegaIn_6[7];
843
   assign omegaIni_6 [1] = omegaIn_6[3] ^ omegaIn_6[7];
844
   assign omegaIni_6 [2] = omegaIn_6[2] ^ omegaIn_6[4] ^ omegaIn_6[6] ^ omegaIn_6[7];
845
   assign omegaIni_6 [3] = omegaIn_6[2] ^ omegaIn_6[3] ^ omegaIn_6[5] ^ omegaIn_6[6];
846
   assign omegaIni_6 [4] = omegaIn_6[2] ^ omegaIn_6[3] ^ omegaIn_6[4];
847
   assign omegaIni_6 [5] = omegaIn_6[3] ^ omegaIn_6[4] ^ omegaIn_6[5];
848
   assign omegaIni_6 [6] = omegaIn_6[0] ^ omegaIn_6[4] ^ omegaIn_6[5] ^ omegaIn_6[6];
849
   assign omegaIni_6 [7] = omegaIn_6[1] ^ omegaIn_6[5] ^ omegaIn_6[6] ^ omegaIn_6[7];
850
   assign omegaIni_7 [0] = omegaIn_7[1] ^ omegaIn_7[5] ^ omegaIn_7[6] ^ omegaIn_7[7];
851
   assign omegaIni_7 [1] = omegaIn_7[2] ^ omegaIn_7[6] ^ omegaIn_7[7];
852
   assign omegaIni_7 [2] = omegaIn_7[1] ^ omegaIn_7[3] ^ omegaIn_7[5] ^ omegaIn_7[6];
853
   assign omegaIni_7 [3] = omegaIn_7[1] ^ omegaIn_7[2] ^ omegaIn_7[4] ^ omegaIn_7[5];
854
   assign omegaIni_7 [4] = omegaIn_7[1] ^ omegaIn_7[2] ^ omegaIn_7[3] ^ omegaIn_7[7];
855
   assign omegaIni_7 [5] = omegaIn_7[2] ^ omegaIn_7[3] ^ omegaIn_7[4];
856
   assign omegaIni_7 [6] = omegaIn_7[3] ^ omegaIn_7[4] ^ omegaIn_7[5];
857
   assign omegaIni_7 [7] = omegaIn_7[0] ^ omegaIn_7[4] ^ omegaIn_7[5] ^ omegaIn_7[6];
858
   assign omegaIni_8 [0] = omegaIn_8[0] ^ omegaIn_8[4] ^ omegaIn_8[5] ^ omegaIn_8[6];
859
   assign omegaIni_8 [1] = omegaIn_8[1] ^ omegaIn_8[5] ^ omegaIn_8[6] ^ omegaIn_8[7];
860
   assign omegaIni_8 [2] = omegaIn_8[0] ^ omegaIn_8[2] ^ omegaIn_8[4] ^ omegaIn_8[5] ^ omegaIn_8[7];
861
   assign omegaIni_8 [3] = omegaIn_8[0] ^ omegaIn_8[1] ^ omegaIn_8[3] ^ omegaIn_8[4];
862
   assign omegaIni_8 [4] = omegaIn_8[0] ^ omegaIn_8[1] ^ omegaIn_8[2] ^ omegaIn_8[6];
863
   assign omegaIni_8 [5] = omegaIn_8[1] ^ omegaIn_8[2] ^ omegaIn_8[3] ^ omegaIn_8[7];
864
   assign omegaIni_8 [6] = omegaIn_8[2] ^ omegaIn_8[3] ^ omegaIn_8[4];
865
   assign omegaIni_8 [7] = omegaIn_8[3] ^ omegaIn_8[4] ^ omegaIn_8[5];
866
   assign omegaIni_9 [0] = omegaIn_9[3] ^ omegaIn_9[4] ^ omegaIn_9[5];
867
   assign omegaIni_9 [1] = omegaIn_9[0] ^ omegaIn_9[4] ^ omegaIn_9[5] ^ omegaIn_9[6];
868
   assign omegaIni_9 [2] = omegaIn_9[1] ^ omegaIn_9[3] ^ omegaIn_9[4] ^ omegaIn_9[6] ^ omegaIn_9[7];
869
   assign omegaIni_9 [3] = omegaIn_9[0] ^ omegaIn_9[2] ^ omegaIn_9[3] ^ omegaIn_9[7];
870
   assign omegaIni_9 [4] = omegaIn_9[0] ^ omegaIn_9[1] ^ omegaIn_9[5];
871
   assign omegaIni_9 [5] = omegaIn_9[0] ^ omegaIn_9[1] ^ omegaIn_9[2] ^ omegaIn_9[6];
872
   assign omegaIni_9 [6] = omegaIn_9[1] ^ omegaIn_9[2] ^ omegaIn_9[3] ^ omegaIn_9[7];
873
   assign omegaIni_9 [7] = omegaIn_9[2] ^ omegaIn_9[3] ^ omegaIn_9[4];
874
   assign omegaIni_10 [0] = omegaIn_10[2] ^ omegaIn_10[3] ^ omegaIn_10[4];
875
   assign omegaIni_10 [1] = omegaIn_10[3] ^ omegaIn_10[4] ^ omegaIn_10[5];
876
   assign omegaIni_10 [2] = omegaIn_10[0] ^ omegaIn_10[2] ^ omegaIn_10[3] ^ omegaIn_10[5] ^ omegaIn_10[6];
877
   assign omegaIni_10 [3] = omegaIn_10[1] ^ omegaIn_10[2] ^ omegaIn_10[6] ^ omegaIn_10[7];
878
   assign omegaIni_10 [4] = omegaIn_10[0] ^ omegaIn_10[4] ^ omegaIn_10[7];
879
   assign omegaIni_10 [5] = omegaIn_10[0] ^ omegaIn_10[1] ^ omegaIn_10[5];
880
   assign omegaIni_10 [6] = omegaIn_10[0] ^ omegaIn_10[1] ^ omegaIn_10[2] ^ omegaIn_10[6];
881
   assign omegaIni_10 [7] = omegaIn_10[1] ^ omegaIn_10[2] ^ omegaIn_10[3] ^ omegaIn_10[7];
882
   assign omegaIni_11 [0] = omegaIn_11[1] ^ omegaIn_11[2] ^ omegaIn_11[3] ^ omegaIn_11[7];
883
   assign omegaIni_11 [1] = omegaIn_11[2] ^ omegaIn_11[3] ^ omegaIn_11[4];
884
   assign omegaIni_11 [2] = omegaIn_11[1] ^ omegaIn_11[2] ^ omegaIn_11[4] ^ omegaIn_11[5] ^ omegaIn_11[7];
885
   assign omegaIni_11 [3] = omegaIn_11[0] ^ omegaIn_11[1] ^ omegaIn_11[5] ^ omegaIn_11[6] ^ omegaIn_11[7];
886
   assign omegaIni_11 [4] = omegaIn_11[3] ^ omegaIn_11[6];
887
   assign omegaIni_11 [5] = omegaIn_11[0] ^ omegaIn_11[4] ^ omegaIn_11[7];
888
   assign omegaIni_11 [6] = omegaIn_11[0] ^ omegaIn_11[1] ^ omegaIn_11[5];
889
   assign omegaIni_11 [7] = omegaIn_11[0] ^ omegaIn_11[1] ^ omegaIn_11[2] ^ omegaIn_11[6];
890
   assign omegaIni_12 [0] = omegaIn_12[0] ^ omegaIn_12[1] ^ omegaIn_12[2] ^ omegaIn_12[6];
891
   assign omegaIni_12 [1] = omegaIn_12[1] ^ omegaIn_12[2] ^ omegaIn_12[3] ^ omegaIn_12[7];
892
   assign omegaIni_12 [2] = omegaIn_12[0] ^ omegaIn_12[1] ^ omegaIn_12[3] ^ omegaIn_12[4] ^ omegaIn_12[6];
893
   assign omegaIni_12 [3] = omegaIn_12[0] ^ omegaIn_12[4] ^ omegaIn_12[5] ^ omegaIn_12[6] ^ omegaIn_12[7];
894
   assign omegaIni_12 [4] = omegaIn_12[2] ^ omegaIn_12[5] ^ omegaIn_12[7];
895
   assign omegaIni_12 [5] = omegaIn_12[3] ^ omegaIn_12[6];
896
   assign omegaIni_12 [6] = omegaIn_12[0] ^ omegaIn_12[4] ^ omegaIn_12[7];
897
   assign omegaIni_12 [7] = omegaIn_12[0] ^ omegaIn_12[1] ^ omegaIn_12[5];
898
   assign omegaIni_13 [0] = omegaIn_13[0] ^ omegaIn_13[1] ^ omegaIn_13[5];
899
   assign omegaIni_13 [1] = omegaIn_13[0] ^ omegaIn_13[1] ^ omegaIn_13[2] ^ omegaIn_13[6];
900
   assign omegaIni_13 [2] = omegaIn_13[0] ^ omegaIn_13[2] ^ omegaIn_13[3] ^ omegaIn_13[5] ^ omegaIn_13[7];
901
   assign omegaIni_13 [3] = omegaIn_13[3] ^ omegaIn_13[4] ^ omegaIn_13[5] ^ omegaIn_13[6];
902
   assign omegaIni_13 [4] = omegaIn_13[1] ^ omegaIn_13[4] ^ omegaIn_13[6] ^ omegaIn_13[7];
903
   assign omegaIni_13 [5] = omegaIn_13[2] ^ omegaIn_13[5] ^ omegaIn_13[7];
904
   assign omegaIni_13 [6] = omegaIn_13[3] ^ omegaIn_13[6];
905
   assign omegaIni_13 [7] = omegaIn_13[0] ^ omegaIn_13[4] ^ omegaIn_13[7];
906
   assign omegaIni_14 [0] = omegaIn_14[0] ^ omegaIn_14[4] ^ omegaIn_14[7];
907
   assign omegaIni_14 [1] = omegaIn_14[0] ^ omegaIn_14[1] ^ omegaIn_14[5];
908
   assign omegaIni_14 [2] = omegaIn_14[1] ^ omegaIn_14[2] ^ omegaIn_14[4] ^ omegaIn_14[6] ^ omegaIn_14[7];
909
   assign omegaIni_14 [3] = omegaIn_14[2] ^ omegaIn_14[3] ^ omegaIn_14[4] ^ omegaIn_14[5];
910
   assign omegaIni_14 [4] = omegaIn_14[0] ^ omegaIn_14[3] ^ omegaIn_14[5] ^ omegaIn_14[6] ^ omegaIn_14[7];
911
   assign omegaIni_14 [5] = omegaIn_14[1] ^ omegaIn_14[4] ^ omegaIn_14[6] ^ omegaIn_14[7];
912
   assign omegaIni_14 [6] = omegaIn_14[2] ^ omegaIn_14[5] ^ omegaIn_14[7];
913
   assign omegaIni_14 [7] = omegaIn_14[3] ^ omegaIn_14[6];
914
   assign omegaIni_15 [0] = omegaIn_15[3] ^ omegaIn_15[6];
915
   assign omegaIni_15 [1] = omegaIn_15[0] ^ omegaIn_15[4] ^ omegaIn_15[7];
916
   assign omegaIni_15 [2] = omegaIn_15[0] ^ omegaIn_15[1] ^ omegaIn_15[3] ^ omegaIn_15[5] ^ omegaIn_15[6];
917
   assign omegaIni_15 [3] = omegaIn_15[1] ^ omegaIn_15[2] ^ omegaIn_15[3] ^ omegaIn_15[4] ^ omegaIn_15[7];
918
   assign omegaIni_15 [4] = omegaIn_15[2] ^ omegaIn_15[4] ^ omegaIn_15[5] ^ omegaIn_15[6];
919
   assign omegaIni_15 [5] = omegaIn_15[0] ^ omegaIn_15[3] ^ omegaIn_15[5] ^ omegaIn_15[6] ^ omegaIn_15[7];
920
   assign omegaIni_15 [6] = omegaIn_15[1] ^ omegaIn_15[4] ^ omegaIn_15[6] ^ omegaIn_15[7];
921
   assign omegaIni_15 [7] = omegaIn_15[2] ^ omegaIn_15[5] ^ omegaIn_15[7];
922
   assign omegaIni_16 [0] = omegaIn_16[2] ^ omegaIn_16[5] ^ omegaIn_16[7];
923
   assign omegaIni_16 [1] = omegaIn_16[3] ^ omegaIn_16[6];
924
   assign omegaIni_16 [2] = omegaIn_16[0] ^ omegaIn_16[2] ^ omegaIn_16[4] ^ omegaIn_16[5];
925
   assign omegaIni_16 [3] = omegaIn_16[0] ^ omegaIn_16[1] ^ omegaIn_16[2] ^ omegaIn_16[3] ^ omegaIn_16[6] ^ omegaIn_16[7];
926
   assign omegaIni_16 [4] = omegaIn_16[1] ^ omegaIn_16[3] ^ omegaIn_16[4] ^ omegaIn_16[5];
927
   assign omegaIni_16 [5] = omegaIn_16[2] ^ omegaIn_16[4] ^ omegaIn_16[5] ^ omegaIn_16[6];
928
   assign omegaIni_16 [6] = omegaIn_16[0] ^ omegaIn_16[3] ^ omegaIn_16[5] ^ omegaIn_16[6] ^ omegaIn_16[7];
929
   assign omegaIni_16 [7] = omegaIn_16[1] ^ omegaIn_16[4] ^ omegaIn_16[6] ^ omegaIn_16[7];
930
   assign omegaIni_17 [0] = omegaIn_17[1] ^ omegaIn_17[4] ^ omegaIn_17[6] ^ omegaIn_17[7];
931
   assign omegaIni_17 [1] = omegaIn_17[2] ^ omegaIn_17[5] ^ omegaIn_17[7];
932
   assign omegaIni_17 [2] = omegaIn_17[1] ^ omegaIn_17[3] ^ omegaIn_17[4] ^ omegaIn_17[7];
933
   assign omegaIni_17 [3] = omegaIn_17[0] ^ omegaIn_17[1] ^ omegaIn_17[2] ^ omegaIn_17[5] ^ omegaIn_17[6] ^ omegaIn_17[7];
934
   assign omegaIni_17 [4] = omegaIn_17[0] ^ omegaIn_17[2] ^ omegaIn_17[3] ^ omegaIn_17[4];
935
   assign omegaIni_17 [5] = omegaIn_17[1] ^ omegaIn_17[3] ^ omegaIn_17[4] ^ omegaIn_17[5];
936
   assign omegaIni_17 [6] = omegaIn_17[2] ^ omegaIn_17[4] ^ omegaIn_17[5] ^ omegaIn_17[6];
937
   assign omegaIni_17 [7] = omegaIn_17[0] ^ omegaIn_17[3] ^ omegaIn_17[5] ^ omegaIn_17[6] ^ omegaIn_17[7];
938
   assign omegaIni_18 [0] = omegaIn_18[0] ^ omegaIn_18[3] ^ omegaIn_18[5] ^ omegaIn_18[6] ^ omegaIn_18[7];
939
   assign omegaIni_18 [1] = omegaIn_18[1] ^ omegaIn_18[4] ^ omegaIn_18[6] ^ omegaIn_18[7];
940
   assign omegaIni_18 [2] = omegaIn_18[0] ^ omegaIn_18[2] ^ omegaIn_18[3] ^ omegaIn_18[6];
941
   assign omegaIni_18 [3] = omegaIn_18[0] ^ omegaIn_18[1] ^ omegaIn_18[4] ^ omegaIn_18[5] ^ omegaIn_18[6];
942
   assign omegaIni_18 [4] = omegaIn_18[1] ^ omegaIn_18[2] ^ omegaIn_18[3];
943
   assign omegaIni_18 [5] = omegaIn_18[0] ^ omegaIn_18[2] ^ omegaIn_18[3] ^ omegaIn_18[4];
944
   assign omegaIni_18 [6] = omegaIn_18[1] ^ omegaIn_18[3] ^ omegaIn_18[4] ^ omegaIn_18[5];
945
   assign omegaIni_18 [7] = omegaIn_18[2] ^ omegaIn_18[4] ^ omegaIn_18[5] ^ omegaIn_18[6];
946
   assign omegaIni_19 [0] = omegaIn_19[2] ^ omegaIn_19[4] ^ omegaIn_19[5] ^ omegaIn_19[6];
947
   assign omegaIni_19 [1] = omegaIn_19[0] ^ omegaIn_19[3] ^ omegaIn_19[5] ^ omegaIn_19[6] ^ omegaIn_19[7];
948
   assign omegaIni_19 [2] = omegaIn_19[1] ^ omegaIn_19[2] ^ omegaIn_19[5] ^ omegaIn_19[7];
949
   assign omegaIni_19 [3] = omegaIn_19[0] ^ omegaIn_19[3] ^ omegaIn_19[4] ^ omegaIn_19[5];
950
   assign omegaIni_19 [4] = omegaIn_19[0] ^ omegaIn_19[1] ^ omegaIn_19[2];
951
   assign omegaIni_19 [5] = omegaIn_19[1] ^ omegaIn_19[2] ^ omegaIn_19[3];
952
   assign omegaIni_19 [6] = omegaIn_19[0] ^ omegaIn_19[2] ^ omegaIn_19[3] ^ omegaIn_19[4];
953
   assign omegaIni_19 [7] = omegaIn_19[1] ^ omegaIn_19[3] ^ omegaIn_19[4] ^ omegaIn_19[5];
954
   assign omegaIni_20 [0] = omegaIn_20[1] ^ omegaIn_20[3] ^ omegaIn_20[4] ^ omegaIn_20[5];
955
   assign omegaIni_20 [1] = omegaIn_20[2] ^ omegaIn_20[4] ^ omegaIn_20[5] ^ omegaIn_20[6];
956
   assign omegaIni_20 [2] = omegaIn_20[0] ^ omegaIn_20[1] ^ omegaIn_20[4] ^ omegaIn_20[6] ^ omegaIn_20[7];
957
   assign omegaIni_20 [3] = omegaIn_20[2] ^ omegaIn_20[3] ^ omegaIn_20[4] ^ omegaIn_20[7];
958
   assign omegaIni_20 [4] = omegaIn_20[0] ^ omegaIn_20[1];
959
   assign omegaIni_20 [5] = omegaIn_20[0] ^ omegaIn_20[1] ^ omegaIn_20[2];
960
   assign omegaIni_20 [6] = omegaIn_20[1] ^ omegaIn_20[2] ^ omegaIn_20[3];
961
   assign omegaIni_20 [7] = omegaIn_20[0] ^ omegaIn_20[2] ^ omegaIn_20[3] ^ omegaIn_20[4];
962
   assign omegaIni_21 [0] = omegaIn_21[0] ^ omegaIn_21[2] ^ omegaIn_21[3] ^ omegaIn_21[4];
963
   assign omegaIni_21 [1] = omegaIn_21[1] ^ omegaIn_21[3] ^ omegaIn_21[4] ^ omegaIn_21[5];
964
   assign omegaIni_21 [2] = omegaIn_21[0] ^ omegaIn_21[3] ^ omegaIn_21[5] ^ omegaIn_21[6];
965
   assign omegaIni_21 [3] = omegaIn_21[1] ^ omegaIn_21[2] ^ omegaIn_21[3] ^ omegaIn_21[6] ^ omegaIn_21[7];
966
   assign omegaIni_21 [4] = omegaIn_21[0] ^ omegaIn_21[7];
967
   assign omegaIni_21 [5] = omegaIn_21[0] ^ omegaIn_21[1];
968
   assign omegaIni_21 [6] = omegaIn_21[0] ^ omegaIn_21[1] ^ omegaIn_21[2];
969
   assign omegaIni_21 [7] = omegaIn_21[1] ^ omegaIn_21[2] ^ omegaIn_21[3];
970
 
971
 
972
 
973
   //------------------------------------------------------------------------
974
   //- omegaNew
975
   //------------------------------------------------------------------------
976
   reg [7:0]  omegaReg_0;
977
   reg [7:0]  omegaReg_1;
978
   reg [7:0]  omegaReg_2;
979
   reg [7:0]  omegaReg_3;
980
   reg [7:0]  omegaReg_4;
981
   reg [7:0]  omegaReg_5;
982
   reg [7:0]  omegaReg_6;
983
   reg [7:0]  omegaReg_7;
984
   reg [7:0]  omegaReg_8;
985
   reg [7:0]  omegaReg_9;
986
   reg [7:0]  omegaReg_10;
987
   reg [7:0]  omegaReg_11;
988
   reg [7:0]  omegaReg_12;
989
   reg [7:0]  omegaReg_13;
990
   reg [7:0]  omegaReg_14;
991
   reg [7:0]  omegaReg_15;
992
   reg [7:0]  omegaReg_16;
993
   reg [7:0]  omegaReg_17;
994
   reg [7:0]  omegaReg_18;
995
   reg [7:0]  omegaReg_19;
996
   reg [7:0]  omegaReg_20;
997
   reg [7:0]  omegaReg_21;
998
   wire [7:0]  omegaNew_0;
999
   wire [7:0]  omegaNew_1;
1000
   wire [7:0]  omegaNew_2;
1001
   wire [7:0]  omegaNew_3;
1002
   wire [7:0]  omegaNew_4;
1003
   wire [7:0]  omegaNew_5;
1004
   wire [7:0]  omegaNew_6;
1005
   wire [7:0]  omegaNew_7;
1006
   wire [7:0]  omegaNew_8;
1007
   wire [7:0]  omegaNew_9;
1008
   wire [7:0]  omegaNew_10;
1009
   wire [7:0]  omegaNew_11;
1010
   wire [7:0]  omegaNew_12;
1011
   wire [7:0]  omegaNew_13;
1012
   wire [7:0]  omegaNew_14;
1013
   wire [7:0]  omegaNew_15;
1014
   wire [7:0]  omegaNew_16;
1015
   wire [7:0]  omegaNew_17;
1016
   wire [7:0]  omegaNew_18;
1017
   wire [7:0]  omegaNew_19;
1018
   wire [7:0]  omegaNew_20;
1019
   wire [7:0]  omegaNew_21;
1020
 
1021
 
1022
   assign omegaNew_0 [0] = omegaReg_0[0];
1023
   assign omegaNew_0 [1] = omegaReg_0[1];
1024
   assign omegaNew_0 [2] = omegaReg_0[2];
1025
   assign omegaNew_0 [3] = omegaReg_0[3];
1026
   assign omegaNew_0 [4] = omegaReg_0[4];
1027
   assign omegaNew_0 [5] = omegaReg_0[5];
1028
   assign omegaNew_0 [6] = omegaReg_0[6];
1029
   assign omegaNew_0 [7] = omegaReg_0[7];
1030
   assign omegaNew_1 [0] = omegaReg_1[7];
1031
   assign omegaNew_1 [1] = omegaReg_1[0];
1032
   assign omegaNew_1 [2] = omegaReg_1[1] ^ omegaReg_1[7];
1033
   assign omegaNew_1 [3] = omegaReg_1[2] ^ omegaReg_1[7];
1034
   assign omegaNew_1 [4] = omegaReg_1[3] ^ omegaReg_1[7];
1035
   assign omegaNew_1 [5] = omegaReg_1[4];
1036
   assign omegaNew_1 [6] = omegaReg_1[5];
1037
   assign omegaNew_1 [7] = omegaReg_1[6];
1038
   assign omegaNew_2 [0] = omegaReg_2[6];
1039
   assign omegaNew_2 [1] = omegaReg_2[7];
1040
   assign omegaNew_2 [2] = omegaReg_2[0] ^ omegaReg_2[6];
1041
   assign omegaNew_2 [3] = omegaReg_2[1] ^ omegaReg_2[6] ^ omegaReg_2[7];
1042
   assign omegaNew_2 [4] = omegaReg_2[2] ^ omegaReg_2[6] ^ omegaReg_2[7];
1043
   assign omegaNew_2 [5] = omegaReg_2[3] ^ omegaReg_2[7];
1044
   assign omegaNew_2 [6] = omegaReg_2[4];
1045
   assign omegaNew_2 [7] = omegaReg_2[5];
1046
   assign omegaNew_3 [0] = omegaReg_3[5];
1047
   assign omegaNew_3 [1] = omegaReg_3[6];
1048
   assign omegaNew_3 [2] = omegaReg_3[5] ^ omegaReg_3[7];
1049
   assign omegaNew_3 [3] = omegaReg_3[0] ^ omegaReg_3[5] ^ omegaReg_3[6];
1050
   assign omegaNew_3 [4] = omegaReg_3[1] ^ omegaReg_3[5] ^ omegaReg_3[6] ^ omegaReg_3[7];
1051
   assign omegaNew_3 [5] = omegaReg_3[2] ^ omegaReg_3[6] ^ omegaReg_3[7];
1052
   assign omegaNew_3 [6] = omegaReg_3[3] ^ omegaReg_3[7];
1053
   assign omegaNew_3 [7] = omegaReg_3[4];
1054
   assign omegaNew_4 [0] = omegaReg_4[4];
1055
   assign omegaNew_4 [1] = omegaReg_4[5];
1056
   assign omegaNew_4 [2] = omegaReg_4[4] ^ omegaReg_4[6];
1057
   assign omegaNew_4 [3] = omegaReg_4[4] ^ omegaReg_4[5] ^ omegaReg_4[7];
1058
   assign omegaNew_4 [4] = omegaReg_4[0] ^ omegaReg_4[4] ^ omegaReg_4[5] ^ omegaReg_4[6];
1059
   assign omegaNew_4 [5] = omegaReg_4[1] ^ omegaReg_4[5] ^ omegaReg_4[6] ^ omegaReg_4[7];
1060
   assign omegaNew_4 [6] = omegaReg_4[2] ^ omegaReg_4[6] ^ omegaReg_4[7];
1061
   assign omegaNew_4 [7] = omegaReg_4[3] ^ omegaReg_4[7];
1062
   assign omegaNew_5 [0] = omegaReg_5[3] ^ omegaReg_5[7];
1063
   assign omegaNew_5 [1] = omegaReg_5[4];
1064
   assign omegaNew_5 [2] = omegaReg_5[3] ^ omegaReg_5[5] ^ omegaReg_5[7];
1065
   assign omegaNew_5 [3] = omegaReg_5[3] ^ omegaReg_5[4] ^ omegaReg_5[6] ^ omegaReg_5[7];
1066
   assign omegaNew_5 [4] = omegaReg_5[3] ^ omegaReg_5[4] ^ omegaReg_5[5];
1067
   assign omegaNew_5 [5] = omegaReg_5[0] ^ omegaReg_5[4] ^ omegaReg_5[5] ^ omegaReg_5[6];
1068
   assign omegaNew_5 [6] = omegaReg_5[1] ^ omegaReg_5[5] ^ omegaReg_5[6] ^ omegaReg_5[7];
1069
   assign omegaNew_5 [7] = omegaReg_5[2] ^ omegaReg_5[6] ^ omegaReg_5[7];
1070
   assign omegaNew_6 [0] = omegaReg_6[2] ^ omegaReg_6[6] ^ omegaReg_6[7];
1071
   assign omegaNew_6 [1] = omegaReg_6[3] ^ omegaReg_6[7];
1072
   assign omegaNew_6 [2] = omegaReg_6[2] ^ omegaReg_6[4] ^ omegaReg_6[6] ^ omegaReg_6[7];
1073
   assign omegaNew_6 [3] = omegaReg_6[2] ^ omegaReg_6[3] ^ omegaReg_6[5] ^ omegaReg_6[6];
1074
   assign omegaNew_6 [4] = omegaReg_6[2] ^ omegaReg_6[3] ^ omegaReg_6[4];
1075
   assign omegaNew_6 [5] = omegaReg_6[3] ^ omegaReg_6[4] ^ omegaReg_6[5];
1076
   assign omegaNew_6 [6] = omegaReg_6[0] ^ omegaReg_6[4] ^ omegaReg_6[5] ^ omegaReg_6[6];
1077
   assign omegaNew_6 [7] = omegaReg_6[1] ^ omegaReg_6[5] ^ omegaReg_6[6] ^ omegaReg_6[7];
1078
   assign omegaNew_7 [0] = omegaReg_7[1] ^ omegaReg_7[5] ^ omegaReg_7[6] ^ omegaReg_7[7];
1079
   assign omegaNew_7 [1] = omegaReg_7[2] ^ omegaReg_7[6] ^ omegaReg_7[7];
1080
   assign omegaNew_7 [2] = omegaReg_7[1] ^ omegaReg_7[3] ^ omegaReg_7[5] ^ omegaReg_7[6];
1081
   assign omegaNew_7 [3] = omegaReg_7[1] ^ omegaReg_7[2] ^ omegaReg_7[4] ^ omegaReg_7[5];
1082
   assign omegaNew_7 [4] = omegaReg_7[1] ^ omegaReg_7[2] ^ omegaReg_7[3] ^ omegaReg_7[7];
1083
   assign omegaNew_7 [5] = omegaReg_7[2] ^ omegaReg_7[3] ^ omegaReg_7[4];
1084
   assign omegaNew_7 [6] = omegaReg_7[3] ^ omegaReg_7[4] ^ omegaReg_7[5];
1085
   assign omegaNew_7 [7] = omegaReg_7[0] ^ omegaReg_7[4] ^ omegaReg_7[5] ^ omegaReg_7[6];
1086
   assign omegaNew_8 [0] = omegaReg_8[0] ^ omegaReg_8[4] ^ omegaReg_8[5] ^ omegaReg_8[6];
1087
   assign omegaNew_8 [1] = omegaReg_8[1] ^ omegaReg_8[5] ^ omegaReg_8[6] ^ omegaReg_8[7];
1088
   assign omegaNew_8 [2] = omegaReg_8[0] ^ omegaReg_8[2] ^ omegaReg_8[4] ^ omegaReg_8[5] ^ omegaReg_8[7];
1089
   assign omegaNew_8 [3] = omegaReg_8[0] ^ omegaReg_8[1] ^ omegaReg_8[3] ^ omegaReg_8[4];
1090
   assign omegaNew_8 [4] = omegaReg_8[0] ^ omegaReg_8[1] ^ omegaReg_8[2] ^ omegaReg_8[6];
1091
   assign omegaNew_8 [5] = omegaReg_8[1] ^ omegaReg_8[2] ^ omegaReg_8[3] ^ omegaReg_8[7];
1092
   assign omegaNew_8 [6] = omegaReg_8[2] ^ omegaReg_8[3] ^ omegaReg_8[4];
1093
   assign omegaNew_8 [7] = omegaReg_8[3] ^ omegaReg_8[4] ^ omegaReg_8[5];
1094
   assign omegaNew_9 [0] = omegaReg_9[3] ^ omegaReg_9[4] ^ omegaReg_9[5];
1095
   assign omegaNew_9 [1] = omegaReg_9[0] ^ omegaReg_9[4] ^ omegaReg_9[5] ^ omegaReg_9[6];
1096
   assign omegaNew_9 [2] = omegaReg_9[1] ^ omegaReg_9[3] ^ omegaReg_9[4] ^ omegaReg_9[6] ^ omegaReg_9[7];
1097
   assign omegaNew_9 [3] = omegaReg_9[0] ^ omegaReg_9[2] ^ omegaReg_9[3] ^ omegaReg_9[7];
1098
   assign omegaNew_9 [4] = omegaReg_9[0] ^ omegaReg_9[1] ^ omegaReg_9[5];
1099
   assign omegaNew_9 [5] = omegaReg_9[0] ^ omegaReg_9[1] ^ omegaReg_9[2] ^ omegaReg_9[6];
1100
   assign omegaNew_9 [6] = omegaReg_9[1] ^ omegaReg_9[2] ^ omegaReg_9[3] ^ omegaReg_9[7];
1101
   assign omegaNew_9 [7] = omegaReg_9[2] ^ omegaReg_9[3] ^ omegaReg_9[4];
1102
   assign omegaNew_10 [0] = omegaReg_10[2] ^ omegaReg_10[3] ^ omegaReg_10[4];
1103
   assign omegaNew_10 [1] = omegaReg_10[3] ^ omegaReg_10[4] ^ omegaReg_10[5];
1104
   assign omegaNew_10 [2] = omegaReg_10[0] ^ omegaReg_10[2] ^ omegaReg_10[3] ^ omegaReg_10[5] ^ omegaReg_10[6];
1105
   assign omegaNew_10 [3] = omegaReg_10[1] ^ omegaReg_10[2] ^ omegaReg_10[6] ^ omegaReg_10[7];
1106
   assign omegaNew_10 [4] = omegaReg_10[0] ^ omegaReg_10[4] ^ omegaReg_10[7];
1107
   assign omegaNew_10 [5] = omegaReg_10[0] ^ omegaReg_10[1] ^ omegaReg_10[5];
1108
   assign omegaNew_10 [6] = omegaReg_10[0] ^ omegaReg_10[1] ^ omegaReg_10[2] ^ omegaReg_10[6];
1109
   assign omegaNew_10 [7] = omegaReg_10[1] ^ omegaReg_10[2] ^ omegaReg_10[3] ^ omegaReg_10[7];
1110
   assign omegaNew_11 [0] = omegaReg_11[1] ^ omegaReg_11[2] ^ omegaReg_11[3] ^ omegaReg_11[7];
1111
   assign omegaNew_11 [1] = omegaReg_11[2] ^ omegaReg_11[3] ^ omegaReg_11[4];
1112
   assign omegaNew_11 [2] = omegaReg_11[1] ^ omegaReg_11[2] ^ omegaReg_11[4] ^ omegaReg_11[5] ^ omegaReg_11[7];
1113
   assign omegaNew_11 [3] = omegaReg_11[0] ^ omegaReg_11[1] ^ omegaReg_11[5] ^ omegaReg_11[6] ^ omegaReg_11[7];
1114
   assign omegaNew_11 [4] = omegaReg_11[3] ^ omegaReg_11[6];
1115
   assign omegaNew_11 [5] = omegaReg_11[0] ^ omegaReg_11[4] ^ omegaReg_11[7];
1116
   assign omegaNew_11 [6] = omegaReg_11[0] ^ omegaReg_11[1] ^ omegaReg_11[5];
1117
   assign omegaNew_11 [7] = omegaReg_11[0] ^ omegaReg_11[1] ^ omegaReg_11[2] ^ omegaReg_11[6];
1118
   assign omegaNew_12 [0] = omegaReg_12[0] ^ omegaReg_12[1] ^ omegaReg_12[2] ^ omegaReg_12[6];
1119
   assign omegaNew_12 [1] = omegaReg_12[1] ^ omegaReg_12[2] ^ omegaReg_12[3] ^ omegaReg_12[7];
1120
   assign omegaNew_12 [2] = omegaReg_12[0] ^ omegaReg_12[1] ^ omegaReg_12[3] ^ omegaReg_12[4] ^ omegaReg_12[6];
1121
   assign omegaNew_12 [3] = omegaReg_12[0] ^ omegaReg_12[4] ^ omegaReg_12[5] ^ omegaReg_12[6] ^ omegaReg_12[7];
1122
   assign omegaNew_12 [4] = omegaReg_12[2] ^ omegaReg_12[5] ^ omegaReg_12[7];
1123
   assign omegaNew_12 [5] = omegaReg_12[3] ^ omegaReg_12[6];
1124
   assign omegaNew_12 [6] = omegaReg_12[0] ^ omegaReg_12[4] ^ omegaReg_12[7];
1125
   assign omegaNew_12 [7] = omegaReg_12[0] ^ omegaReg_12[1] ^ omegaReg_12[5];
1126
   assign omegaNew_13 [0] = omegaReg_13[0] ^ omegaReg_13[1] ^ omegaReg_13[5];
1127
   assign omegaNew_13 [1] = omegaReg_13[0] ^ omegaReg_13[1] ^ omegaReg_13[2] ^ omegaReg_13[6];
1128
   assign omegaNew_13 [2] = omegaReg_13[0] ^ omegaReg_13[2] ^ omegaReg_13[3] ^ omegaReg_13[5] ^ omegaReg_13[7];
1129
   assign omegaNew_13 [3] = omegaReg_13[3] ^ omegaReg_13[4] ^ omegaReg_13[5] ^ omegaReg_13[6];
1130
   assign omegaNew_13 [4] = omegaReg_13[1] ^ omegaReg_13[4] ^ omegaReg_13[6] ^ omegaReg_13[7];
1131
   assign omegaNew_13 [5] = omegaReg_13[2] ^ omegaReg_13[5] ^ omegaReg_13[7];
1132
   assign omegaNew_13 [6] = omegaReg_13[3] ^ omegaReg_13[6];
1133
   assign omegaNew_13 [7] = omegaReg_13[0] ^ omegaReg_13[4] ^ omegaReg_13[7];
1134
   assign omegaNew_14 [0] = omegaReg_14[0] ^ omegaReg_14[4] ^ omegaReg_14[7];
1135
   assign omegaNew_14 [1] = omegaReg_14[0] ^ omegaReg_14[1] ^ omegaReg_14[5];
1136
   assign omegaNew_14 [2] = omegaReg_14[1] ^ omegaReg_14[2] ^ omegaReg_14[4] ^ omegaReg_14[6] ^ omegaReg_14[7];
1137
   assign omegaNew_14 [3] = omegaReg_14[2] ^ omegaReg_14[3] ^ omegaReg_14[4] ^ omegaReg_14[5];
1138
   assign omegaNew_14 [4] = omegaReg_14[0] ^ omegaReg_14[3] ^ omegaReg_14[5] ^ omegaReg_14[6] ^ omegaReg_14[7];
1139
   assign omegaNew_14 [5] = omegaReg_14[1] ^ omegaReg_14[4] ^ omegaReg_14[6] ^ omegaReg_14[7];
1140
   assign omegaNew_14 [6] = omegaReg_14[2] ^ omegaReg_14[5] ^ omegaReg_14[7];
1141
   assign omegaNew_14 [7] = omegaReg_14[3] ^ omegaReg_14[6];
1142
   assign omegaNew_15 [0] = omegaReg_15[3] ^ omegaReg_15[6];
1143
   assign omegaNew_15 [1] = omegaReg_15[0] ^ omegaReg_15[4] ^ omegaReg_15[7];
1144
   assign omegaNew_15 [2] = omegaReg_15[0] ^ omegaReg_15[1] ^ omegaReg_15[3] ^ omegaReg_15[5] ^ omegaReg_15[6];
1145
   assign omegaNew_15 [3] = omegaReg_15[1] ^ omegaReg_15[2] ^ omegaReg_15[3] ^ omegaReg_15[4] ^ omegaReg_15[7];
1146
   assign omegaNew_15 [4] = omegaReg_15[2] ^ omegaReg_15[4] ^ omegaReg_15[5] ^ omegaReg_15[6];
1147
   assign omegaNew_15 [5] = omegaReg_15[0] ^ omegaReg_15[3] ^ omegaReg_15[5] ^ omegaReg_15[6] ^ omegaReg_15[7];
1148
   assign omegaNew_15 [6] = omegaReg_15[1] ^ omegaReg_15[4] ^ omegaReg_15[6] ^ omegaReg_15[7];
1149
   assign omegaNew_15 [7] = omegaReg_15[2] ^ omegaReg_15[5] ^ omegaReg_15[7];
1150
   assign omegaNew_16 [0] = omegaReg_16[2] ^ omegaReg_16[5] ^ omegaReg_16[7];
1151
   assign omegaNew_16 [1] = omegaReg_16[3] ^ omegaReg_16[6];
1152
   assign omegaNew_16 [2] = omegaReg_16[0] ^ omegaReg_16[2] ^ omegaReg_16[4] ^ omegaReg_16[5];
1153
   assign omegaNew_16 [3] = omegaReg_16[0] ^ omegaReg_16[1] ^ omegaReg_16[2] ^ omegaReg_16[3] ^ omegaReg_16[6] ^ omegaReg_16[7];
1154
   assign omegaNew_16 [4] = omegaReg_16[1] ^ omegaReg_16[3] ^ omegaReg_16[4] ^ omegaReg_16[5];
1155
   assign omegaNew_16 [5] = omegaReg_16[2] ^ omegaReg_16[4] ^ omegaReg_16[5] ^ omegaReg_16[6];
1156
   assign omegaNew_16 [6] = omegaReg_16[0] ^ omegaReg_16[3] ^ omegaReg_16[5] ^ omegaReg_16[6] ^ omegaReg_16[7];
1157
   assign omegaNew_16 [7] = omegaReg_16[1] ^ omegaReg_16[4] ^ omegaReg_16[6] ^ omegaReg_16[7];
1158
   assign omegaNew_17 [0] = omegaReg_17[1] ^ omegaReg_17[4] ^ omegaReg_17[6] ^ omegaReg_17[7];
1159
   assign omegaNew_17 [1] = omegaReg_17[2] ^ omegaReg_17[5] ^ omegaReg_17[7];
1160
   assign omegaNew_17 [2] = omegaReg_17[1] ^ omegaReg_17[3] ^ omegaReg_17[4] ^ omegaReg_17[7];
1161
   assign omegaNew_17 [3] = omegaReg_17[0] ^ omegaReg_17[1] ^ omegaReg_17[2] ^ omegaReg_17[5] ^ omegaReg_17[6] ^ omegaReg_17[7];
1162
   assign omegaNew_17 [4] = omegaReg_17[0] ^ omegaReg_17[2] ^ omegaReg_17[3] ^ omegaReg_17[4];
1163
   assign omegaNew_17 [5] = omegaReg_17[1] ^ omegaReg_17[3] ^ omegaReg_17[4] ^ omegaReg_17[5];
1164
   assign omegaNew_17 [6] = omegaReg_17[2] ^ omegaReg_17[4] ^ omegaReg_17[5] ^ omegaReg_17[6];
1165
   assign omegaNew_17 [7] = omegaReg_17[0] ^ omegaReg_17[3] ^ omegaReg_17[5] ^ omegaReg_17[6] ^ omegaReg_17[7];
1166
   assign omegaNew_18 [0] = omegaReg_18[0] ^ omegaReg_18[3] ^ omegaReg_18[5] ^ omegaReg_18[6] ^ omegaReg_18[7];
1167
   assign omegaNew_18 [1] = omegaReg_18[1] ^ omegaReg_18[4] ^ omegaReg_18[6] ^ omegaReg_18[7];
1168
   assign omegaNew_18 [2] = omegaReg_18[0] ^ omegaReg_18[2] ^ omegaReg_18[3] ^ omegaReg_18[6];
1169
   assign omegaNew_18 [3] = omegaReg_18[0] ^ omegaReg_18[1] ^ omegaReg_18[4] ^ omegaReg_18[5] ^ omegaReg_18[6];
1170
   assign omegaNew_18 [4] = omegaReg_18[1] ^ omegaReg_18[2] ^ omegaReg_18[3];
1171
   assign omegaNew_18 [5] = omegaReg_18[0] ^ omegaReg_18[2] ^ omegaReg_18[3] ^ omegaReg_18[4];
1172
   assign omegaNew_18 [6] = omegaReg_18[1] ^ omegaReg_18[3] ^ omegaReg_18[4] ^ omegaReg_18[5];
1173
   assign omegaNew_18 [7] = omegaReg_18[2] ^ omegaReg_18[4] ^ omegaReg_18[5] ^ omegaReg_18[6];
1174
   assign omegaNew_19 [0] = omegaReg_19[2] ^ omegaReg_19[4] ^ omegaReg_19[5] ^ omegaReg_19[6];
1175
   assign omegaNew_19 [1] = omegaReg_19[0] ^ omegaReg_19[3] ^ omegaReg_19[5] ^ omegaReg_19[6] ^ omegaReg_19[7];
1176
   assign omegaNew_19 [2] = omegaReg_19[1] ^ omegaReg_19[2] ^ omegaReg_19[5] ^ omegaReg_19[7];
1177
   assign omegaNew_19 [3] = omegaReg_19[0] ^ omegaReg_19[3] ^ omegaReg_19[4] ^ omegaReg_19[5];
1178
   assign omegaNew_19 [4] = omegaReg_19[0] ^ omegaReg_19[1] ^ omegaReg_19[2];
1179
   assign omegaNew_19 [5] = omegaReg_19[1] ^ omegaReg_19[2] ^ omegaReg_19[3];
1180
   assign omegaNew_19 [6] = omegaReg_19[0] ^ omegaReg_19[2] ^ omegaReg_19[3] ^ omegaReg_19[4];
1181
   assign omegaNew_19 [7] = omegaReg_19[1] ^ omegaReg_19[3] ^ omegaReg_19[4] ^ omegaReg_19[5];
1182
   assign omegaNew_20 [0] = omegaReg_20[1] ^ omegaReg_20[3] ^ omegaReg_20[4] ^ omegaReg_20[5];
1183
   assign omegaNew_20 [1] = omegaReg_20[2] ^ omegaReg_20[4] ^ omegaReg_20[5] ^ omegaReg_20[6];
1184
   assign omegaNew_20 [2] = omegaReg_20[0] ^ omegaReg_20[1] ^ omegaReg_20[4] ^ omegaReg_20[6] ^ omegaReg_20[7];
1185
   assign omegaNew_20 [3] = omegaReg_20[2] ^ omegaReg_20[3] ^ omegaReg_20[4] ^ omegaReg_20[7];
1186
   assign omegaNew_20 [4] = omegaReg_20[0] ^ omegaReg_20[1];
1187
   assign omegaNew_20 [5] = omegaReg_20[0] ^ omegaReg_20[1] ^ omegaReg_20[2];
1188
   assign omegaNew_20 [6] = omegaReg_20[1] ^ omegaReg_20[2] ^ omegaReg_20[3];
1189
   assign omegaNew_20 [7] = omegaReg_20[0] ^ omegaReg_20[2] ^ omegaReg_20[3] ^ omegaReg_20[4];
1190
   assign omegaNew_21 [0] = omegaReg_21[0] ^ omegaReg_21[2] ^ omegaReg_21[3] ^ omegaReg_21[4];
1191
   assign omegaNew_21 [1] = omegaReg_21[1] ^ omegaReg_21[3] ^ omegaReg_21[4] ^ omegaReg_21[5];
1192
   assign omegaNew_21 [2] = omegaReg_21[0] ^ omegaReg_21[3] ^ omegaReg_21[5] ^ omegaReg_21[6];
1193
   assign omegaNew_21 [3] = omegaReg_21[1] ^ omegaReg_21[2] ^ omegaReg_21[3] ^ omegaReg_21[6] ^ omegaReg_21[7];
1194
   assign omegaNew_21 [4] = omegaReg_21[0] ^ omegaReg_21[7];
1195
   assign omegaNew_21 [5] = omegaReg_21[0] ^ omegaReg_21[1];
1196
   assign omegaNew_21 [6] = omegaReg_21[0] ^ omegaReg_21[1] ^ omegaReg_21[2];
1197
   assign omegaNew_21 [7] = omegaReg_21[1] ^ omegaReg_21[2] ^ omegaReg_21[3];
1198
 
1199
 
1200
 
1201
   //------------------------------------------------------------------
1202
   // + omegaReg_0,..., omegaReg_21
1203
   //- registers
1204
   //------------------------------------------------------------------
1205
   always @(posedge CLK or negedge RESET) begin
1206
      if (~RESET) begin
1207
         omegaReg_0 [7:0]  <= 8'd0;
1208
         omegaReg_1 [7:0]  <= 8'd0;
1209
         omegaReg_2 [7:0]  <= 8'd0;
1210
         omegaReg_3 [7:0]  <= 8'd0;
1211
         omegaReg_4 [7:0]  <= 8'd0;
1212
         omegaReg_5 [7:0]  <= 8'd0;
1213
         omegaReg_6 [7:0]  <= 8'd0;
1214
         omegaReg_7 [7:0]  <= 8'd0;
1215
         omegaReg_8 [7:0]  <= 8'd0;
1216
         omegaReg_9 [7:0]  <= 8'd0;
1217
         omegaReg_10 [7:0] <= 8'd0;
1218
         omegaReg_11 [7:0] <= 8'd0;
1219
         omegaReg_12 [7:0] <= 8'd0;
1220
         omegaReg_13 [7:0] <= 8'd0;
1221
         omegaReg_14 [7:0] <= 8'd0;
1222
         omegaReg_15 [7:0] <= 8'd0;
1223
         omegaReg_16 [7:0] <= 8'd0;
1224
         omegaReg_17 [7:0] <= 8'd0;
1225
         omegaReg_18 [7:0] <= 8'd0;
1226
         omegaReg_19 [7:0] <= 8'd0;
1227
         omegaReg_20 [7:0] <= 8'd0;
1228
         omegaReg_21 [7:0] <= 8'd0;
1229
      end
1230
      else if (enable == 1'b1) begin
1231
         if (sync == 1'b1) begin
1232
            omegaReg_0 [7:0]  <= omegaIni_0 [7:0];
1233
            omegaReg_1 [7:0]  <= omegaIni_1 [7:0];
1234
            omegaReg_2 [7:0]  <= omegaIni_2 [7:0];
1235
            omegaReg_3 [7:0]  <= omegaIni_3 [7:0];
1236
            omegaReg_4 [7:0]  <= omegaIni_4 [7:0];
1237
            omegaReg_5 [7:0]  <= omegaIni_5 [7:0];
1238
            omegaReg_6 [7:0]  <= omegaIni_6 [7:0];
1239
            omegaReg_7 [7:0]  <= omegaIni_7 [7:0];
1240
            omegaReg_8 [7:0]  <= omegaIni_8 [7:0];
1241
            omegaReg_9 [7:0]  <= omegaIni_9 [7:0];
1242
            omegaReg_10 [7:0] <= omegaIni_10 [7:0];
1243
            omegaReg_11 [7:0] <= omegaIni_11 [7:0];
1244
            omegaReg_12 [7:0] <= omegaIni_12 [7:0];
1245
            omegaReg_13 [7:0] <= omegaIni_13 [7:0];
1246
            omegaReg_14 [7:0] <= omegaIni_14 [7:0];
1247
            omegaReg_15 [7:0] <= omegaIni_15 [7:0];
1248
            omegaReg_16 [7:0] <= omegaIni_16 [7:0];
1249
            omegaReg_17 [7:0] <= omegaIni_17 [7:0];
1250
            omegaReg_18 [7:0] <= omegaIni_18 [7:0];
1251
            omegaReg_19 [7:0] <= omegaIni_19 [7:0];
1252
            omegaReg_20 [7:0] <= omegaIni_20 [7:0];
1253
            omegaReg_21 [7:0] <= omegaIni_21 [7:0];
1254
         end
1255
         else begin
1256
            omegaReg_0 [7:0]  <= omegaNew_0 [7:0];
1257
            omegaReg_1 [7:0]  <= omegaNew_1 [7:0];
1258
            omegaReg_2 [7:0]  <= omegaNew_2 [7:0];
1259
            omegaReg_3 [7:0]  <= omegaNew_3 [7:0];
1260
            omegaReg_4 [7:0]  <= omegaNew_4 [7:0];
1261
            omegaReg_5 [7:0]  <= omegaNew_5 [7:0];
1262
            omegaReg_6 [7:0]  <= omegaNew_6 [7:0];
1263
            omegaReg_7 [7:0]  <= omegaNew_7 [7:0];
1264
            omegaReg_8 [7:0]  <= omegaNew_8 [7:0];
1265
            omegaReg_9 [7:0]  <= omegaNew_9 [7:0];
1266
            omegaReg_10 [7:0] <= omegaNew_10 [7:0];
1267
            omegaReg_11 [7:0] <= omegaNew_11 [7:0];
1268
            omegaReg_12 [7:0] <= omegaNew_12 [7:0];
1269
            omegaReg_13 [7:0] <= omegaNew_13 [7:0];
1270
            omegaReg_14 [7:0] <= omegaNew_14 [7:0];
1271
            omegaReg_15 [7:0] <= omegaNew_15 [7:0];
1272
            omegaReg_16 [7:0] <= omegaNew_16 [7:0];
1273
            omegaReg_17 [7:0] <= omegaNew_17 [7:0];
1274
            omegaReg_18 [7:0] <= omegaNew_18 [7:0];
1275
            omegaReg_19 [7:0] <= omegaNew_19 [7:0];
1276
            omegaReg_20 [7:0] <= omegaNew_20 [7:0];
1277
            omegaReg_21 [7:0] <= omegaNew_21 [7:0];
1278
         end
1279
      end
1280
   end
1281
 
1282
 
1283
 
1284
   //------------------------------------------------------------------------
1285
   //- epsilonIni
1286
   //------------------------------------------------------------------------
1287
   wire [7:0]  epsilonIni_0;
1288
   wire [7:0]  epsilonIni_1;
1289
   wire [7:0]  epsilonIni_2;
1290
   wire [7:0]  epsilonIni_3;
1291
   wire [7:0]  epsilonIni_4;
1292
   wire [7:0]  epsilonIni_5;
1293
   wire [7:0]  epsilonIni_6;
1294
   wire [7:0]  epsilonIni_7;
1295
   wire [7:0]  epsilonIni_8;
1296
   wire [7:0]  epsilonIni_9;
1297
   wire [7:0]  epsilonIni_10;
1298
   wire [7:0]  epsilonIni_11;
1299
   wire [7:0]  epsilonIni_12;
1300
   wire [7:0]  epsilonIni_13;
1301
   wire [7:0]  epsilonIni_14;
1302
   wire [7:0]  epsilonIni_15;
1303
   wire [7:0]  epsilonIni_16;
1304
   wire [7:0]  epsilonIni_17;
1305
   wire [7:0]  epsilonIni_18;
1306
   wire [7:0]  epsilonIni_19;
1307
   wire [7:0]  epsilonIni_20;
1308
   wire [7:0]  epsilonIni_21;
1309
   wire [7:0]  epsilonIni_22;
1310
 
1311
 
1312
   assign epsilonIni_0 [0] = epsilonIn_0[0];
1313
   assign epsilonIni_0 [1] = epsilonIn_0[1];
1314
   assign epsilonIni_0 [2] = epsilonIn_0[2];
1315
   assign epsilonIni_0 [3] = epsilonIn_0[3];
1316
   assign epsilonIni_0 [4] = epsilonIn_0[4];
1317
   assign epsilonIni_0 [5] = epsilonIn_0[5];
1318
   assign epsilonIni_0 [6] = epsilonIn_0[6];
1319
   assign epsilonIni_0 [7] = epsilonIn_0[7];
1320
   assign epsilonIni_1 [0] = epsilonIn_1[7];
1321
   assign epsilonIni_1 [1] = epsilonIn_1[0];
1322
   assign epsilonIni_1 [2] = epsilonIn_1[1] ^ epsilonIn_1[7];
1323
   assign epsilonIni_1 [3] = epsilonIn_1[2] ^ epsilonIn_1[7];
1324
   assign epsilonIni_1 [4] = epsilonIn_1[3] ^ epsilonIn_1[7];
1325
   assign epsilonIni_1 [5] = epsilonIn_1[4];
1326
   assign epsilonIni_1 [6] = epsilonIn_1[5];
1327
   assign epsilonIni_1 [7] = epsilonIn_1[6];
1328
   assign epsilonIni_2 [0] = epsilonIn_2[6];
1329
   assign epsilonIni_2 [1] = epsilonIn_2[7];
1330
   assign epsilonIni_2 [2] = epsilonIn_2[0] ^ epsilonIn_2[6];
1331
   assign epsilonIni_2 [3] = epsilonIn_2[1] ^ epsilonIn_2[6] ^ epsilonIn_2[7];
1332
   assign epsilonIni_2 [4] = epsilonIn_2[2] ^ epsilonIn_2[6] ^ epsilonIn_2[7];
1333
   assign epsilonIni_2 [5] = epsilonIn_2[3] ^ epsilonIn_2[7];
1334
   assign epsilonIni_2 [6] = epsilonIn_2[4];
1335
   assign epsilonIni_2 [7] = epsilonIn_2[5];
1336
   assign epsilonIni_3 [0] = epsilonIn_3[5];
1337
   assign epsilonIni_3 [1] = epsilonIn_3[6];
1338
   assign epsilonIni_3 [2] = epsilonIn_3[5] ^ epsilonIn_3[7];
1339
   assign epsilonIni_3 [3] = epsilonIn_3[0] ^ epsilonIn_3[5] ^ epsilonIn_3[6];
1340
   assign epsilonIni_3 [4] = epsilonIn_3[1] ^ epsilonIn_3[5] ^ epsilonIn_3[6] ^ epsilonIn_3[7];
1341
   assign epsilonIni_3 [5] = epsilonIn_3[2] ^ epsilonIn_3[6] ^ epsilonIn_3[7];
1342
   assign epsilonIni_3 [6] = epsilonIn_3[3] ^ epsilonIn_3[7];
1343
   assign epsilonIni_3 [7] = epsilonIn_3[4];
1344
   assign epsilonIni_4 [0] = epsilonIn_4[4];
1345
   assign epsilonIni_4 [1] = epsilonIn_4[5];
1346
   assign epsilonIni_4 [2] = epsilonIn_4[4] ^ epsilonIn_4[6];
1347
   assign epsilonIni_4 [3] = epsilonIn_4[4] ^ epsilonIn_4[5] ^ epsilonIn_4[7];
1348
   assign epsilonIni_4 [4] = epsilonIn_4[0] ^ epsilonIn_4[4] ^ epsilonIn_4[5] ^ epsilonIn_4[6];
1349
   assign epsilonIni_4 [5] = epsilonIn_4[1] ^ epsilonIn_4[5] ^ epsilonIn_4[6] ^ epsilonIn_4[7];
1350
   assign epsilonIni_4 [6] = epsilonIn_4[2] ^ epsilonIn_4[6] ^ epsilonIn_4[7];
1351
   assign epsilonIni_4 [7] = epsilonIn_4[3] ^ epsilonIn_4[7];
1352
   assign epsilonIni_5 [0] = epsilonIn_5[3] ^ epsilonIn_5[7];
1353
   assign epsilonIni_5 [1] = epsilonIn_5[4];
1354
   assign epsilonIni_5 [2] = epsilonIn_5[3] ^ epsilonIn_5[5] ^ epsilonIn_5[7];
1355
   assign epsilonIni_5 [3] = epsilonIn_5[3] ^ epsilonIn_5[4] ^ epsilonIn_5[6] ^ epsilonIn_5[7];
1356
   assign epsilonIni_5 [4] = epsilonIn_5[3] ^ epsilonIn_5[4] ^ epsilonIn_5[5];
1357
   assign epsilonIni_5 [5] = epsilonIn_5[0] ^ epsilonIn_5[4] ^ epsilonIn_5[5] ^ epsilonIn_5[6];
1358
   assign epsilonIni_5 [6] = epsilonIn_5[1] ^ epsilonIn_5[5] ^ epsilonIn_5[6] ^ epsilonIn_5[7];
1359
   assign epsilonIni_5 [7] = epsilonIn_5[2] ^ epsilonIn_5[6] ^ epsilonIn_5[7];
1360
   assign epsilonIni_6 [0] = epsilonIn_6[2] ^ epsilonIn_6[6] ^ epsilonIn_6[7];
1361
   assign epsilonIni_6 [1] = epsilonIn_6[3] ^ epsilonIn_6[7];
1362
   assign epsilonIni_6 [2] = epsilonIn_6[2] ^ epsilonIn_6[4] ^ epsilonIn_6[6] ^ epsilonIn_6[7];
1363
   assign epsilonIni_6 [3] = epsilonIn_6[2] ^ epsilonIn_6[3] ^ epsilonIn_6[5] ^ epsilonIn_6[6];
1364
   assign epsilonIni_6 [4] = epsilonIn_6[2] ^ epsilonIn_6[3] ^ epsilonIn_6[4];
1365
   assign epsilonIni_6 [5] = epsilonIn_6[3] ^ epsilonIn_6[4] ^ epsilonIn_6[5];
1366
   assign epsilonIni_6 [6] = epsilonIn_6[0] ^ epsilonIn_6[4] ^ epsilonIn_6[5] ^ epsilonIn_6[6];
1367
   assign epsilonIni_6 [7] = epsilonIn_6[1] ^ epsilonIn_6[5] ^ epsilonIn_6[6] ^ epsilonIn_6[7];
1368
   assign epsilonIni_7 [0] = epsilonIn_7[1] ^ epsilonIn_7[5] ^ epsilonIn_7[6] ^ epsilonIn_7[7];
1369
   assign epsilonIni_7 [1] = epsilonIn_7[2] ^ epsilonIn_7[6] ^ epsilonIn_7[7];
1370
   assign epsilonIni_7 [2] = epsilonIn_7[1] ^ epsilonIn_7[3] ^ epsilonIn_7[5] ^ epsilonIn_7[6];
1371
   assign epsilonIni_7 [3] = epsilonIn_7[1] ^ epsilonIn_7[2] ^ epsilonIn_7[4] ^ epsilonIn_7[5];
1372
   assign epsilonIni_7 [4] = epsilonIn_7[1] ^ epsilonIn_7[2] ^ epsilonIn_7[3] ^ epsilonIn_7[7];
1373
   assign epsilonIni_7 [5] = epsilonIn_7[2] ^ epsilonIn_7[3] ^ epsilonIn_7[4];
1374
   assign epsilonIni_7 [6] = epsilonIn_7[3] ^ epsilonIn_7[4] ^ epsilonIn_7[5];
1375
   assign epsilonIni_7 [7] = epsilonIn_7[0] ^ epsilonIn_7[4] ^ epsilonIn_7[5] ^ epsilonIn_7[6];
1376
   assign epsilonIni_8 [0] = epsilonIn_8[0] ^ epsilonIn_8[4] ^ epsilonIn_8[5] ^ epsilonIn_8[6];
1377
   assign epsilonIni_8 [1] = epsilonIn_8[1] ^ epsilonIn_8[5] ^ epsilonIn_8[6] ^ epsilonIn_8[7];
1378
   assign epsilonIni_8 [2] = epsilonIn_8[0] ^ epsilonIn_8[2] ^ epsilonIn_8[4] ^ epsilonIn_8[5] ^ epsilonIn_8[7];
1379
   assign epsilonIni_8 [3] = epsilonIn_8[0] ^ epsilonIn_8[1] ^ epsilonIn_8[3] ^ epsilonIn_8[4];
1380
   assign epsilonIni_8 [4] = epsilonIn_8[0] ^ epsilonIn_8[1] ^ epsilonIn_8[2] ^ epsilonIn_8[6];
1381
   assign epsilonIni_8 [5] = epsilonIn_8[1] ^ epsilonIn_8[2] ^ epsilonIn_8[3] ^ epsilonIn_8[7];
1382
   assign epsilonIni_8 [6] = epsilonIn_8[2] ^ epsilonIn_8[3] ^ epsilonIn_8[4];
1383
   assign epsilonIni_8 [7] = epsilonIn_8[3] ^ epsilonIn_8[4] ^ epsilonIn_8[5];
1384
   assign epsilonIni_9 [0] = epsilonIn_9[3] ^ epsilonIn_9[4] ^ epsilonIn_9[5];
1385
   assign epsilonIni_9 [1] = epsilonIn_9[0] ^ epsilonIn_9[4] ^ epsilonIn_9[5] ^ epsilonIn_9[6];
1386
   assign epsilonIni_9 [2] = epsilonIn_9[1] ^ epsilonIn_9[3] ^ epsilonIn_9[4] ^ epsilonIn_9[6] ^ epsilonIn_9[7];
1387
   assign epsilonIni_9 [3] = epsilonIn_9[0] ^ epsilonIn_9[2] ^ epsilonIn_9[3] ^ epsilonIn_9[7];
1388
   assign epsilonIni_9 [4] = epsilonIn_9[0] ^ epsilonIn_9[1] ^ epsilonIn_9[5];
1389
   assign epsilonIni_9 [5] = epsilonIn_9[0] ^ epsilonIn_9[1] ^ epsilonIn_9[2] ^ epsilonIn_9[6];
1390
   assign epsilonIni_9 [6] = epsilonIn_9[1] ^ epsilonIn_9[2] ^ epsilonIn_9[3] ^ epsilonIn_9[7];
1391
   assign epsilonIni_9 [7] = epsilonIn_9[2] ^ epsilonIn_9[3] ^ epsilonIn_9[4];
1392
   assign epsilonIni_10 [0] = epsilonIn_10[2] ^ epsilonIn_10[3] ^ epsilonIn_10[4];
1393
   assign epsilonIni_10 [1] = epsilonIn_10[3] ^ epsilonIn_10[4] ^ epsilonIn_10[5];
1394
   assign epsilonIni_10 [2] = epsilonIn_10[0] ^ epsilonIn_10[2] ^ epsilonIn_10[3] ^ epsilonIn_10[5] ^ epsilonIn_10[6];
1395
   assign epsilonIni_10 [3] = epsilonIn_10[1] ^ epsilonIn_10[2] ^ epsilonIn_10[6] ^ epsilonIn_10[7];
1396
   assign epsilonIni_10 [4] = epsilonIn_10[0] ^ epsilonIn_10[4] ^ epsilonIn_10[7];
1397
   assign epsilonIni_10 [5] = epsilonIn_10[0] ^ epsilonIn_10[1] ^ epsilonIn_10[5];
1398
   assign epsilonIni_10 [6] = epsilonIn_10[0] ^ epsilonIn_10[1] ^ epsilonIn_10[2] ^ epsilonIn_10[6];
1399
   assign epsilonIni_10 [7] = epsilonIn_10[1] ^ epsilonIn_10[2] ^ epsilonIn_10[3] ^ epsilonIn_10[7];
1400
   assign epsilonIni_11 [0] = epsilonIn_11[1] ^ epsilonIn_11[2] ^ epsilonIn_11[3] ^ epsilonIn_11[7];
1401
   assign epsilonIni_11 [1] = epsilonIn_11[2] ^ epsilonIn_11[3] ^ epsilonIn_11[4];
1402
   assign epsilonIni_11 [2] = epsilonIn_11[1] ^ epsilonIn_11[2] ^ epsilonIn_11[4] ^ epsilonIn_11[5] ^ epsilonIn_11[7];
1403
   assign epsilonIni_11 [3] = epsilonIn_11[0] ^ epsilonIn_11[1] ^ epsilonIn_11[5] ^ epsilonIn_11[6] ^ epsilonIn_11[7];
1404
   assign epsilonIni_11 [4] = epsilonIn_11[3] ^ epsilonIn_11[6];
1405
   assign epsilonIni_11 [5] = epsilonIn_11[0] ^ epsilonIn_11[4] ^ epsilonIn_11[7];
1406
   assign epsilonIni_11 [6] = epsilonIn_11[0] ^ epsilonIn_11[1] ^ epsilonIn_11[5];
1407
   assign epsilonIni_11 [7] = epsilonIn_11[0] ^ epsilonIn_11[1] ^ epsilonIn_11[2] ^ epsilonIn_11[6];
1408
   assign epsilonIni_12 [0] = epsilonIn_12[0] ^ epsilonIn_12[1] ^ epsilonIn_12[2] ^ epsilonIn_12[6];
1409
   assign epsilonIni_12 [1] = epsilonIn_12[1] ^ epsilonIn_12[2] ^ epsilonIn_12[3] ^ epsilonIn_12[7];
1410
   assign epsilonIni_12 [2] = epsilonIn_12[0] ^ epsilonIn_12[1] ^ epsilonIn_12[3] ^ epsilonIn_12[4] ^ epsilonIn_12[6];
1411
   assign epsilonIni_12 [3] = epsilonIn_12[0] ^ epsilonIn_12[4] ^ epsilonIn_12[5] ^ epsilonIn_12[6] ^ epsilonIn_12[7];
1412
   assign epsilonIni_12 [4] = epsilonIn_12[2] ^ epsilonIn_12[5] ^ epsilonIn_12[7];
1413
   assign epsilonIni_12 [5] = epsilonIn_12[3] ^ epsilonIn_12[6];
1414
   assign epsilonIni_12 [6] = epsilonIn_12[0] ^ epsilonIn_12[4] ^ epsilonIn_12[7];
1415
   assign epsilonIni_12 [7] = epsilonIn_12[0] ^ epsilonIn_12[1] ^ epsilonIn_12[5];
1416
   assign epsilonIni_13 [0] = epsilonIn_13[0] ^ epsilonIn_13[1] ^ epsilonIn_13[5];
1417
   assign epsilonIni_13 [1] = epsilonIn_13[0] ^ epsilonIn_13[1] ^ epsilonIn_13[2] ^ epsilonIn_13[6];
1418
   assign epsilonIni_13 [2] = epsilonIn_13[0] ^ epsilonIn_13[2] ^ epsilonIn_13[3] ^ epsilonIn_13[5] ^ epsilonIn_13[7];
1419
   assign epsilonIni_13 [3] = epsilonIn_13[3] ^ epsilonIn_13[4] ^ epsilonIn_13[5] ^ epsilonIn_13[6];
1420
   assign epsilonIni_13 [4] = epsilonIn_13[1] ^ epsilonIn_13[4] ^ epsilonIn_13[6] ^ epsilonIn_13[7];
1421
   assign epsilonIni_13 [5] = epsilonIn_13[2] ^ epsilonIn_13[5] ^ epsilonIn_13[7];
1422
   assign epsilonIni_13 [6] = epsilonIn_13[3] ^ epsilonIn_13[6];
1423
   assign epsilonIni_13 [7] = epsilonIn_13[0] ^ epsilonIn_13[4] ^ epsilonIn_13[7];
1424
   assign epsilonIni_14 [0] = epsilonIn_14[0] ^ epsilonIn_14[4] ^ epsilonIn_14[7];
1425
   assign epsilonIni_14 [1] = epsilonIn_14[0] ^ epsilonIn_14[1] ^ epsilonIn_14[5];
1426
   assign epsilonIni_14 [2] = epsilonIn_14[1] ^ epsilonIn_14[2] ^ epsilonIn_14[4] ^ epsilonIn_14[6] ^ epsilonIn_14[7];
1427
   assign epsilonIni_14 [3] = epsilonIn_14[2] ^ epsilonIn_14[3] ^ epsilonIn_14[4] ^ epsilonIn_14[5];
1428
   assign epsilonIni_14 [4] = epsilonIn_14[0] ^ epsilonIn_14[3] ^ epsilonIn_14[5] ^ epsilonIn_14[6] ^ epsilonIn_14[7];
1429
   assign epsilonIni_14 [5] = epsilonIn_14[1] ^ epsilonIn_14[4] ^ epsilonIn_14[6] ^ epsilonIn_14[7];
1430
   assign epsilonIni_14 [6] = epsilonIn_14[2] ^ epsilonIn_14[5] ^ epsilonIn_14[7];
1431
   assign epsilonIni_14 [7] = epsilonIn_14[3] ^ epsilonIn_14[6];
1432
   assign epsilonIni_15 [0] = epsilonIn_15[3] ^ epsilonIn_15[6];
1433
   assign epsilonIni_15 [1] = epsilonIn_15[0] ^ epsilonIn_15[4] ^ epsilonIn_15[7];
1434
   assign epsilonIni_15 [2] = epsilonIn_15[0] ^ epsilonIn_15[1] ^ epsilonIn_15[3] ^ epsilonIn_15[5] ^ epsilonIn_15[6];
1435
   assign epsilonIni_15 [3] = epsilonIn_15[1] ^ epsilonIn_15[2] ^ epsilonIn_15[3] ^ epsilonIn_15[4] ^ epsilonIn_15[7];
1436
   assign epsilonIni_15 [4] = epsilonIn_15[2] ^ epsilonIn_15[4] ^ epsilonIn_15[5] ^ epsilonIn_15[6];
1437
   assign epsilonIni_15 [5] = epsilonIn_15[0] ^ epsilonIn_15[3] ^ epsilonIn_15[5] ^ epsilonIn_15[6] ^ epsilonIn_15[7];
1438
   assign epsilonIni_15 [6] = epsilonIn_15[1] ^ epsilonIn_15[4] ^ epsilonIn_15[6] ^ epsilonIn_15[7];
1439
   assign epsilonIni_15 [7] = epsilonIn_15[2] ^ epsilonIn_15[5] ^ epsilonIn_15[7];
1440
   assign epsilonIni_16 [0] = epsilonIn_16[2] ^ epsilonIn_16[5] ^ epsilonIn_16[7];
1441
   assign epsilonIni_16 [1] = epsilonIn_16[3] ^ epsilonIn_16[6];
1442
   assign epsilonIni_16 [2] = epsilonIn_16[0] ^ epsilonIn_16[2] ^ epsilonIn_16[4] ^ epsilonIn_16[5];
1443
   assign epsilonIni_16 [3] = epsilonIn_16[0] ^ epsilonIn_16[1] ^ epsilonIn_16[2] ^ epsilonIn_16[3] ^ epsilonIn_16[6] ^ epsilonIn_16[7];
1444
   assign epsilonIni_16 [4] = epsilonIn_16[1] ^ epsilonIn_16[3] ^ epsilonIn_16[4] ^ epsilonIn_16[5];
1445
   assign epsilonIni_16 [5] = epsilonIn_16[2] ^ epsilonIn_16[4] ^ epsilonIn_16[5] ^ epsilonIn_16[6];
1446
   assign epsilonIni_16 [6] = epsilonIn_16[0] ^ epsilonIn_16[3] ^ epsilonIn_16[5] ^ epsilonIn_16[6] ^ epsilonIn_16[7];
1447
   assign epsilonIni_16 [7] = epsilonIn_16[1] ^ epsilonIn_16[4] ^ epsilonIn_16[6] ^ epsilonIn_16[7];
1448
   assign epsilonIni_17 [0] = epsilonIn_17[1] ^ epsilonIn_17[4] ^ epsilonIn_17[6] ^ epsilonIn_17[7];
1449
   assign epsilonIni_17 [1] = epsilonIn_17[2] ^ epsilonIn_17[5] ^ epsilonIn_17[7];
1450
   assign epsilonIni_17 [2] = epsilonIn_17[1] ^ epsilonIn_17[3] ^ epsilonIn_17[4] ^ epsilonIn_17[7];
1451
   assign epsilonIni_17 [3] = epsilonIn_17[0] ^ epsilonIn_17[1] ^ epsilonIn_17[2] ^ epsilonIn_17[5] ^ epsilonIn_17[6] ^ epsilonIn_17[7];
1452
   assign epsilonIni_17 [4] = epsilonIn_17[0] ^ epsilonIn_17[2] ^ epsilonIn_17[3] ^ epsilonIn_17[4];
1453
   assign epsilonIni_17 [5] = epsilonIn_17[1] ^ epsilonIn_17[3] ^ epsilonIn_17[4] ^ epsilonIn_17[5];
1454
   assign epsilonIni_17 [6] = epsilonIn_17[2] ^ epsilonIn_17[4] ^ epsilonIn_17[5] ^ epsilonIn_17[6];
1455
   assign epsilonIni_17 [7] = epsilonIn_17[0] ^ epsilonIn_17[3] ^ epsilonIn_17[5] ^ epsilonIn_17[6] ^ epsilonIn_17[7];
1456
   assign epsilonIni_18 [0] = epsilonIn_18[0] ^ epsilonIn_18[3] ^ epsilonIn_18[5] ^ epsilonIn_18[6] ^ epsilonIn_18[7];
1457
   assign epsilonIni_18 [1] = epsilonIn_18[1] ^ epsilonIn_18[4] ^ epsilonIn_18[6] ^ epsilonIn_18[7];
1458
   assign epsilonIni_18 [2] = epsilonIn_18[0] ^ epsilonIn_18[2] ^ epsilonIn_18[3] ^ epsilonIn_18[6];
1459
   assign epsilonIni_18 [3] = epsilonIn_18[0] ^ epsilonIn_18[1] ^ epsilonIn_18[4] ^ epsilonIn_18[5] ^ epsilonIn_18[6];
1460
   assign epsilonIni_18 [4] = epsilonIn_18[1] ^ epsilonIn_18[2] ^ epsilonIn_18[3];
1461
   assign epsilonIni_18 [5] = epsilonIn_18[0] ^ epsilonIn_18[2] ^ epsilonIn_18[3] ^ epsilonIn_18[4];
1462
   assign epsilonIni_18 [6] = epsilonIn_18[1] ^ epsilonIn_18[3] ^ epsilonIn_18[4] ^ epsilonIn_18[5];
1463
   assign epsilonIni_18 [7] = epsilonIn_18[2] ^ epsilonIn_18[4] ^ epsilonIn_18[5] ^ epsilonIn_18[6];
1464
   assign epsilonIni_19 [0] = epsilonIn_19[2] ^ epsilonIn_19[4] ^ epsilonIn_19[5] ^ epsilonIn_19[6];
1465
   assign epsilonIni_19 [1] = epsilonIn_19[0] ^ epsilonIn_19[3] ^ epsilonIn_19[5] ^ epsilonIn_19[6] ^ epsilonIn_19[7];
1466
   assign epsilonIni_19 [2] = epsilonIn_19[1] ^ epsilonIn_19[2] ^ epsilonIn_19[5] ^ epsilonIn_19[7];
1467
   assign epsilonIni_19 [3] = epsilonIn_19[0] ^ epsilonIn_19[3] ^ epsilonIn_19[4] ^ epsilonIn_19[5];
1468
   assign epsilonIni_19 [4] = epsilonIn_19[0] ^ epsilonIn_19[1] ^ epsilonIn_19[2];
1469
   assign epsilonIni_19 [5] = epsilonIn_19[1] ^ epsilonIn_19[2] ^ epsilonIn_19[3];
1470
   assign epsilonIni_19 [6] = epsilonIn_19[0] ^ epsilonIn_19[2] ^ epsilonIn_19[3] ^ epsilonIn_19[4];
1471
   assign epsilonIni_19 [7] = epsilonIn_19[1] ^ epsilonIn_19[3] ^ epsilonIn_19[4] ^ epsilonIn_19[5];
1472
   assign epsilonIni_20 [0] = epsilonIn_20[1] ^ epsilonIn_20[3] ^ epsilonIn_20[4] ^ epsilonIn_20[5];
1473
   assign epsilonIni_20 [1] = epsilonIn_20[2] ^ epsilonIn_20[4] ^ epsilonIn_20[5] ^ epsilonIn_20[6];
1474
   assign epsilonIni_20 [2] = epsilonIn_20[0] ^ epsilonIn_20[1] ^ epsilonIn_20[4] ^ epsilonIn_20[6] ^ epsilonIn_20[7];
1475
   assign epsilonIni_20 [3] = epsilonIn_20[2] ^ epsilonIn_20[3] ^ epsilonIn_20[4] ^ epsilonIn_20[7];
1476
   assign epsilonIni_20 [4] = epsilonIn_20[0] ^ epsilonIn_20[1];
1477
   assign epsilonIni_20 [5] = epsilonIn_20[0] ^ epsilonIn_20[1] ^ epsilonIn_20[2];
1478
   assign epsilonIni_20 [6] = epsilonIn_20[1] ^ epsilonIn_20[2] ^ epsilonIn_20[3];
1479
   assign epsilonIni_20 [7] = epsilonIn_20[0] ^ epsilonIn_20[2] ^ epsilonIn_20[3] ^ epsilonIn_20[4];
1480
   assign epsilonIni_21 [0] = epsilonIn_21[0] ^ epsilonIn_21[2] ^ epsilonIn_21[3] ^ epsilonIn_21[4];
1481
   assign epsilonIni_21 [1] = epsilonIn_21[1] ^ epsilonIn_21[3] ^ epsilonIn_21[4] ^ epsilonIn_21[5];
1482
   assign epsilonIni_21 [2] = epsilonIn_21[0] ^ epsilonIn_21[3] ^ epsilonIn_21[5] ^ epsilonIn_21[6];
1483
   assign epsilonIni_21 [3] = epsilonIn_21[1] ^ epsilonIn_21[2] ^ epsilonIn_21[3] ^ epsilonIn_21[6] ^ epsilonIn_21[7];
1484
   assign epsilonIni_21 [4] = epsilonIn_21[0] ^ epsilonIn_21[7];
1485
   assign epsilonIni_21 [5] = epsilonIn_21[0] ^ epsilonIn_21[1];
1486
   assign epsilonIni_21 [6] = epsilonIn_21[0] ^ epsilonIn_21[1] ^ epsilonIn_21[2];
1487
   assign epsilonIni_21 [7] = epsilonIn_21[1] ^ epsilonIn_21[2] ^ epsilonIn_21[3];
1488
   assign epsilonIni_22 [0] = epsilonIn_22[1] ^ epsilonIn_22[2] ^ epsilonIn_22[3];
1489
   assign epsilonIni_22 [1] = epsilonIn_22[0] ^ epsilonIn_22[2] ^ epsilonIn_22[3] ^ epsilonIn_22[4];
1490
   assign epsilonIni_22 [2] = epsilonIn_22[2] ^ epsilonIn_22[4] ^ epsilonIn_22[5];
1491
   assign epsilonIni_22 [3] = epsilonIn_22[0] ^ epsilonIn_22[1] ^ epsilonIn_22[2] ^ epsilonIn_22[5] ^ epsilonIn_22[6];
1492
   assign epsilonIni_22 [4] = epsilonIn_22[6] ^ epsilonIn_22[7];
1493
   assign epsilonIni_22 [5] = epsilonIn_22[0] ^ epsilonIn_22[7];
1494
   assign epsilonIni_22 [6] = epsilonIn_22[0] ^ epsilonIn_22[1];
1495
   assign epsilonIni_22 [7] = epsilonIn_22[0] ^ epsilonIn_22[1] ^ epsilonIn_22[2];
1496
 
1497
 
1498
 
1499
   //------------------------------------------------------------------------
1500
   //- epsilonNew
1501
   //------------------------------------------------------------------------
1502
   reg  [7:0]  epsilonReg_0;
1503
   reg  [7:0]  epsilonReg_1;
1504
   reg  [7:0]  epsilonReg_2;
1505
   reg  [7:0]  epsilonReg_3;
1506
   reg  [7:0]  epsilonReg_4;
1507
   reg  [7:0]  epsilonReg_5;
1508
   reg  [7:0]  epsilonReg_6;
1509
   reg  [7:0]  epsilonReg_7;
1510
   reg  [7:0]  epsilonReg_8;
1511
   reg  [7:0]  epsilonReg_9;
1512
   reg  [7:0]  epsilonReg_10;
1513
   reg  [7:0]  epsilonReg_11;
1514
   reg  [7:0]  epsilonReg_12;
1515
   reg  [7:0]  epsilonReg_13;
1516
   reg  [7:0]  epsilonReg_14;
1517
   reg  [7:0]  epsilonReg_15;
1518
   reg  [7:0]  epsilonReg_16;
1519
   reg  [7:0]  epsilonReg_17;
1520
   reg  [7:0]  epsilonReg_18;
1521
   reg  [7:0]  epsilonReg_19;
1522
   reg  [7:0]  epsilonReg_20;
1523
   reg  [7:0]  epsilonReg_21;
1524
   reg  [7:0]  epsilonReg_22;
1525
   wire [7:0]  epsilonNew_0;
1526
   wire [7:0]  epsilonNew_1;
1527
   wire [7:0]  epsilonNew_2;
1528
   wire [7:0]  epsilonNew_3;
1529
   wire [7:0]  epsilonNew_4;
1530
   wire [7:0]  epsilonNew_5;
1531
   wire [7:0]  epsilonNew_6;
1532
   wire [7:0]  epsilonNew_7;
1533
   wire [7:0]  epsilonNew_8;
1534
   wire [7:0]  epsilonNew_9;
1535
   wire [7:0]  epsilonNew_10;
1536
   wire [7:0]  epsilonNew_11;
1537
   wire [7:0]  epsilonNew_12;
1538
   wire [7:0]  epsilonNew_13;
1539
   wire [7:0]  epsilonNew_14;
1540
   wire [7:0]  epsilonNew_15;
1541
   wire [7:0]  epsilonNew_16;
1542
   wire [7:0]  epsilonNew_17;
1543
   wire [7:0]  epsilonNew_18;
1544
   wire [7:0]  epsilonNew_19;
1545
   wire [7:0]  epsilonNew_20;
1546
   wire [7:0]  epsilonNew_21;
1547
   wire [7:0]  epsilonNew_22;
1548
 
1549
 
1550
   assign epsilonNew_0 [0] = epsilonReg_0[0];
1551
   assign epsilonNew_0 [1] = epsilonReg_0[1];
1552
   assign epsilonNew_0 [2] = epsilonReg_0[2];
1553
   assign epsilonNew_0 [3] = epsilonReg_0[3];
1554
   assign epsilonNew_0 [4] = epsilonReg_0[4];
1555
   assign epsilonNew_0 [5] = epsilonReg_0[5];
1556
   assign epsilonNew_0 [6] = epsilonReg_0[6];
1557
   assign epsilonNew_0 [7] = epsilonReg_0[7];
1558
   assign epsilonNew_1 [0] = epsilonReg_1[7];
1559
   assign epsilonNew_1 [1] = epsilonReg_1[0];
1560
   assign epsilonNew_1 [2] = epsilonReg_1[1] ^ epsilonReg_1[7];
1561
   assign epsilonNew_1 [3] = epsilonReg_1[2] ^ epsilonReg_1[7];
1562
   assign epsilonNew_1 [4] = epsilonReg_1[3] ^ epsilonReg_1[7];
1563
   assign epsilonNew_1 [5] = epsilonReg_1[4];
1564
   assign epsilonNew_1 [6] = epsilonReg_1[5];
1565
   assign epsilonNew_1 [7] = epsilonReg_1[6];
1566
   assign epsilonNew_2 [0] = epsilonReg_2[6];
1567
   assign epsilonNew_2 [1] = epsilonReg_2[7];
1568
   assign epsilonNew_2 [2] = epsilonReg_2[0] ^ epsilonReg_2[6];
1569
   assign epsilonNew_2 [3] = epsilonReg_2[1] ^ epsilonReg_2[6] ^ epsilonReg_2[7];
1570
   assign epsilonNew_2 [4] = epsilonReg_2[2] ^ epsilonReg_2[6] ^ epsilonReg_2[7];
1571
   assign epsilonNew_2 [5] = epsilonReg_2[3] ^ epsilonReg_2[7];
1572
   assign epsilonNew_2 [6] = epsilonReg_2[4];
1573
   assign epsilonNew_2 [7] = epsilonReg_2[5];
1574
   assign epsilonNew_3 [0] = epsilonReg_3[5];
1575
   assign epsilonNew_3 [1] = epsilonReg_3[6];
1576
   assign epsilonNew_3 [2] = epsilonReg_3[5] ^ epsilonReg_3[7];
1577
   assign epsilonNew_3 [3] = epsilonReg_3[0] ^ epsilonReg_3[5] ^ epsilonReg_3[6];
1578
   assign epsilonNew_3 [4] = epsilonReg_3[1] ^ epsilonReg_3[5] ^ epsilonReg_3[6] ^ epsilonReg_3[7];
1579
   assign epsilonNew_3 [5] = epsilonReg_3[2] ^ epsilonReg_3[6] ^ epsilonReg_3[7];
1580
   assign epsilonNew_3 [6] = epsilonReg_3[3] ^ epsilonReg_3[7];
1581
   assign epsilonNew_3 [7] = epsilonReg_3[4];
1582
   assign epsilonNew_4 [0] = epsilonReg_4[4];
1583
   assign epsilonNew_4 [1] = epsilonReg_4[5];
1584
   assign epsilonNew_4 [2] = epsilonReg_4[4] ^ epsilonReg_4[6];
1585
   assign epsilonNew_4 [3] = epsilonReg_4[4] ^ epsilonReg_4[5] ^ epsilonReg_4[7];
1586
   assign epsilonNew_4 [4] = epsilonReg_4[0] ^ epsilonReg_4[4] ^ epsilonReg_4[5] ^ epsilonReg_4[6];
1587
   assign epsilonNew_4 [5] = epsilonReg_4[1] ^ epsilonReg_4[5] ^ epsilonReg_4[6] ^ epsilonReg_4[7];
1588
   assign epsilonNew_4 [6] = epsilonReg_4[2] ^ epsilonReg_4[6] ^ epsilonReg_4[7];
1589
   assign epsilonNew_4 [7] = epsilonReg_4[3] ^ epsilonReg_4[7];
1590
   assign epsilonNew_5 [0] = epsilonReg_5[3] ^ epsilonReg_5[7];
1591
   assign epsilonNew_5 [1] = epsilonReg_5[4];
1592
   assign epsilonNew_5 [2] = epsilonReg_5[3] ^ epsilonReg_5[5] ^ epsilonReg_5[7];
1593
   assign epsilonNew_5 [3] = epsilonReg_5[3] ^ epsilonReg_5[4] ^ epsilonReg_5[6] ^ epsilonReg_5[7];
1594
   assign epsilonNew_5 [4] = epsilonReg_5[3] ^ epsilonReg_5[4] ^ epsilonReg_5[5];
1595
   assign epsilonNew_5 [5] = epsilonReg_5[0] ^ epsilonReg_5[4] ^ epsilonReg_5[5] ^ epsilonReg_5[6];
1596
   assign epsilonNew_5 [6] = epsilonReg_5[1] ^ epsilonReg_5[5] ^ epsilonReg_5[6] ^ epsilonReg_5[7];
1597
   assign epsilonNew_5 [7] = epsilonReg_5[2] ^ epsilonReg_5[6] ^ epsilonReg_5[7];
1598
   assign epsilonNew_6 [0] = epsilonReg_6[2] ^ epsilonReg_6[6] ^ epsilonReg_6[7];
1599
   assign epsilonNew_6 [1] = epsilonReg_6[3] ^ epsilonReg_6[7];
1600
   assign epsilonNew_6 [2] = epsilonReg_6[2] ^ epsilonReg_6[4] ^ epsilonReg_6[6] ^ epsilonReg_6[7];
1601
   assign epsilonNew_6 [3] = epsilonReg_6[2] ^ epsilonReg_6[3] ^ epsilonReg_6[5] ^ epsilonReg_6[6];
1602
   assign epsilonNew_6 [4] = epsilonReg_6[2] ^ epsilonReg_6[3] ^ epsilonReg_6[4];
1603
   assign epsilonNew_6 [5] = epsilonReg_6[3] ^ epsilonReg_6[4] ^ epsilonReg_6[5];
1604
   assign epsilonNew_6 [6] = epsilonReg_6[0] ^ epsilonReg_6[4] ^ epsilonReg_6[5] ^ epsilonReg_6[6];
1605
   assign epsilonNew_6 [7] = epsilonReg_6[1] ^ epsilonReg_6[5] ^ epsilonReg_6[6] ^ epsilonReg_6[7];
1606
   assign epsilonNew_7 [0] = epsilonReg_7[1] ^ epsilonReg_7[5] ^ epsilonReg_7[6] ^ epsilonReg_7[7];
1607
   assign epsilonNew_7 [1] = epsilonReg_7[2] ^ epsilonReg_7[6] ^ epsilonReg_7[7];
1608
   assign epsilonNew_7 [2] = epsilonReg_7[1] ^ epsilonReg_7[3] ^ epsilonReg_7[5] ^ epsilonReg_7[6];
1609
   assign epsilonNew_7 [3] = epsilonReg_7[1] ^ epsilonReg_7[2] ^ epsilonReg_7[4] ^ epsilonReg_7[5];
1610
   assign epsilonNew_7 [4] = epsilonReg_7[1] ^ epsilonReg_7[2] ^ epsilonReg_7[3] ^ epsilonReg_7[7];
1611
   assign epsilonNew_7 [5] = epsilonReg_7[2] ^ epsilonReg_7[3] ^ epsilonReg_7[4];
1612
   assign epsilonNew_7 [6] = epsilonReg_7[3] ^ epsilonReg_7[4] ^ epsilonReg_7[5];
1613
   assign epsilonNew_7 [7] = epsilonReg_7[0] ^ epsilonReg_7[4] ^ epsilonReg_7[5] ^ epsilonReg_7[6];
1614
   assign epsilonNew_8 [0] = epsilonReg_8[0] ^ epsilonReg_8[4] ^ epsilonReg_8[5] ^ epsilonReg_8[6];
1615
   assign epsilonNew_8 [1] = epsilonReg_8[1] ^ epsilonReg_8[5] ^ epsilonReg_8[6] ^ epsilonReg_8[7];
1616
   assign epsilonNew_8 [2] = epsilonReg_8[0] ^ epsilonReg_8[2] ^ epsilonReg_8[4] ^ epsilonReg_8[5] ^ epsilonReg_8[7];
1617
   assign epsilonNew_8 [3] = epsilonReg_8[0] ^ epsilonReg_8[1] ^ epsilonReg_8[3] ^ epsilonReg_8[4];
1618
   assign epsilonNew_8 [4] = epsilonReg_8[0] ^ epsilonReg_8[1] ^ epsilonReg_8[2] ^ epsilonReg_8[6];
1619
   assign epsilonNew_8 [5] = epsilonReg_8[1] ^ epsilonReg_8[2] ^ epsilonReg_8[3] ^ epsilonReg_8[7];
1620
   assign epsilonNew_8 [6] = epsilonReg_8[2] ^ epsilonReg_8[3] ^ epsilonReg_8[4];
1621
   assign epsilonNew_8 [7] = epsilonReg_8[3] ^ epsilonReg_8[4] ^ epsilonReg_8[5];
1622
   assign epsilonNew_9 [0] = epsilonReg_9[3] ^ epsilonReg_9[4] ^ epsilonReg_9[5];
1623
   assign epsilonNew_9 [1] = epsilonReg_9[0] ^ epsilonReg_9[4] ^ epsilonReg_9[5] ^ epsilonReg_9[6];
1624
   assign epsilonNew_9 [2] = epsilonReg_9[1] ^ epsilonReg_9[3] ^ epsilonReg_9[4] ^ epsilonReg_9[6] ^ epsilonReg_9[7];
1625
   assign epsilonNew_9 [3] = epsilonReg_9[0] ^ epsilonReg_9[2] ^ epsilonReg_9[3] ^ epsilonReg_9[7];
1626
   assign epsilonNew_9 [4] = epsilonReg_9[0] ^ epsilonReg_9[1] ^ epsilonReg_9[5];
1627
   assign epsilonNew_9 [5] = epsilonReg_9[0] ^ epsilonReg_9[1] ^ epsilonReg_9[2] ^ epsilonReg_9[6];
1628
   assign epsilonNew_9 [6] = epsilonReg_9[1] ^ epsilonReg_9[2] ^ epsilonReg_9[3] ^ epsilonReg_9[7];
1629
   assign epsilonNew_9 [7] = epsilonReg_9[2] ^ epsilonReg_9[3] ^ epsilonReg_9[4];
1630
   assign epsilonNew_10 [0] = epsilonReg_10[2] ^ epsilonReg_10[3] ^ epsilonReg_10[4];
1631
   assign epsilonNew_10 [1] = epsilonReg_10[3] ^ epsilonReg_10[4] ^ epsilonReg_10[5];
1632
   assign epsilonNew_10 [2] = epsilonReg_10[0] ^ epsilonReg_10[2] ^ epsilonReg_10[3] ^ epsilonReg_10[5] ^ epsilonReg_10[6];
1633
   assign epsilonNew_10 [3] = epsilonReg_10[1] ^ epsilonReg_10[2] ^ epsilonReg_10[6] ^ epsilonReg_10[7];
1634
   assign epsilonNew_10 [4] = epsilonReg_10[0] ^ epsilonReg_10[4] ^ epsilonReg_10[7];
1635
   assign epsilonNew_10 [5] = epsilonReg_10[0] ^ epsilonReg_10[1] ^ epsilonReg_10[5];
1636
   assign epsilonNew_10 [6] = epsilonReg_10[0] ^ epsilonReg_10[1] ^ epsilonReg_10[2] ^ epsilonReg_10[6];
1637
   assign epsilonNew_10 [7] = epsilonReg_10[1] ^ epsilonReg_10[2] ^ epsilonReg_10[3] ^ epsilonReg_10[7];
1638
   assign epsilonNew_11 [0] = epsilonReg_11[1] ^ epsilonReg_11[2] ^ epsilonReg_11[3] ^ epsilonReg_11[7];
1639
   assign epsilonNew_11 [1] = epsilonReg_11[2] ^ epsilonReg_11[3] ^ epsilonReg_11[4];
1640
   assign epsilonNew_11 [2] = epsilonReg_11[1] ^ epsilonReg_11[2] ^ epsilonReg_11[4] ^ epsilonReg_11[5] ^ epsilonReg_11[7];
1641
   assign epsilonNew_11 [3] = epsilonReg_11[0] ^ epsilonReg_11[1] ^ epsilonReg_11[5] ^ epsilonReg_11[6] ^ epsilonReg_11[7];
1642
   assign epsilonNew_11 [4] = epsilonReg_11[3] ^ epsilonReg_11[6];
1643
   assign epsilonNew_11 [5] = epsilonReg_11[0] ^ epsilonReg_11[4] ^ epsilonReg_11[7];
1644
   assign epsilonNew_11 [6] = epsilonReg_11[0] ^ epsilonReg_11[1] ^ epsilonReg_11[5];
1645
   assign epsilonNew_11 [7] = epsilonReg_11[0] ^ epsilonReg_11[1] ^ epsilonReg_11[2] ^ epsilonReg_11[6];
1646
   assign epsilonNew_12 [0] = epsilonReg_12[0] ^ epsilonReg_12[1] ^ epsilonReg_12[2] ^ epsilonReg_12[6];
1647
   assign epsilonNew_12 [1] = epsilonReg_12[1] ^ epsilonReg_12[2] ^ epsilonReg_12[3] ^ epsilonReg_12[7];
1648
   assign epsilonNew_12 [2] = epsilonReg_12[0] ^ epsilonReg_12[1] ^ epsilonReg_12[3] ^ epsilonReg_12[4] ^ epsilonReg_12[6];
1649
   assign epsilonNew_12 [3] = epsilonReg_12[0] ^ epsilonReg_12[4] ^ epsilonReg_12[5] ^ epsilonReg_12[6] ^ epsilonReg_12[7];
1650
   assign epsilonNew_12 [4] = epsilonReg_12[2] ^ epsilonReg_12[5] ^ epsilonReg_12[7];
1651
   assign epsilonNew_12 [5] = epsilonReg_12[3] ^ epsilonReg_12[6];
1652
   assign epsilonNew_12 [6] = epsilonReg_12[0] ^ epsilonReg_12[4] ^ epsilonReg_12[7];
1653
   assign epsilonNew_12 [7] = epsilonReg_12[0] ^ epsilonReg_12[1] ^ epsilonReg_12[5];
1654
   assign epsilonNew_13 [0] = epsilonReg_13[0] ^ epsilonReg_13[1] ^ epsilonReg_13[5];
1655
   assign epsilonNew_13 [1] = epsilonReg_13[0] ^ epsilonReg_13[1] ^ epsilonReg_13[2] ^ epsilonReg_13[6];
1656
   assign epsilonNew_13 [2] = epsilonReg_13[0] ^ epsilonReg_13[2] ^ epsilonReg_13[3] ^ epsilonReg_13[5] ^ epsilonReg_13[7];
1657
   assign epsilonNew_13 [3] = epsilonReg_13[3] ^ epsilonReg_13[4] ^ epsilonReg_13[5] ^ epsilonReg_13[6];
1658
   assign epsilonNew_13 [4] = epsilonReg_13[1] ^ epsilonReg_13[4] ^ epsilonReg_13[6] ^ epsilonReg_13[7];
1659
   assign epsilonNew_13 [5] = epsilonReg_13[2] ^ epsilonReg_13[5] ^ epsilonReg_13[7];
1660
   assign epsilonNew_13 [6] = epsilonReg_13[3] ^ epsilonReg_13[6];
1661
   assign epsilonNew_13 [7] = epsilonReg_13[0] ^ epsilonReg_13[4] ^ epsilonReg_13[7];
1662
   assign epsilonNew_14 [0] = epsilonReg_14[0] ^ epsilonReg_14[4] ^ epsilonReg_14[7];
1663
   assign epsilonNew_14 [1] = epsilonReg_14[0] ^ epsilonReg_14[1] ^ epsilonReg_14[5];
1664
   assign epsilonNew_14 [2] = epsilonReg_14[1] ^ epsilonReg_14[2] ^ epsilonReg_14[4] ^ epsilonReg_14[6] ^ epsilonReg_14[7];
1665
   assign epsilonNew_14 [3] = epsilonReg_14[2] ^ epsilonReg_14[3] ^ epsilonReg_14[4] ^ epsilonReg_14[5];
1666
   assign epsilonNew_14 [4] = epsilonReg_14[0] ^ epsilonReg_14[3] ^ epsilonReg_14[5] ^ epsilonReg_14[6] ^ epsilonReg_14[7];
1667
   assign epsilonNew_14 [5] = epsilonReg_14[1] ^ epsilonReg_14[4] ^ epsilonReg_14[6] ^ epsilonReg_14[7];
1668
   assign epsilonNew_14 [6] = epsilonReg_14[2] ^ epsilonReg_14[5] ^ epsilonReg_14[7];
1669
   assign epsilonNew_14 [7] = epsilonReg_14[3] ^ epsilonReg_14[6];
1670
   assign epsilonNew_15 [0] = epsilonReg_15[3] ^ epsilonReg_15[6];
1671
   assign epsilonNew_15 [1] = epsilonReg_15[0] ^ epsilonReg_15[4] ^ epsilonReg_15[7];
1672
   assign epsilonNew_15 [2] = epsilonReg_15[0] ^ epsilonReg_15[1] ^ epsilonReg_15[3] ^ epsilonReg_15[5] ^ epsilonReg_15[6];
1673
   assign epsilonNew_15 [3] = epsilonReg_15[1] ^ epsilonReg_15[2] ^ epsilonReg_15[3] ^ epsilonReg_15[4] ^ epsilonReg_15[7];
1674
   assign epsilonNew_15 [4] = epsilonReg_15[2] ^ epsilonReg_15[4] ^ epsilonReg_15[5] ^ epsilonReg_15[6];
1675
   assign epsilonNew_15 [5] = epsilonReg_15[0] ^ epsilonReg_15[3] ^ epsilonReg_15[5] ^ epsilonReg_15[6] ^ epsilonReg_15[7];
1676
   assign epsilonNew_15 [6] = epsilonReg_15[1] ^ epsilonReg_15[4] ^ epsilonReg_15[6] ^ epsilonReg_15[7];
1677
   assign epsilonNew_15 [7] = epsilonReg_15[2] ^ epsilonReg_15[5] ^ epsilonReg_15[7];
1678
   assign epsilonNew_16 [0] = epsilonReg_16[2] ^ epsilonReg_16[5] ^ epsilonReg_16[7];
1679
   assign epsilonNew_16 [1] = epsilonReg_16[3] ^ epsilonReg_16[6];
1680
   assign epsilonNew_16 [2] = epsilonReg_16[0] ^ epsilonReg_16[2] ^ epsilonReg_16[4] ^ epsilonReg_16[5];
1681
   assign epsilonNew_16 [3] = epsilonReg_16[0] ^ epsilonReg_16[1] ^ epsilonReg_16[2] ^ epsilonReg_16[3] ^ epsilonReg_16[6] ^ epsilonReg_16[7];
1682
   assign epsilonNew_16 [4] = epsilonReg_16[1] ^ epsilonReg_16[3] ^ epsilonReg_16[4] ^ epsilonReg_16[5];
1683
   assign epsilonNew_16 [5] = epsilonReg_16[2] ^ epsilonReg_16[4] ^ epsilonReg_16[5] ^ epsilonReg_16[6];
1684
   assign epsilonNew_16 [6] = epsilonReg_16[0] ^ epsilonReg_16[3] ^ epsilonReg_16[5] ^ epsilonReg_16[6] ^ epsilonReg_16[7];
1685
   assign epsilonNew_16 [7] = epsilonReg_16[1] ^ epsilonReg_16[4] ^ epsilonReg_16[6] ^ epsilonReg_16[7];
1686
   assign epsilonNew_17 [0] = epsilonReg_17[1] ^ epsilonReg_17[4] ^ epsilonReg_17[6] ^ epsilonReg_17[7];
1687
   assign epsilonNew_17 [1] = epsilonReg_17[2] ^ epsilonReg_17[5] ^ epsilonReg_17[7];
1688
   assign epsilonNew_17 [2] = epsilonReg_17[1] ^ epsilonReg_17[3] ^ epsilonReg_17[4] ^ epsilonReg_17[7];
1689
   assign epsilonNew_17 [3] = epsilonReg_17[0] ^ epsilonReg_17[1] ^ epsilonReg_17[2] ^ epsilonReg_17[5] ^ epsilonReg_17[6] ^ epsilonReg_17[7];
1690
   assign epsilonNew_17 [4] = epsilonReg_17[0] ^ epsilonReg_17[2] ^ epsilonReg_17[3] ^ epsilonReg_17[4];
1691
   assign epsilonNew_17 [5] = epsilonReg_17[1] ^ epsilonReg_17[3] ^ epsilonReg_17[4] ^ epsilonReg_17[5];
1692
   assign epsilonNew_17 [6] = epsilonReg_17[2] ^ epsilonReg_17[4] ^ epsilonReg_17[5] ^ epsilonReg_17[6];
1693
   assign epsilonNew_17 [7] = epsilonReg_17[0] ^ epsilonReg_17[3] ^ epsilonReg_17[5] ^ epsilonReg_17[6] ^ epsilonReg_17[7];
1694
   assign epsilonNew_18 [0] = epsilonReg_18[0] ^ epsilonReg_18[3] ^ epsilonReg_18[5] ^ epsilonReg_18[6] ^ epsilonReg_18[7];
1695
   assign epsilonNew_18 [1] = epsilonReg_18[1] ^ epsilonReg_18[4] ^ epsilonReg_18[6] ^ epsilonReg_18[7];
1696
   assign epsilonNew_18 [2] = epsilonReg_18[0] ^ epsilonReg_18[2] ^ epsilonReg_18[3] ^ epsilonReg_18[6];
1697
   assign epsilonNew_18 [3] = epsilonReg_18[0] ^ epsilonReg_18[1] ^ epsilonReg_18[4] ^ epsilonReg_18[5] ^ epsilonReg_18[6];
1698
   assign epsilonNew_18 [4] = epsilonReg_18[1] ^ epsilonReg_18[2] ^ epsilonReg_18[3];
1699
   assign epsilonNew_18 [5] = epsilonReg_18[0] ^ epsilonReg_18[2] ^ epsilonReg_18[3] ^ epsilonReg_18[4];
1700
   assign epsilonNew_18 [6] = epsilonReg_18[1] ^ epsilonReg_18[3] ^ epsilonReg_18[4] ^ epsilonReg_18[5];
1701
   assign epsilonNew_18 [7] = epsilonReg_18[2] ^ epsilonReg_18[4] ^ epsilonReg_18[5] ^ epsilonReg_18[6];
1702
   assign epsilonNew_19 [0] = epsilonReg_19[2] ^ epsilonReg_19[4] ^ epsilonReg_19[5] ^ epsilonReg_19[6];
1703
   assign epsilonNew_19 [1] = epsilonReg_19[0] ^ epsilonReg_19[3] ^ epsilonReg_19[5] ^ epsilonReg_19[6] ^ epsilonReg_19[7];
1704
   assign epsilonNew_19 [2] = epsilonReg_19[1] ^ epsilonReg_19[2] ^ epsilonReg_19[5] ^ epsilonReg_19[7];
1705
   assign epsilonNew_19 [3] = epsilonReg_19[0] ^ epsilonReg_19[3] ^ epsilonReg_19[4] ^ epsilonReg_19[5];
1706
   assign epsilonNew_19 [4] = epsilonReg_19[0] ^ epsilonReg_19[1] ^ epsilonReg_19[2];
1707
   assign epsilonNew_19 [5] = epsilonReg_19[1] ^ epsilonReg_19[2] ^ epsilonReg_19[3];
1708
   assign epsilonNew_19 [6] = epsilonReg_19[0] ^ epsilonReg_19[2] ^ epsilonReg_19[3] ^ epsilonReg_19[4];
1709
   assign epsilonNew_19 [7] = epsilonReg_19[1] ^ epsilonReg_19[3] ^ epsilonReg_19[4] ^ epsilonReg_19[5];
1710
   assign epsilonNew_20 [0] = epsilonReg_20[1] ^ epsilonReg_20[3] ^ epsilonReg_20[4] ^ epsilonReg_20[5];
1711
   assign epsilonNew_20 [1] = epsilonReg_20[2] ^ epsilonReg_20[4] ^ epsilonReg_20[5] ^ epsilonReg_20[6];
1712
   assign epsilonNew_20 [2] = epsilonReg_20[0] ^ epsilonReg_20[1] ^ epsilonReg_20[4] ^ epsilonReg_20[6] ^ epsilonReg_20[7];
1713
   assign epsilonNew_20 [3] = epsilonReg_20[2] ^ epsilonReg_20[3] ^ epsilonReg_20[4] ^ epsilonReg_20[7];
1714
   assign epsilonNew_20 [4] = epsilonReg_20[0] ^ epsilonReg_20[1];
1715
   assign epsilonNew_20 [5] = epsilonReg_20[0] ^ epsilonReg_20[1] ^ epsilonReg_20[2];
1716
   assign epsilonNew_20 [6] = epsilonReg_20[1] ^ epsilonReg_20[2] ^ epsilonReg_20[3];
1717
   assign epsilonNew_20 [7] = epsilonReg_20[0] ^ epsilonReg_20[2] ^ epsilonReg_20[3] ^ epsilonReg_20[4];
1718
   assign epsilonNew_21 [0] = epsilonReg_21[0] ^ epsilonReg_21[2] ^ epsilonReg_21[3] ^ epsilonReg_21[4];
1719
   assign epsilonNew_21 [1] = epsilonReg_21[1] ^ epsilonReg_21[3] ^ epsilonReg_21[4] ^ epsilonReg_21[5];
1720
   assign epsilonNew_21 [2] = epsilonReg_21[0] ^ epsilonReg_21[3] ^ epsilonReg_21[5] ^ epsilonReg_21[6];
1721
   assign epsilonNew_21 [3] = epsilonReg_21[1] ^ epsilonReg_21[2] ^ epsilonReg_21[3] ^ epsilonReg_21[6] ^ epsilonReg_21[7];
1722
   assign epsilonNew_21 [4] = epsilonReg_21[0] ^ epsilonReg_21[7];
1723
   assign epsilonNew_21 [5] = epsilonReg_21[0] ^ epsilonReg_21[1];
1724
   assign epsilonNew_21 [6] = epsilonReg_21[0] ^ epsilonReg_21[1] ^ epsilonReg_21[2];
1725
   assign epsilonNew_21 [7] = epsilonReg_21[1] ^ epsilonReg_21[2] ^ epsilonReg_21[3];
1726
   assign epsilonNew_22 [0] = epsilonReg_22[1] ^ epsilonReg_22[2] ^ epsilonReg_22[3];
1727
   assign epsilonNew_22 [1] = epsilonReg_22[0] ^ epsilonReg_22[2] ^ epsilonReg_22[3] ^ epsilonReg_22[4];
1728
   assign epsilonNew_22 [2] = epsilonReg_22[2] ^ epsilonReg_22[4] ^ epsilonReg_22[5];
1729
   assign epsilonNew_22 [3] = epsilonReg_22[0] ^ epsilonReg_22[1] ^ epsilonReg_22[2] ^ epsilonReg_22[5] ^ epsilonReg_22[6];
1730
   assign epsilonNew_22 [4] = epsilonReg_22[6] ^ epsilonReg_22[7];
1731
   assign epsilonNew_22 [5] = epsilonReg_22[0] ^ epsilonReg_22[7];
1732
   assign epsilonNew_22 [6] = epsilonReg_22[0] ^ epsilonReg_22[1];
1733
   assign epsilonNew_22 [7] = epsilonReg_22[0] ^ epsilonReg_22[1] ^ epsilonReg_22[2];
1734
 
1735
 
1736
 
1737
   //------------------------------------------------------------------
1738
   // + epsilonReg_0,..., epsilonReg_22
1739
   //- registers
1740
   //------------------------------------------------------------------
1741
   always @(posedge CLK or negedge RESET) begin
1742
      if (~RESET) begin
1743
         epsilonReg_0 [7:0]  <= 8'd0;
1744
         epsilonReg_1 [7:0]  <= 8'd0;
1745
         epsilonReg_2 [7:0]  <= 8'd0;
1746
         epsilonReg_3 [7:0]  <= 8'd0;
1747
         epsilonReg_4 [7:0]  <= 8'd0;
1748
         epsilonReg_5 [7:0]  <= 8'd0;
1749
         epsilonReg_6 [7:0]  <= 8'd0;
1750
         epsilonReg_7 [7:0]  <= 8'd0;
1751
         epsilonReg_8 [7:0]  <= 8'd0;
1752
         epsilonReg_9 [7:0]  <= 8'd0;
1753
         epsilonReg_10 [7:0] <= 8'd0;
1754
         epsilonReg_11 [7:0] <= 8'd0;
1755
         epsilonReg_12 [7:0] <= 8'd0;
1756
         epsilonReg_13 [7:0] <= 8'd0;
1757
         epsilonReg_14 [7:0] <= 8'd0;
1758
         epsilonReg_15 [7:0] <= 8'd0;
1759
         epsilonReg_16 [7:0] <= 8'd0;
1760
         epsilonReg_17 [7:0] <= 8'd0;
1761
         epsilonReg_18 [7:0] <= 8'd0;
1762
         epsilonReg_19 [7:0] <= 8'd0;
1763
         epsilonReg_20 [7:0] <= 8'd0;
1764
         epsilonReg_21 [7:0] <= 8'd0;
1765
         epsilonReg_22 [7:0] <= 8'd0;
1766
      end
1767
      else if (enable == 1'b1) begin
1768
         if (sync == 1'b1) begin
1769
            epsilonReg_0 [7:0]  <= epsilonIni_0 [7:0];
1770
            epsilonReg_1 [7:0]  <= epsilonIni_1 [7:0];
1771
            epsilonReg_2 [7:0]  <= epsilonIni_2 [7:0];
1772
            epsilonReg_3 [7:0]  <= epsilonIni_3 [7:0];
1773
            epsilonReg_4 [7:0]  <= epsilonIni_4 [7:0];
1774
            epsilonReg_5 [7:0]  <= epsilonIni_5 [7:0];
1775
            epsilonReg_6 [7:0]  <= epsilonIni_6 [7:0];
1776
            epsilonReg_7 [7:0]  <= epsilonIni_7 [7:0];
1777
            epsilonReg_8 [7:0]  <= epsilonIni_8 [7:0];
1778
            epsilonReg_9 [7:0]  <= epsilonIni_9 [7:0];
1779
            epsilonReg_10 [7:0] <= epsilonIni_10 [7:0];
1780
            epsilonReg_11 [7:0] <= epsilonIni_11 [7:0];
1781
            epsilonReg_12 [7:0] <= epsilonIni_12 [7:0];
1782
            epsilonReg_13 [7:0] <= epsilonIni_13 [7:0];
1783
            epsilonReg_14 [7:0] <= epsilonIni_14 [7:0];
1784
            epsilonReg_15 [7:0] <= epsilonIni_15 [7:0];
1785
            epsilonReg_16 [7:0] <= epsilonIni_16 [7:0];
1786
            epsilonReg_17 [7:0] <= epsilonIni_17 [7:0];
1787
            epsilonReg_18 [7:0] <= epsilonIni_18 [7:0];
1788
            epsilonReg_19 [7:0] <= epsilonIni_19 [7:0];
1789
            epsilonReg_20 [7:0] <= epsilonIni_20 [7:0];
1790
            epsilonReg_21 [7:0] <= epsilonIni_21 [7:0];
1791
            epsilonReg_22 [7:0] <= epsilonIni_22 [7:0];
1792
         end
1793
         else begin
1794
            epsilonReg_0 [7:0]  <= epsilonNew_0 [7:0];
1795
            epsilonReg_1 [7:0]  <= epsilonNew_1 [7:0];
1796
            epsilonReg_2 [7:0]  <= epsilonNew_2 [7:0];
1797
            epsilonReg_3 [7:0]  <= epsilonNew_3 [7:0];
1798
            epsilonReg_4 [7:0]  <= epsilonNew_4 [7:0];
1799
            epsilonReg_5 [7:0]  <= epsilonNew_5 [7:0];
1800
            epsilonReg_6 [7:0]  <= epsilonNew_6 [7:0];
1801
            epsilonReg_7 [7:0]  <= epsilonNew_7 [7:0];
1802
            epsilonReg_8 [7:0]  <= epsilonNew_8 [7:0];
1803
            epsilonReg_9 [7:0]  <= epsilonNew_9 [7:0];
1804
            epsilonReg_10 [7:0] <= epsilonNew_10 [7:0];
1805
            epsilonReg_11 [7:0] <= epsilonNew_11 [7:0];
1806
            epsilonReg_12 [7:0] <= epsilonNew_12 [7:0];
1807
            epsilonReg_13 [7:0] <= epsilonNew_13 [7:0];
1808
            epsilonReg_14 [7:0] <= epsilonNew_14 [7:0];
1809
            epsilonReg_15 [7:0] <= epsilonNew_15 [7:0];
1810
            epsilonReg_16 [7:0] <= epsilonNew_16 [7:0];
1811
            epsilonReg_17 [7:0] <= epsilonNew_17 [7:0];
1812
            epsilonReg_18 [7:0] <= epsilonNew_18 [7:0];
1813
            epsilonReg_19 [7:0] <= epsilonNew_19 [7:0];
1814
            epsilonReg_20 [7:0] <= epsilonNew_20 [7:0];
1815
            epsilonReg_21 [7:0] <= epsilonNew_21 [7:0];
1816
            epsilonReg_22 [7:0] <= epsilonNew_22 [7:0];
1817
         end
1818
      end
1819
   end
1820
 
1821
 
1822
 
1823
   //------------------------------------------------------------------------
1824
   // Generate Error Pattern: Lambda
1825
   //------------------------------------------------------------------------
1826
   always @( lambdaReg_0   or lambdaReg_1   or lambdaReg_2   or lambdaReg_3   or lambdaReg_4   or lambdaReg_5   or lambdaReg_6   or lambdaReg_7   or lambdaReg_8   or lambdaReg_9   or lambdaReg_10   or lambdaReg_11   or lambdaReg_12   or lambdaReg_13   or lambdaReg_14   or lambdaReg_15   or lambdaReg_16   or lambdaReg_17   or lambdaReg_18   or lambdaReg_19   or lambdaReg_20   or lambdaReg_21 ) begin
1827
      lambdaSum [7:0] = lambdaReg_0[7:0]   ^ lambdaReg_1[7:0]   ^ lambdaReg_2[7:0]   ^ lambdaReg_3[7:0]   ^ lambdaReg_4[7:0]   ^ lambdaReg_5[7:0]   ^ lambdaReg_6[7:0]   ^ lambdaReg_7[7:0]   ^ lambdaReg_8[7:0]   ^ lambdaReg_9[7:0]   ^ lambdaReg_10[7:0]   ^ lambdaReg_11[7:0]   ^ lambdaReg_12[7:0]   ^ lambdaReg_13[7:0]   ^ lambdaReg_14[7:0]   ^ lambdaReg_15[7:0]   ^ lambdaReg_16[7:0]   ^ lambdaReg_17[7:0]   ^ lambdaReg_18[7:0]   ^ lambdaReg_19[7:0]   ^ lambdaReg_20[7:0]   ^ lambdaReg_21[7:0];
1828
      lambdaEven [7:0] = lambdaReg_0[7:0]   ^ lambdaReg_2[7:0]   ^ lambdaReg_4[7:0]   ^ lambdaReg_6[7:0]   ^ lambdaReg_8[7:0]   ^ lambdaReg_10[7:0]   ^ lambdaReg_12[7:0]   ^ lambdaReg_14[7:0]   ^ lambdaReg_16[7:0]   ^ lambdaReg_18[7:0]   ^ lambdaReg_20[7:0];
1829
      lambdaOdd [7:0] =  lambdaReg_1[7:0]   ^ lambdaReg_3[7:0]   ^ lambdaReg_5[7:0]   ^ lambdaReg_7[7:0]   ^ lambdaReg_9[7:0]   ^ lambdaReg_11[7:0]   ^ lambdaReg_13[7:0]   ^ lambdaReg_15[7:0]   ^ lambdaReg_17[7:0]   ^ lambdaReg_19[7:0]   ^ lambdaReg_21[7:0];
1830
   end
1831
 
1832
 
1833
 
1834
   //------------------------------------------------------------------------
1835
   // Generate Error Pattern: Omega
1836
   //------------------------------------------------------------------------
1837
   always @( omegaReg_0   or omegaReg_1   or omegaReg_2   or omegaReg_3   or omegaReg_4   or omegaReg_5   or omegaReg_6   or omegaReg_7   or omegaReg_8   or omegaReg_9   or omegaReg_10   or omegaReg_11   or omegaReg_12   or omegaReg_13   or omegaReg_14   or omegaReg_15   or omegaReg_16   or omegaReg_17   or omegaReg_18   or omegaReg_19   or omegaReg_20   or omegaReg_21 ) begin
1838
      omegaSum [7:0] = omegaReg_0[7:0]   ^ omegaReg_1[7:0]   ^ omegaReg_2[7:0]   ^ omegaReg_3[7:0]   ^ omegaReg_4[7:0]   ^ omegaReg_5[7:0]   ^ omegaReg_6[7:0]   ^ omegaReg_7[7:0]   ^ omegaReg_8[7:0]   ^ omegaReg_9[7:0]   ^ omegaReg_10[7:0]   ^ omegaReg_11[7:0]   ^ omegaReg_12[7:0]   ^ omegaReg_13[7:0]   ^ omegaReg_14[7:0]   ^ omegaReg_15[7:0]   ^ omegaReg_16[7:0]   ^ omegaReg_17[7:0]   ^ omegaReg_18[7:0]   ^ omegaReg_19[7:0]   ^ omegaReg_20[7:0]   ^ omegaReg_21[7:0];
1839
   end
1840
 
1841
 
1842
 
1843
   //------------------------------------------------------------------------
1844
   //- Generate Error Pattern: Epsilon
1845
   //------------------------------------------------------------------------
1846
   always @( epsilonReg_0   or epsilonReg_1   or epsilonReg_2   or epsilonReg_3   or epsilonReg_4   or epsilonReg_5   or epsilonReg_6   or epsilonReg_7   or epsilonReg_8   or epsilonReg_9   or epsilonReg_10   or epsilonReg_11   or epsilonReg_12   or epsilonReg_13   or epsilonReg_14   or epsilonReg_15   or epsilonReg_16   or epsilonReg_17   or epsilonReg_18   or epsilonReg_19   or epsilonReg_20   or epsilonReg_21   or epsilonReg_22 ) begin
1847
      epsilonSum [7:0] = epsilonReg_0[7:0]   ^ epsilonReg_1[7:0]   ^ epsilonReg_2[7:0]   ^ epsilonReg_3[7:0]   ^ epsilonReg_4[7:0]   ^ epsilonReg_5[7:0]   ^ epsilonReg_6[7:0]   ^ epsilonReg_7[7:0]   ^ epsilonReg_8[7:0]   ^ epsilonReg_9[7:0]   ^ epsilonReg_10[7:0]   ^ epsilonReg_11[7:0]   ^ epsilonReg_12[7:0]   ^ epsilonReg_13[7:0]   ^ epsilonReg_14[7:0]   ^ epsilonReg_15[7:0]   ^ epsilonReg_16[7:0]   ^ epsilonReg_17[7:0]   ^ epsilonReg_18[7:0]   ^ epsilonReg_19[7:0]   ^ epsilonReg_20[7:0]   ^ epsilonReg_21[7:0]   ^ epsilonReg_22[7:0];
1848
      epsilonOdd [7:0] =  epsilonReg_1[7:0]   ^ epsilonReg_3[7:0]   ^ epsilonReg_5[7:0]   ^ epsilonReg_7[7:0]   ^ epsilonReg_9[7:0]   ^ epsilonReg_11[7:0]   ^ epsilonReg_13[7:0]   ^ epsilonReg_15[7:0]   ^ epsilonReg_17[7:0]   ^ epsilonReg_19[7:0]   ^ epsilonReg_21[7:0];
1849
   end
1850
 
1851
 
1852
 
1853
   //------------------------------------------------------------------------
1854
   //- RsDecodeMult instantiation, RsDecodeMult_MuldE0 && RsDecodeMult_MuldE1
1855
   //------------------------------------------------------------------------
1856
   RsDecodeMult RsDecodeMult_MuldE0 (.A(lambdaOddReg[7:0]), .B(epsilonSumReg[7:0]), .P(denomE0[7:0]));
1857
   RsDecodeMult RsDecodeMult_MuldE1 (.A(lambdaSumReg[7:0]), .B(epsilonOddReg[7:0]), .P(denomE1[7:0]));
1858
 
1859
 
1860
   //------------------------------------------------------------------------
1861
   //- RsDecodeInv instantiation, RsDecodeInv_InvE0 && RsDecodeInv_InvE1
1862
   //------------------------------------------------------------------------
1863
   RsDecodeInv RsDecodeInv_InvE0 (.B(denomE0Reg[7:0]), .R(denomE0Inv[7:0]));
1864
   RsDecodeInv RsDecodeInv_InvE1 (.B(denomE1Reg[7:0]), .R(denomE1Inv[7:0]));
1865
 
1866
 
1867
   //------------------------------------------------------------------------
1868
   //- RsDecodeMult instantiation, RsDecodeMult_MulE0 && RsDecodeMult_MulE1 
1869
   //------------------------------------------------------------------------
1870
   RsDecodeMult RsDecodeMult_MulE0 (.A(numeReg2[7:0]), .B(denomE0InvReg[7:0]), .P(errorValueE0[7:0]));
1871
   RsDecodeMult RsDecodeMult_MulE1 (.A(numeReg2[7:0]), .B(denomE1InvReg[7:0]), .P(errorValueE1[7:0]));
1872
 
1873
 
1874
 
1875
 
1876
   //------------------------------------------------------------------------
1877
   // + lambdaSumReg, denomE1Reg, denomE1InvReg, epsilonSumReg, epsilonOddReg
1878
   // + lambdaEvenReg, lambdaEvenReg2, lambdaEvenReg3, lambdaOddReg, lambdaOddReg2, lambdaOddReg3, denomE0Reg, denomE0InvReg
1879
   // + omegaSumReg, numeReg, numeReg2
1880
   //------------------------------------------------------------------------
1881
   always @(posedge CLK or negedge RESET) begin
1882
      if (~RESET) begin
1883
         lambdaSumReg   [7:0] <= 8'd0;
1884
         lambdaEvenReg  [7:0] <= 8'd0;
1885
         lambdaEvenReg2 [7:0] <= 8'd0;
1886
         lambdaEvenReg3 [7:0] <= 8'd0;
1887
         lambdaOddReg   [7:0] <= 8'd0;
1888
         lambdaOddReg2  [7:0] <= 8'd0;
1889
         lambdaOddReg3  [7:0] <= 8'd0;
1890
         denomE0Reg     [7:0] <= 8'd0;
1891
         denomE1Reg     [7:0] <= 8'd0;
1892
         denomE0InvReg  [7:0] <= 8'd0;
1893
         denomE1InvReg  [7:0] <= 8'd0;
1894
         omegaSumReg    [7:0] <= 8'd0;
1895
         numeReg        [7:0] <= 8'd0;
1896
         numeReg2       [7:0] <= 8'd0;
1897
         epsilonSumReg  [7:0] <= 8'd0;
1898
         epsilonOddReg  [7:0] <= 8'd0;
1899
      end
1900
      else if (enable == 1'b1) begin
1901
         lambdaSumReg   <= lambdaSum;
1902
         lambdaEvenReg3 <= lambdaEvenReg2;
1903
         lambdaEvenReg2 <= lambdaEvenReg;
1904
         lambdaEvenReg  <= lambdaEven;
1905
         lambdaOddReg3  <= lambdaOddReg2;
1906
         lambdaOddReg2  <= lambdaOddReg;
1907
         lambdaOddReg   <= lambdaOdd;
1908
         denomE0Reg     <= denomE0;
1909
         denomE1Reg     <= denomE1;
1910
         denomE0InvReg  <= denomE0Inv;
1911
         denomE1InvReg  <= denomE1Inv;
1912
         numeReg2       <= numeReg;
1913
         numeReg        <= omegaSumReg;
1914
         omegaSumReg    <= omegaSum;
1915
         epsilonSumReg  <= epsilonSum;
1916
         epsilonOddReg  <= epsilonOdd;
1917
      end
1918
   end
1919
 
1920
 
1921
 
1922
   //------------------------------------------------------------------
1923
   // + errorOut
1924
   //- 
1925
   //------------------------------------------------------------------
1926
   reg   [7:0]  errorOut;
1927
   always @(erasureIn or lambdaEvenReg3 or lambdaOddReg3 or errorValueE0 or errorValueE1) begin
1928
      if (erasureIn == 1'b1) begin
1929
         errorOut = errorValueE1;
1930
      end
1931
      else if (lambdaEvenReg3 == lambdaOddReg3) begin
1932
         errorOut = errorValueE0;
1933
      end
1934
      else begin
1935
         errorOut = 8'd0;
1936
      end
1937
   end
1938
 
1939
 
1940
 
1941
   //------------------------------------------------------------------------
1942
   // + numErrorReg
1943
   //- Count Error
1944
   //------------------------------------------------------------------------
1945
   reg    [4:0]   numErrorReg;
1946
   always @(posedge CLK or negedge RESET) begin
1947
      if (~RESET) begin
1948
         numErrorReg [4:0]   <= 5'd0;
1949
      end
1950
      else if (enable == 1'b1) begin
1951
         if (sync == 1'b1) begin
1952
            numErrorReg <= 5'd0;
1953
         end
1954
         else if (lambdaEven == lambdaOdd) begin
1955
            numErrorReg <= numErrorReg + 5'd1;
1956
         end
1957
      end
1958
   end
1959
 
1960
 
1961
 
1962
   //------------------------------------------------------------------
1963
   // + numErrorReg2
1964
   //------------------------------------------------------------------
1965
   reg    [4:0]   numErrorReg2;
1966
   always @(posedge CLK or negedge RESET) begin
1967
      if (~RESET) begin
1968
         numErrorReg2 <=  5'd0;
1969
      end
1970
      else if ((enable == 1'b1) && (doneOrg == 1'b1)) begin
1971
         if (lambdaEven == lambdaOdd) begin
1972
            numErrorReg2 <= numErrorReg + 5'd1;
1973
         end
1974
         else begin
1975
            numErrorReg2 <= numErrorReg;
1976
         end
1977
      end
1978
   end
1979
   //------------------------------------------------------------------------
1980
   //- Output Ports
1981
   //------------------------------------------------------------------------
1982
   assign   numError = numErrorReg2;
1983
 
1984
 
1985
endmodule

powered by: WebSVN 2.1.0

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