E20425-01 •
Appendix A Data Integrity Validation
239
Reed-Solomon CRC
■
Reed-Solomon CRC
The following is a sample ‘C program’ to generate the Reed Solomon CRC
1
on an i386 class processor:
1.
Reed–Solomon is an error-correcting code (ECC) that works by oversampling a
polynomial constructed from the data. The polynomial is evaluated at several points,
and these values are either sent or recorded. Reed–Solomon codes are used in a wide
variety of applications for data transmission technologies.
Figure 1. Reed Solomon CRC Program Example (Sheet 1 of 4)
#include <unistd.h>
#include <stdio.h>
/*---------------------------------------------------------------------------------------------------
** INPUTS: crc - initial crc (0 for fresh) (i.e., seed)
** cnt - the number of data bytes to compute CRC for
** start - the starting address of the data bytes (e.g., data buffer)
** OUTPUTS: UINT32 - crc in big endian (MSB is first byte)
*/ ---------------------------------------------------------------------------------------------------
uint32_t GenerateRSCRC(uint32_t crc, uint32_t cnt, const void *start)
{
static const uint32_t crcTable[256]=
{
0x00000000,0x38CF3801,0x70837002,0x484C4803,0xE01BE004,0xD8D4D805,
0x90989006,0xA857A807,0xDD36DD08,0xE5F9E509,0xADB5AD0A,0x957A950B,
0x3D2D3D0C,0x05E2050D,0x4DAE4D0E,0x7561750F,0xA76CA710,0x9FA39F11,
0xD7EFD712,0xEF20EF13,0x47774714,0x7FB87F15,0x37F43716,0x0F3B0F17,
0x7A5A7A18,0x42954219,0x0AD90A1A,0x3216321B,0x9A419A1C,0xA28EA21D,
0xEAC2EA1E,0xD20DD21F,0x53D85320,0x6B176B21,0x235B2322,0x1B941B23,
0xB3C3B324,0x8B0C8B25,0xC340C326,0xFB8FFB27,0x8EEE8E28,0xB621B629,
0xFE6DFE2A,0xC6A2C62B,0x6EF56E2C,0x563A562D,0x1E761E2E,0x26B9262F,
0xF4B4F430,0xCC7BCC31,0x84378432,0xBCF8BC33,0x14AF1434,0x2C602C35,
0x642C6436,0x5CE35C37,0x29822938,0x114D1139,0x5901593A,0x61CE613B,
0xC999C93C,0xF156F13D,0xB91AB93E,0x81D5813F,0xA6ADA640,0x9E629E41,
0xD62ED642,0xEEE1EE43,0x46B64644,0x7E797E45,0x36353646,0x0EFA0E47,
0x7B9B7B48,0x43544349,0x0B180B4A,0x33D7334B,0x9B809B4C,0xA34FA34D,
Содержание Storage Tek T10000
Страница 14: ...Tables xiv T10000 Interface Reference Manual January 2011 E20425 01...
Страница 18: ...What s New xx T10000 Interface Reference Manual January 2011 E20425 01...
Страница 30: ...Considerations 12 T10000 Interface Reference Manual January 2011 E20425 01 Figure 5 Cascading Hubs...
Страница 82: ...Private Loop SCSI Target Discovery 64 T10000 Interface Reference Manual January 2011 E20425 01...
Страница 286: ...Glossary 268 T10000 Interface Reference Manual January 2011 E20425 01...