OpenCores

Subversion Repositories w11

[/] [w11/] [trunk/] [tools/] [src/] [librlink/] [RlinkCrc8.cpp] - Diff between revs 10 and 13

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 10 Rev 13
Line 1... Line 1...
// $Id: RlinkCrc8.cpp 365 2011-02-28 07:28:26Z mueller $
// $Id: RlinkCrc8.cpp 410 2011-09-18 11:23:09Z mueller $
//
//
// Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
// Copyright 2011- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
//
//
// This program is free software; you may redistribute and/or modify it under
// This program is free software; you may redistribute and/or modify it under
// the terms of the GNU General Public License as published by the Free
// the terms of the GNU General Public License as published by the Free
Line 11... Line 11...
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// for complete details.
// for complete details.
// 
// 
// Revision History: 
// Revision History: 
// Date         Rev Version  Comment
// Date         Rev Version  Comment
 
// 2011-09-17   410   1.1    use now a6 polynomial for crc8
// 2011-02-27   365   1.0    Initial version
// 2011-02-27   365   1.0    Initial version
// 2011-01-15   355   0.1    First draft
// 2011-01-15   355   0.1    First draft
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
 
 
/*!
/*!
  \file
  \file
  \version $Id: RlinkCrc8.cpp 365 2011-02-28 07:28:26Z mueller $
  \version $Id: RlinkCrc8.cpp 410 2011-09-18 11:23:09Z mueller $
  \brief   Implemenation of class RlinkCrc8.
  \brief   Implemenation of class RlinkCrc8.
 */
 */
 
 
#include "RlinkCrc8.hpp"
#include "RlinkCrc8.hpp"
 
 
Line 37... Line 38...
//! FIXME_docs
//! FIXME_docs
// from gen_crc8_tbl
// from gen_crc8_tbl
 
 
const uint8_t RlinkCrc8::fCrc8Table[256] =
const uint8_t RlinkCrc8::fCrc8Table[256] =
{
{
    0,  29,  58,  39, 116, 105,  78,  83,
    0,  77, 154, 215, 121,  52, 227, 174,   // from gen_crc8_tbl
  232, 245, 210, 207, 156, 129, 166, 187,
  242, 191, 104,  37, 139, 198,  17,  92,
  205, 208, 247, 234, 185, 164, 131, 158,
  169, 228,  51, 126, 208, 157,  74,   7,
   37,  56,  31,   2,  81,  76, 107, 118,
   91,  22, 193, 140,  34, 111, 184, 245,
  135, 154, 189, 160, 243, 238, 201, 212,
   31,  82, 133, 200, 102,  43, 252, 177,
  111, 114,  85,  72,  27,   6,  33,  60,
  237, 160, 119,  58, 148, 217,  14,  67,
   74,  87, 112, 109,  62,  35,   4,  25,
  182, 251,  44,  97, 207, 130,  85,  24,
  162, 191, 152, 133, 214, 203, 236, 241,
   68,   9, 222, 147,  61, 112, 167, 234,
   19,  14,  41,  52, 103, 122,  93,  64,
   62, 115, 164, 233,  71,  10, 221, 144,
  251, 230, 193, 220, 143, 146, 181, 168,
  204, 129,  86,  27, 181, 248,  47,  98,
  222, 195, 228, 249, 170, 183, 144, 141,
  151, 218,  13,  64, 238, 163, 116,  57,
   54,  43,  12,  17,  66,  95, 120, 101,
  101,  40, 255, 178,  28,  81, 134, 203,
  148, 137, 174, 179, 224, 253, 218, 199,
   33, 108, 187, 246,  88,  21, 194, 143,
  124,  97,  70,  91,   8,  21,  50,  47,
  211, 158,  73,   4, 170, 231,  48, 125,
   89,  68,  99, 126,  45,  48,  23,  10,
  136, 197,  18,  95, 241, 188, 107,  38,
  177, 172, 139, 150, 197, 216, 255, 226,
  122,  55, 224, 173,   3,  78, 153, 212,
   38,  59,  28,   1,  82,  79, 104, 117,
  124,  49, 230, 171,   5,  72, 159, 210,
  206, 211, 244, 233, 186, 167, 128, 157,
  142, 195,  20,  89, 247, 186, 109,  32,
  235, 246, 209, 204, 159, 130, 165, 184,
  213, 152,  79,   2, 172, 225,  54, 123,
    3,  30,  57,  36, 119, 106,  77,  80,
   39, 106, 189, 240,  94,  19, 196, 137,
  161, 188, 155, 134, 213, 200, 239, 242,
   99,  46, 249, 180,  26,  87, 128, 205,
   73,  84, 115, 110,  61,  32,   7,  26,
  145, 220,  11,  70, 232, 165, 114,  63,
  108, 113,  86,  75,  24,   5,  34,  63,
  202, 135,  80,  29, 179, 254,  41, 100,
  132, 153, 190, 163, 240, 237, 202, 215,
   56, 117, 162, 239,  65,  12, 219, 150,
   53,  40,  15,  18,  65,  92, 123, 102,
   66,  15, 216, 149,  59, 118, 161, 236,
  221, 192, 231, 250, 169, 180, 147, 142,
  176, 253,  42, 103, 201, 132,  83,  30,
  248, 229, 194, 223, 140, 145, 182, 171,
  235, 166, 113,  60, 146, 223,   8,  69,
   16,  13,  42,  55, 100, 121,  94,  67,
   25,  84, 131, 206,  96,  45, 250, 183,
  178, 175, 136, 149, 198, 219, 252, 225,
   93,  16, 199, 138,  36, 105, 190, 243,
   90,  71,  96, 125,  46,  51,  20,   9,
  175, 226,  53, 120, 214, 155,  76,   1,
  127,  98,  69,  88,  11,  22,  49,  44,
  244, 185, 110,  35, 141, 192,  23,  90,
  151, 138, 173, 176, 227, 254, 217, 196
    6,  75, 156, 209, 127,  50, 229, 168
};
};
 
 
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
#if (defined(Retro_NoInline) || defined(Retro_RlinkCrc8_NoInline))
#if (defined(Retro_NoInline) || defined(Retro_RlinkCrc8_NoInline))
#define inline
#define inline

powered by: WebSVN 2.1.0

© copyright 1999-2013 OpenCores.org, equivalent to ORSoC AB, all rights reserved. OpenCores®, registered trademark.