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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.61/] [tools/] [src/] [librlink/] [RlinkCrc8.cpp] - Blame information for rev 40

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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