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/] [source/] [RsEncodeMakeData.cpp] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 issei
//===================================================================
2
// Module Name : RsEncodeMakeData
3
// File Name   : RsEncodeMakeData.cpp
4
// Function    : RTL Encoder data maker
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
#include <stdio.h>
15
#include <stdlib.h>
16
#include <ctime>
17
#include <string.h>
18
 
19
FILE  *OutFileRsEncIn;
20
FILE  *OutFileRsEncOut;
21
 
22
void RsGfMultiplier( int*, int*,int*, int, int);
23
 
24
 
25
void RsEncodeMakeData(int DataSize, int TotalSize, int PrimPoly, int bitSymbol, int ErasureOption, int BlockAmount, int ErrorRate, int *coeffTab , int *MrefTab, int *PrefTab, int errorStats, int passFailFlag, int delayDataIn, int encDecMode, int PowerErrorRate, int ErasureRate, int PowerErasureRate, int decBlockAmount, int pathFlag, int lengthPath, char *rootFolderPath) {
26
 
27
 
28
   //---------------------------------------------------------------
29
   // c++ variables
30
   //---------------------------------------------------------------
31
   int syndromeLength;
32
   int ii,jj,kk, loop;
33
   int bbb;
34
   int sync_flag;
35
   int bidonTabSize;
36
   int symbolMax;
37
   int feedback;
38
   int zz;
39
   int rsLoop;
40
   int mmTabSize = (bitSymbol*2) -1;
41
   int Pidx;
42
   int init;
43
   int idx2;
44
   int idx1;
45
   int tempNum;
46
 
47
 
48
   syndromeLength = TotalSize - DataSize;
49
 
50
   //---------------------------------------------------------------
51
   // calculate bidonTabSize
52
   //---------------------------------------------------------------
53
   bidonTabSize = 1;
54
   for (ii=0;ii<(bitSymbol);ii++){
55
      bidonTabSize= 2* bidonTabSize;
56
   }
57
 
58
   symbolMax = bidonTabSize;
59
   bidonTabSize= bitSymbol* bidonTabSize;
60
 
61
 
62
   //---------------------------------------------------------------
63
   // c++ variables
64
   //---------------------------------------------------------------
65
   int *dataIn;
66
   int *ttTab;
67
   int *bbTab;
68
   int *ppTab;
69
   int *bidon;
70
   int *bidonTab0;
71
   int *bidonTab1;
72
   int *bidonTab2;
73
   int *bidonTab3;
74
   int *bidonTab4;
75
   int *bidonTab5;
76
   int *bidonTab6;
77
   int *bidonTab7;
78
   int *bidonTab8;
79
   int *bidonTab9;
80
   int *bidonTab10;
81
   int *bidonTab11;
82
   int *feedbackTab;
83
   int *productTab;
84
   int *genCoeffTab;
85
   int *syndromeRegTab;
86
   int *redundancySymbols;
87
   int *powerTab;
88
 
89
   char *strRsEncIn;
90
   char *strRsEncOut;
91
 
92
 
93
   dataIn            = new int[DataSize];
94
   ttTab             = new int[bitSymbol];
95
   bbTab             = new int[bitSymbol];
96
   ppTab             = new int[bitSymbol];
97
   bidon             = new int[bitSymbol];
98
   bidonTab0         = new int[bidonTabSize];
99
   bidonTab1         = new int[bidonTabSize];
100
   bidonTab2         = new int[bidonTabSize];
101
   bidonTab3         = new int[bidonTabSize];
102
   bidonTab4         = new int[bidonTabSize];
103
   bidonTab5         = new int[bidonTabSize];
104
   bidonTab6         = new int[bidonTabSize];
105
   bidonTab7         = new int[bidonTabSize];
106
   bidonTab8         = new int[bidonTabSize];
107
   bidonTab9         = new int[bidonTabSize];
108
   bidonTab10        = new int[bidonTabSize];
109
   bidonTab11        = new int[bidonTabSize];
110
   feedbackTab       = new int[bitSymbol];
111
   productTab        = new int[bitSymbol];
112
   genCoeffTab       = new int[bitSymbol];
113
   syndromeRegTab    = new int[symbolMax*bitSymbol];
114
   redundancySymbols = new int[symbolMax];
115
   powerTab          = new int[bitSymbol];
116
 
117
 
118
   //---------------------------------------------------------------
119
   // create string
120
   //---------------------------------------------------------------
121
//   char buffer1 [100];
122
//   char buffer2 [100];
123
//   int n1,n2;
124
//   n1=sprintf (buffer1, "RsEncIn_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d.hex", DataSize, TotalSize, PrimPoly, ErasureOption,decBlockAmount, ErrorRate, PowerErrorRate, ErasureRate, PowerErasureRate, bitSymbol,errorStats, passFailFlag, delayDataIn, encDecMode, BlockAmount);
125
//   n2=sprintf (buffer2, "RsEncOut_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d.hex", DataSize, TotalSize, PrimPoly, ErasureOption,decBlockAmount, ErrorRate, PowerErrorRate, ErasureRate, PowerErasureRate, bitSymbol,errorStats, passFailFlag, delayDataIn, encDecMode, BlockAmount);
126
//   n1=sprintf (buffer1, "./sim/RsEncIn_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d.hex", DataSize, TotalSize, PrimPoly, ErasureOption,decBlockAmount, ErrorRate, PowerErrorRate, ErasureRate, PowerErasureRate, bitSymbol,errorStats, passFailFlag, delayDataIn, encDecMode, BlockAmount);
127
//   n2=sprintf (buffer2, "./sim/RsEncOut_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d_%d.hex", DataSize, TotalSize, PrimPoly, ErasureOption,decBlockAmount, ErrorRate, PowerErrorRate, ErasureRate, PowerErasureRate, bitSymbol,errorStats, passFailFlag, delayDataIn, encDecMode, BlockAmount);
128
 
129
//   n1=sprintf (buffer1, "./sim/RsEncIn.hex");
130
//   n2=sprintf (buffer2, "./sim/RsEncOut.hex");
131
 
132
   //---------------------------------------------------------------
133
   // open file
134
   //---------------------------------------------------------------
135
  strRsEncIn = (char *)calloc(lengthPath + 18,  sizeof(char));
136
  if (pathFlag == 0) {
137
        strRsEncIn[0] = '.';
138
  }else{
139
     for(ii=0; ii<lengthPath; ii++){
140
        strRsEncIn[ii] = rootFolderPath[ii];
141
     }
142
  }
143
  strcat(strRsEncIn, "/sim/RsEncIn.hex");
144
 
145
 
146
  strRsEncOut = (char *)calloc(lengthPath + 19,  sizeof(char));
147
  if (pathFlag == 0) {
148
        strRsEncOut[0] = '.';
149
  }else{
150
     for(ii=0; ii<lengthPath; ii++){
151
        strRsEncOut[ii] = rootFolderPath[ii];
152
     }
153
  }
154
  strcat(strRsEncOut, "/sim/RsEncOut.hex");
155
 
156
 
157
  OutFileRsEncIn  = fopen(strRsEncIn,"w");
158
  OutFileRsEncOut = fopen(strRsEncOut,"w");
159
 
160
 
161
   //---------------------------------------------------------------
162
   // random generator (Time based)
163
   //---------------------------------------------------------------
164
   srand (time (NULL));
165
 
166
 
167
   //---------------------------------------------------------------
168
   // write Headers
169
   //---------------------------------------------------------------
170
   fprintf(OutFileRsEncIn, "// SYNC, ENABLE, DATA[7:0]\n");
171
   fprintf(OutFileRsEncOut, "// DATA[7:0]\n");
172
 
173
 
174
   //------------------------------------------------------------------------
175
   // initialize feedbackTab, productTab, genCoeffTab
176
   //------------------------------------------------------------------------
177
   for (ii=0;ii<(bitSymbol);ii++){
178
      feedbackTab [ii] = 0;
179
      productTab [ii] = 0;
180
      genCoeffTab [ii] = 0;
181
   }
182
 
183
 
184
   //------------------------------------------------------------------------
185
   //initialize ttTab
186
   //------------------------------------------------------------------------
187
   ttTab[0] = 1;
188
 
189
   for (ii=1;ii<bitSymbol;ii++){
190
      ttTab[ii] = 0;
191
   }
192
 
193
 
194
   //------------------------------------------------------------------------
195
   // initialize bbTab
196
   //------------------------------------------------------------------------
197
   bbTab[0] = 0;
198
   bbTab[1] = 1;
199
   for (ii=2;ii<bitSymbol;ii++){
200
      bbTab[ii] = 0;
201
   }
202
 
203
 
204
   //------------------------------------------------------------------------
205
   // initialize LoopSize
206
   //------------------------------------------------------------------------
207
   int LoopSize;
208
   LoopSize = 2;
209
   for(ii=0; ii<(bitSymbol-1); ii++){
210
      LoopSize = LoopSize*2;
211
   }
212
 
213
 
214
   //---------------------------------------------------------------
215
   // initialize powerTab
216
   //---------------------------------------------------------------
217
   powerTab[0] = 1;
218
   for (ii=1; ii<bitSymbol;ii++){
219
      powerTab[ii] = 2*powerTab[ii-1];
220
   }
221
 
222
 
223
   //------------------------------------------------------------------------
224
   // 
225
   //------------------------------------------------------------------------
226
   for(ii=0; ii<(LoopSize-1); ii++){
227
 
228
      //------------------------------------------------------------------------
229
      // Galois Field Multiplier
230
      //------------------------------------------------------------------------
231
      RsGfMultiplier(ppTab, ttTab, bbTab, PrimPoly, bitSymbol);
232
 
233
 
234
      //------------------------------------------------------------------------
235
      // assign multiplier results
236
      //------------------------------------------------------------------------
237
      for (jj=0;jj<bitSymbol;jj++){
238
         ttTab[jj] = ppTab[jj];
239
      }
240
 
241
 
242
      //------------------------------------------------------------------------
243
      // write P_OUT[0]
244
      //------------------------------------------------------------------------
245
      for (Pidx=0; Pidx<bitSymbol; Pidx++){
246
         init = 0;
247
 
248
         for (idx2=0; idx2<bitSymbol;idx2++){
249
            bidon [idx2] = 0;
250
         }
251
         for (idx1=0; idx1<mmTabSize;idx1++){
252
            tempNum = PrefTab [Pidx*mmTabSize+idx1];
253
            if (tempNum == 1) {
254
               //------------------------------------------------------------------------
255
               // search
256
               //------------------------------------------------------------------------
257
               for (idx2=0; idx2<bitSymbol;idx2++){
258
                  tempNum = MrefTab[idx1*bitSymbol+idx2];
259
                  if ((tempNum > 0) && (ttTab[tempNum-1] == 1)) {
260
                     if  (bidon [idx2] == 0) {
261
                        bidon [idx2] = 1;
262
                     }
263
                     else {
264
                        bidon [idx2] = 0;
265
                     }
266
                  }
267
               }
268
            }
269
         }
270
 
271
 
272
         if (Pidx==0) {
273
            for (jj=0;jj<bitSymbol;jj++){
274
               bidonTab0[ii*bitSymbol+jj] = bidon[jj];
275
            }
276
         }
277
         if (Pidx==1) {
278
            for (jj=0;jj<bitSymbol;jj++){
279
               bidonTab1[ii*bitSymbol+jj] = bidon[jj];
280
            }
281
         }
282
         if (Pidx==2) {
283
            for (jj=0;jj<bitSymbol;jj++){
284
               bidonTab2[ii*bitSymbol+jj] = bidon[jj];
285
            }
286
         }
287
         if (Pidx==3) {
288
            for (jj=0;jj<bitSymbol;jj++){
289
               bidonTab3[ii*bitSymbol+jj] = bidon[jj];
290
            }
291
         }
292
         if (Pidx==4) {
293
            for (jj=0;jj<bitSymbol;jj++){
294
               bidonTab4[ii*bitSymbol+jj] = bidon[jj];
295
            }
296
         }
297
         if (Pidx==5) {
298
            for (jj=0;jj<bitSymbol;jj++){
299
               bidonTab5[ii*bitSymbol+jj] = bidon[jj];
300
            }
301
         }
302
         if (Pidx==6) {
303
            for (jj=0;jj<bitSymbol;jj++){
304
               bidonTab6[ii*bitSymbol+jj] = bidon[jj];
305
            }
306
         }
307
         if (Pidx==7) {
308
            for (jj=0;jj<bitSymbol;jj++){
309
               bidonTab7[ii*bitSymbol+jj] = bidon[jj];
310
            }
311
         }
312
 
313
         if (Pidx==8) {
314
            for (jj=0;jj<bitSymbol;jj++){
315
               bidonTab8[ii*bitSymbol+jj] = bidon[jj];
316
            }
317
         }
318
         if (Pidx==9) {
319
            for (jj=0;jj<bitSymbol;jj++){
320
               bidonTab9[ii*bitSymbol+jj] = bidon[jj];
321
            }
322
         }
323
         if (Pidx==10) {
324
            for (jj=0;jj<bitSymbol;jj++){
325
               bidonTab10[ii*bitSymbol+jj] = bidon[jj];
326
            }
327
         }
328
         if (Pidx==11) {
329
            for (jj=0;jj<bitSymbol;jj++){
330
               bidonTab11[ii*bitSymbol+jj] = bidon[jj];
331
            }
332
         }
333
 
334
      }
335
   }
336
 
337
 
338
   //---------------------------------------------------------------
339
   // RSEncode codewords construction
340
   //---------------------------------------------------------------
341
   for (loop=0; loop<BlockAmount;loop++){
342
 
343
      //---------------------------------------------------------------
344
      // Input data generation
345
      //---------------------------------------------------------------
346
      for (ii=0; ii<DataSize;ii++){
347
         bbb = rand () & ((1 << bitSymbol) - 1);
348
         if (bbb == symbolMax) {
349
            bbb = symbolMax-1;
350
         }
351
         dataIn [ii] = bbb;
352
      }
353
 
354
      //---------------------------------------------------------------
355
      // Rs Encoder Data calculation
356
      //---------------------------------------------------------------
357
      for (rsLoop=0;rsLoop<DataSize; rsLoop++) {
358
         //---------------------------------------------------------------
359
         // assign feedback
360
         //---------------------------------------------------------------
361
         feedback = dataIn [rsLoop];
362
         // convert feedback to binary
363
         for (zz =(bitSymbol-1); zz>=0;zz--) {
364
            if (feedback >= powerTab[zz]) {
365
               feedback = feedback -powerTab[zz];
366
               feedbackTab[zz] = 1;
367
            }else{
368
               feedbackTab[zz] = 0;
369
            }
370
         }
371
 
372
         if (rsLoop > 0) {
373
            for (zz=0;zz<bitSymbol;zz++){
374
               feedbackTab[zz] = feedbackTab[zz] ^ syndromeRegTab[(syndromeLength-1)*bitSymbol+zz];
375
            }
376
         }
377
 
378
 
379
         //---------------------------------------------------------------
380
         // multiply feedback by genCoeffTab
381
         //---------------------------------------------------------------
382
         for (zz =syndromeLength-1; zz>=0;zz--) {
383
            if (coeffTab[zz] > 0) {
384
               tempNum =coeffTab[zz]-1;
385
               switch(bitSymbol){
386
                  case (3):
387
                  productTab[0] = (bidonTab0[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab0[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab0[tempNum*bitSymbol+2] & feedbackTab[2]);
388
                  productTab[1] = (bidonTab1[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab1[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab1[tempNum*bitSymbol+2] & feedbackTab[2]);
389
                  productTab[2] = (bidonTab2[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab2[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab2[tempNum*bitSymbol+2] & feedbackTab[2]);
390
                  break;
391
                  case (4):
392
                  productTab[0] = (bidonTab0[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab0[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab0[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab0[tempNum*bitSymbol+3] & feedbackTab[3]);
393
                  productTab[1] = (bidonTab1[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab1[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab1[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab1[tempNum*bitSymbol+3] & feedbackTab[3]);
394
                  productTab[2] = (bidonTab2[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab2[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab2[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab2[tempNum*bitSymbol+3] & feedbackTab[3]);
395
                  productTab[3] = (bidonTab3[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab3[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab3[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab3[tempNum*bitSymbol+3] & feedbackTab[3]);
396
                  break;
397
                  case (5):
398
                  productTab[0] = (bidonTab0[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab0[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab0[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab0[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab0[tempNum*bitSymbol+4] & feedbackTab[4]);
399
                  productTab[1] = (bidonTab1[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab1[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab1[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab1[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab1[tempNum*bitSymbol+4] & feedbackTab[4]);
400
                  productTab[2] = (bidonTab2[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab2[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab2[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab2[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab2[tempNum*bitSymbol+4] & feedbackTab[4]);
401
                  productTab[3] = (bidonTab3[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab3[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab3[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab3[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab3[tempNum*bitSymbol+4] & feedbackTab[4]);
402
                  productTab[4] = (bidonTab4[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab4[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab4[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab4[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab4[tempNum*bitSymbol+4] & feedbackTab[4]);
403
                  break;
404
                  case (6):
405
                  productTab[0] = (bidonTab0[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab0[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab0[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab0[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab0[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab0[tempNum*bitSymbol+5] & feedbackTab[5]);
406
                  productTab[1] = (bidonTab1[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab1[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab1[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab1[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab1[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab1[tempNum*bitSymbol+5] & feedbackTab[5]);
407
                  productTab[2] = (bidonTab2[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab2[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab2[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab2[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab2[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab2[tempNum*bitSymbol+5] & feedbackTab[5]);
408
                  productTab[3] = (bidonTab3[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab3[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab3[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab3[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab3[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab3[tempNum*bitSymbol+5] & feedbackTab[5]);
409
                  productTab[4] = (bidonTab4[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab4[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab4[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab4[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab4[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab4[tempNum*bitSymbol+5] & feedbackTab[5]);
410
                  productTab[5] = (bidonTab5[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab5[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab5[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab5[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab5[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab5[tempNum*bitSymbol+5] & feedbackTab[5]);
411
                  break;
412
                  case (7):
413
                  productTab[0] = (bidonTab0[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab0[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab0[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab0[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab0[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab0[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab0[tempNum*bitSymbol+6] & feedbackTab[6]);
414
                  productTab[1] = (bidonTab1[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab1[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab1[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab1[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab1[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab1[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab1[tempNum*bitSymbol+6] & feedbackTab[6]);
415
                  productTab[2] = (bidonTab2[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab2[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab2[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab2[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab2[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab2[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab2[tempNum*bitSymbol+6] & feedbackTab[6]);
416
                  productTab[3] = (bidonTab3[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab3[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab3[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab3[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab3[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab3[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab3[tempNum*bitSymbol+6] & feedbackTab[6]);
417
                  productTab[4] = (bidonTab4[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab4[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab4[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab4[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab4[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab4[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab4[tempNum*bitSymbol+6] & feedbackTab[6]);
418
                  productTab[5] = (bidonTab5[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab5[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab5[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab5[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab5[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab5[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab5[tempNum*bitSymbol+6] & feedbackTab[6]);
419
                  productTab[6] = (bidonTab6[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab6[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab6[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab6[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab6[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab6[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab6[tempNum*bitSymbol+6] & feedbackTab[6]);
420
                  break;
421
                  case (8):
422
                  productTab[0] = (bidonTab0[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab0[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab0[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab0[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab0[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab0[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab0[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab0[tempNum*bitSymbol+7] & feedbackTab[7]);
423
                  productTab[1] = (bidonTab1[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab1[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab1[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab1[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab1[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab1[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab1[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab1[tempNum*bitSymbol+7] & feedbackTab[7]);
424
                  productTab[2] = (bidonTab2[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab2[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab2[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab2[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab2[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab2[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab2[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab2[tempNum*bitSymbol+7] & feedbackTab[7]);
425
                  productTab[3] = (bidonTab3[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab3[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab3[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab3[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab3[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab3[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab3[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab3[tempNum*bitSymbol+7] & feedbackTab[7]);
426
                  productTab[4] = (bidonTab4[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab4[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab4[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab4[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab4[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab4[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab4[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab4[tempNum*bitSymbol+7] & feedbackTab[7]);
427
                  productTab[5] = (bidonTab5[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab5[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab5[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab5[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab5[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab5[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab5[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab5[tempNum*bitSymbol+7] & feedbackTab[7]);
428
                  productTab[6] = (bidonTab6[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab6[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab6[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab6[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab6[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab6[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab6[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab6[tempNum*bitSymbol+7] & feedbackTab[7]);
429
                  productTab[7] = (bidonTab7[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab7[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab7[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab7[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab7[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab7[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab7[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab7[tempNum*bitSymbol+7] & feedbackTab[7]);
430
                  break;
431
                  case (9):
432
                  productTab[0] = (bidonTab0[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab0[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab0[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab0[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab0[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab0[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab0[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab0[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab0[tempNum*bitSymbol+8] & feedbackTab[8]);
433
                  productTab[1] = (bidonTab1[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab1[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab1[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab1[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab1[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab1[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab1[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab1[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab1[tempNum*bitSymbol+8] & feedbackTab[8]);
434
                  productTab[2] = (bidonTab2[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab2[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab2[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab2[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab2[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab2[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab2[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab2[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab2[tempNum*bitSymbol+8] & feedbackTab[8]);
435
                  productTab[3] = (bidonTab3[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab3[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab3[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab3[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab3[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab3[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab3[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab3[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab3[tempNum*bitSymbol+8] & feedbackTab[8]);
436
                  productTab[4] = (bidonTab4[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab4[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab4[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab4[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab4[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab4[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab4[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab4[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab4[tempNum*bitSymbol+8] & feedbackTab[8]);
437
                  productTab[5] = (bidonTab5[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab5[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab5[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab5[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab5[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab5[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab5[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab5[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab5[tempNum*bitSymbol+8] & feedbackTab[8]);
438
                  productTab[6] = (bidonTab6[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab6[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab6[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab6[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab6[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab6[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab6[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab6[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab6[tempNum*bitSymbol+8] & feedbackTab[8]);
439
                  productTab[7] = (bidonTab7[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab7[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab7[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab7[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab7[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab7[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab7[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab7[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab7[tempNum*bitSymbol+8] & feedbackTab[8]);
440
                  productTab[8] = (bidonTab8[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab8[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab8[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab8[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab8[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab8[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab8[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab8[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab8[tempNum*bitSymbol+8] & feedbackTab[8]);
441
                  break;
442
                  case (10):
443
                  productTab[0] = (bidonTab0[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab0[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab0[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab0[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab0[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab0[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab0[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab0[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab0[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab0[tempNum*bitSymbol+9] & feedbackTab[9]);
444
                  productTab[1] = (bidonTab1[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab1[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab1[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab1[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab1[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab1[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab1[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab1[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab1[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab1[tempNum*bitSymbol+9] & feedbackTab[9]);
445
                  productTab[2] = (bidonTab2[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab2[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab2[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab2[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab2[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab2[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab2[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab2[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab2[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab2[tempNum*bitSymbol+9] & feedbackTab[9]);
446
                  productTab[3] = (bidonTab3[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab3[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab3[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab3[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab3[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab3[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab3[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab3[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab3[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab3[tempNum*bitSymbol+9] & feedbackTab[9]);
447
                  productTab[4] = (bidonTab4[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab4[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab4[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab4[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab4[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab4[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab4[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab4[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab4[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab4[tempNum*bitSymbol+9] & feedbackTab[9]);
448
                  productTab[5] = (bidonTab5[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab5[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab5[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab5[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab5[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab5[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab5[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab5[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab5[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab5[tempNum*bitSymbol+9] & feedbackTab[9]);
449
                  productTab[6] = (bidonTab6[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab6[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab6[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab6[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab6[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab6[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab6[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab6[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab6[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab6[tempNum*bitSymbol+9] & feedbackTab[9]);
450
                  productTab[7] = (bidonTab7[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab7[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab7[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab7[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab7[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab7[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab7[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab7[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab7[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab7[tempNum*bitSymbol+9] & feedbackTab[9]);
451
                  productTab[8] = (bidonTab8[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab8[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab8[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab8[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab8[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab8[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab8[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab8[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab8[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab8[tempNum*bitSymbol+9] & feedbackTab[9]);
452
                  productTab[9] = (bidonTab9[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab9[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab9[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab9[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab9[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab9[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab9[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab9[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab9[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab9[tempNum*bitSymbol+9] & feedbackTab[9]);
453
                  break;
454
                  case (11):
455
                  productTab[0] = (bidonTab0[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab0[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab0[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab0[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab0[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab0[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab0[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab0[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab0[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab0[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab0[tempNum*bitSymbol+10] & feedbackTab[10]);
456
                  productTab[1] = (bidonTab1[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab1[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab1[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab1[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab1[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab1[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab1[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab1[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab1[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab1[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab1[tempNum*bitSymbol+10] & feedbackTab[10]);
457
                  productTab[2] = (bidonTab2[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab2[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab2[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab2[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab2[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab2[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab2[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab2[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab2[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab2[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab2[tempNum*bitSymbol+10] & feedbackTab[10]);
458
                  productTab[3] = (bidonTab3[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab3[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab3[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab3[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab3[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab3[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab3[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab3[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab3[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab3[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab3[tempNum*bitSymbol+10] & feedbackTab[10]);
459
                  productTab[4] = (bidonTab4[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab4[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab4[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab4[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab4[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab4[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab4[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab4[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab4[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab4[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab4[tempNum*bitSymbol+10] & feedbackTab[10]);
460
                  productTab[5] = (bidonTab5[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab5[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab5[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab5[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab5[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab5[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab5[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab5[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab5[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab5[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab5[tempNum*bitSymbol+10] & feedbackTab[10]);
461
                  productTab[6] = (bidonTab6[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab6[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab6[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab6[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab6[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab6[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab6[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab6[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab6[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab6[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab6[tempNum*bitSymbol+10] & feedbackTab[10]);
462
                  productTab[7] = (bidonTab7[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab7[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab7[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab7[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab7[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab7[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab7[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab7[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab7[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab7[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab7[tempNum*bitSymbol+10] & feedbackTab[10]);
463
                  productTab[8] = (bidonTab8[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab8[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab8[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab8[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab8[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab8[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab8[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab8[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab8[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab8[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab8[tempNum*bitSymbol+10] & feedbackTab[10]);
464
                  productTab[9] = (bidonTab9[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab9[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab9[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab9[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab9[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab9[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab9[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab9[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab9[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab9[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab9[tempNum*bitSymbol+10] & feedbackTab[10]);
465
                  productTab[10]= (bidonTab10[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab10[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab10[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab10[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab10[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab10[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab10[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab10[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab10[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab10[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab10[tempNum*bitSymbol+10] & feedbackTab[10]);
466
                  break;
467
                  case (12):
468
                  productTab[0] = (bidonTab0[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab0[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab0[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab0[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab0[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab0[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab0[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab0[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab0[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab0[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab0[tempNum*bitSymbol+10] & feedbackTab[10]) ^ (bidonTab0[tempNum*bitSymbol+11] & feedbackTab[11]);
469
                  productTab[1] = (bidonTab1[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab1[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab1[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab1[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab1[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab1[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab1[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab1[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab1[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab1[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab1[tempNum*bitSymbol+10] & feedbackTab[10]) ^ (bidonTab1[tempNum*bitSymbol+11] & feedbackTab[11]);
470
                  productTab[2] = (bidonTab2[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab2[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab2[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab2[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab2[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab2[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab2[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab2[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab2[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab2[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab2[tempNum*bitSymbol+10] & feedbackTab[10]) ^ (bidonTab2[tempNum*bitSymbol+11] & feedbackTab[11]);
471
                  productTab[3] = (bidonTab3[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab3[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab3[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab3[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab3[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab3[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab3[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab3[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab3[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab3[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab3[tempNum*bitSymbol+10] & feedbackTab[10]) ^ (bidonTab3[tempNum*bitSymbol+11] & feedbackTab[11]);
472
                  productTab[4] = (bidonTab4[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab4[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab4[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab4[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab4[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab4[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab4[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab4[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab4[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab4[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab4[tempNum*bitSymbol+10] & feedbackTab[10]) ^ (bidonTab4[tempNum*bitSymbol+11] & feedbackTab[11]);
473
                  productTab[5] = (bidonTab5[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab5[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab5[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab5[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab5[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab5[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab5[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab5[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab5[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab5[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab5[tempNum*bitSymbol+10] & feedbackTab[10]) ^ (bidonTab5[tempNum*bitSymbol+11] & feedbackTab[11]);
474
                  productTab[6] = (bidonTab6[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab6[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab6[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab6[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab6[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab6[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab6[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab6[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab6[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab6[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab6[tempNum*bitSymbol+10] & feedbackTab[10]) ^ (bidonTab6[tempNum*bitSymbol+11] & feedbackTab[11]);
475
                  productTab[7] = (bidonTab7[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab7[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab7[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab7[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab7[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab7[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab7[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab7[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab7[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab7[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab7[tempNum*bitSymbol+10] & feedbackTab[10]) ^ (bidonTab7[tempNum*bitSymbol+11] & feedbackTab[11]);
476
                  productTab[8] = (bidonTab8[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab8[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab8[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab8[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab8[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab8[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab8[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab8[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab8[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab8[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab8[tempNum*bitSymbol+10] & feedbackTab[10]) ^ (bidonTab8[tempNum*bitSymbol+11] & feedbackTab[11]);
477
                  productTab[9] = (bidonTab9[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab9[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab9[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab9[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab9[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab9[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab9[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab9[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab9[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab9[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab9[tempNum*bitSymbol+10] & feedbackTab[10]) ^ (bidonTab9[tempNum*bitSymbol+11] & feedbackTab[11]);
478
                  productTab[10]= (bidonTab10[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab10[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab10[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab10[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab10[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab10[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab10[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab10[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab10[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab10[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab10[tempNum*bitSymbol+10] & feedbackTab[10]) ^ (bidonTab10[tempNum*bitSymbol+11] & feedbackTab[11]);
479
                  productTab[11]= (bidonTab11[tempNum*bitSymbol+0] & feedbackTab[0]) ^ (bidonTab11[tempNum*bitSymbol+1] & feedbackTab[1]) ^ (bidonTab11[tempNum*bitSymbol+2] & feedbackTab[2]) ^ (bidonTab11[tempNum*bitSymbol+3] & feedbackTab[3])  ^ (bidonTab11[tempNum*bitSymbol+4] & feedbackTab[4]) ^ (bidonTab11[tempNum*bitSymbol+5] & feedbackTab[5]) ^ (bidonTab11[tempNum*bitSymbol+6] & feedbackTab[6]) ^ (bidonTab11[tempNum*bitSymbol+7] & feedbackTab[7]) ^ (bidonTab11[tempNum*bitSymbol+8] & feedbackTab[8]) ^ (bidonTab11[tempNum*bitSymbol+9] & feedbackTab[9]) ^ (bidonTab11[tempNum*bitSymbol+10] & feedbackTab[10]) ^ (bidonTab11[tempNum*bitSymbol+11] & feedbackTab[11]);
480
                  break;
481
                  default :
482
                     productTab[0] = 0;
483
                  break;
484
               }
485
 
486
            }else{
487
               switch(bitSymbol){
488
                  case(3):
489
                     productTab[0] = feedbackTab[0];
490
                     productTab[1] = feedbackTab[1];
491
                     productTab[2] = feedbackTab[2];
492
                  break;
493
                  case(4):
494
                     productTab[0] = feedbackTab[0];
495
                     productTab[1] = feedbackTab[1];
496
                     productTab[2] = feedbackTab[2];
497
                     productTab[3] = feedbackTab[3];
498
                  break;
499
                  case(5):
500
                     productTab[0] = feedbackTab[0];
501
                     productTab[1] = feedbackTab[1];
502
                     productTab[2] = feedbackTab[2];
503
                     productTab[3] = feedbackTab[3];
504
                     productTab[4] = feedbackTab[4];
505
                  break;
506
                  case(6):
507
                     productTab[0] = feedbackTab[0];
508
                     productTab[1] = feedbackTab[1];
509
                     productTab[2] = feedbackTab[2];
510
                     productTab[3] = feedbackTab[3];
511
                     productTab[4] = feedbackTab[4];
512
                     productTab[5] = feedbackTab[5];
513
                  break;
514
                  case(7):
515
                     productTab[0] = feedbackTab[0];
516
                     productTab[1] = feedbackTab[1];
517
                     productTab[2] = feedbackTab[2];
518
                     productTab[3] = feedbackTab[3];
519
                     productTab[4] = feedbackTab[4];
520
                     productTab[5] = feedbackTab[5];
521
                     productTab[6] = feedbackTab[6];
522
                  break;
523
                  case(8):
524
                     productTab[0] = feedbackTab[0];
525
                     productTab[1] = feedbackTab[1];
526
                     productTab[2] = feedbackTab[2];
527
                     productTab[3] = feedbackTab[3];
528
                     productTab[4] = feedbackTab[4];
529
                     productTab[5] = feedbackTab[5];
530
                     productTab[6] = feedbackTab[6];
531
                     productTab[7] = feedbackTab[7];
532
                  break;
533
                  case(9):
534
                     productTab[0] = feedbackTab[0];
535
                     productTab[1] = feedbackTab[1];
536
                     productTab[2] = feedbackTab[2];
537
                     productTab[3] = feedbackTab[3];
538
                     productTab[4] = feedbackTab[4];
539
                     productTab[5] = feedbackTab[5];
540
                     productTab[6] = feedbackTab[6];
541
                     productTab[7] = feedbackTab[7];
542
                     productTab[8] = feedbackTab[8];
543
                  break;
544
                  case(10):
545
                     productTab[0] = feedbackTab[0];
546
                     productTab[1] = feedbackTab[1];
547
                     productTab[2] = feedbackTab[2];
548
                     productTab[3] = feedbackTab[3];
549
                     productTab[4] = feedbackTab[4];
550
                     productTab[5] = feedbackTab[5];
551
                     productTab[6] = feedbackTab[6];
552
                     productTab[7] = feedbackTab[7];
553
                     productTab[8] = feedbackTab[8];
554
                     productTab[9] = feedbackTab[9];
555
                  break;
556
                  case(11):
557
                     productTab[0] = feedbackTab[0];
558
                     productTab[1] = feedbackTab[1];
559
                     productTab[2] = feedbackTab[2];
560
                     productTab[3] = feedbackTab[3];
561
                     productTab[4] = feedbackTab[4];
562
                     productTab[5] = feedbackTab[5];
563
                     productTab[6] = feedbackTab[6];
564
                     productTab[7] = feedbackTab[7];
565
                     productTab[8] = feedbackTab[8];
566
                     productTab[9] = feedbackTab[9];
567
                     productTab[10] = feedbackTab[10];
568
                  break;
569
                  case(12):
570
                     productTab[0] = feedbackTab[0];
571
                     productTab[1] = feedbackTab[1];
572
                     productTab[2] = feedbackTab[2];
573
                     productTab[3] = feedbackTab[3];
574
                     productTab[4] = feedbackTab[4];
575
                     productTab[5] = feedbackTab[5];
576
                     productTab[6] = feedbackTab[6];
577
                     productTab[7] = feedbackTab[7];
578
                     productTab[8] = feedbackTab[8];
579
                     productTab[9] = feedbackTab[9];
580
                     productTab[10] = feedbackTab[10];
581
                     productTab[11] = feedbackTab[11];
582
                  break;
583
                  default :
584
                     productTab[0] = feedbackTab[0];
585
                  break;
586
               }
587
            }
588
 
589
 
590
            //---------------------------------------------------------------
591
            // assign syndromes registers
592
            //---------------------------------------------------------------
593
            if (rsLoop == 0) {
594
               for (kk=0; kk< bitSymbol; kk++){
595
                  syndromeRegTab [zz*bitSymbol+kk] = productTab[kk];
596
               }
597
            }else{
598
               if (zz==0){
599
                  for (kk=0; kk< bitSymbol; kk++){
600
                     syndromeRegTab [kk] = productTab[kk];
601
                  }
602
               } else{
603
                  for (kk=0; kk< bitSymbol; kk++){
604
                     syndromeRegTab [zz*bitSymbol+kk] = syndromeRegTab [(zz-1)*bitSymbol+kk] ^ productTab[kk];
605
                  }
606
               }
607
            }
608
         }
609
      }
610
 
611
      //---------------------------------------------------------------
612
      // build redundancy symbols
613
      //---------------------------------------------------------------
614
      for (zz =0; zz<syndromeLength;zz++) {
615
         redundancySymbols [zz] = 0;
616
      }
617
      for (zz =0; zz<syndromeLength;zz++) {
618
         for (kk=0;kk<bitSymbol;kk++){
619
            redundancySymbols [syndromeLength-1-zz] = redundancySymbols [syndromeLength-1-zz] + syndromeRegTab[(zz*bitSymbol)+kk] * powerTab[kk];
620
         }
621
      }
622
 
623
 
624
      //---------------------------------------------------------------
625
      // Write Data In
626
      //---------------------------------------------------------------
627
      fprintf(OutFileRsEncIn, "// WORD Number: %d\n", loop);
628
      fprintf(OutFileRsEncOut, "// WORD Number: %d\n", loop);
629
 
630
      sync_flag = 0;
631
      for (ii=0;ii<DataSize;ii++){
632
         if (ii == 0) {
633
            sync_flag = 1;
634
         }else{
635
            sync_flag = 0;
636
         }
637
 
638
         if (bitSymbol < 9) {
639
            fprintf(OutFileRsEncIn, "%d_%d_%02X\n", sync_flag, 1, dataIn[ii]);
640
            fprintf(OutFileRsEncOut, "%02X\n", dataIn[ii]);
641
         }else{
642
            fprintf(OutFileRsEncIn, "%d_%d_%03X\n", sync_flag, 1, dataIn[ii]);
643
            fprintf(OutFileRsEncOut, "%03X\n", dataIn[ii]);
644
         }
645
      }
646
 
647
 
648
      //---------------------------------------------------------------
649
      // 0 padding for RsEncoderIN Log File, Attach Redundancy symbols to RsencoderOut Log File
650
      //---------------------------------------------------------------
651
      for (ii = 0; ii<syndromeLength;ii++){
652
          if (bitSymbol < 9) {
653
            fprintf(OutFileRsEncIn, "0_1_00\n");
654
            fprintf(OutFileRsEncOut, "%02X\n", redundancySymbols[ii]);
655
          }else{
656
            fprintf(OutFileRsEncIn, "0_1_000\n");
657
            fprintf(OutFileRsEncOut, "%03X\n", redundancySymbols[ii]);
658
          }
659
      }
660
  }
661
 
662
 
663
   //---------------------------------------------------------------
664
   // close file
665
   //---------------------------------------------------------------
666
   fclose(OutFileRsEncIn);
667
   fclose(OutFileRsEncOut);
668
 
669
 
670
   //---------------------------------------------------------------
671
   // Free memory
672
   //---------------------------------------------------------------
673
   delete[] dataIn;
674
   delete[] ttTab;
675
   delete[] bbTab;
676
   delete[] ppTab;
677
   delete[] bidon;
678
   delete[] bidonTab0;
679
   delete[] bidonTab1;
680
   delete[] bidonTab2;
681
   delete[] bidonTab3;
682
   delete[] bidonTab4;
683
   delete[] bidonTab5;
684
   delete[] bidonTab6;
685
   delete[] bidonTab7;
686
   delete[] bidonTab8;
687
   delete[] bidonTab9;
688
   delete[] bidonTab10;
689
   delete[] bidonTab11;
690
   delete[] feedbackTab;
691
   delete[] productTab;
692
   delete[] genCoeffTab;
693
   delete[] syndromeRegTab;
694
   delete[] redundancySymbols;
695
   delete[] powerTab;
696
 
697
 
698
 
699
   //---------------------------------------------------------------
700
   // clean string
701
   //---------------------------------------------------------------
702
   free(strRsEncIn);
703
   free(strRsEncOut);
704
 
705
 
706
}

powered by: WebSVN 2.1.0

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