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 13

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

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

powered by: WebSVN 2.1.0

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