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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 issei
//===================================================================
2
// Module Name : RsDecodeShiftOmegaEmulator
3
// File Name   : RsDecodeShiftOmegaEmulator.cpp
4
// Function    : RS decoder shift omega emulator
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
 
17
 
18
void RsDecodeShiftOmegaEmulator(int* OmegaShiftedTab, int* OmegaTab, int *numShifted, int TotalSize, int DataSize, int bitSymbol) {
19
 
20
 
21
   //---------------------------------------------------------------
22
   // C++ variables
23
   //---------------------------------------------------------------
24
   int syndromeLength;
25
   int ii;
26
   int jj;
27
   syndromeLength = TotalSize - DataSize;
28
 
29
 
30
   //---------------------------------------------------------------
31
   // C++ variables
32
   //---------------------------------------------------------------
33
 
34
 
35
 
36
   //---------------------------------------------------------------
37
   // compute OmegaShiftedTab
38
   //---------------------------------------------------------------
39
   for(ii=0; ii<syndromeLength; ii++){
40
      if ((ii+numShifted[0]) < syndromeLength){
41
         for(jj=0; jj<bitSymbol; jj++){
42
            OmegaShiftedTab[ii*bitSymbol+jj] = OmegaTab[(ii+numShifted[0])*bitSymbol+jj];
43
         }
44
      }else{
45
         for(jj=0; jj<bitSymbol; jj++){
46
            OmegaShiftedTab[ii*bitSymbol+jj] = 0;
47
         }
48
      }
49
   }
50
 
51
 
52
}

powered by: WebSVN 2.1.0

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