> As the subject says: are there any EDC/ECC code experts hanging around > on the list? I don't claim to be any sort of expert. > I'm working on implementing the 4-byte (32-bit) ECC code Western Digital > used on the WD2010 Winchester HDD Controller IC. This appears to be an > implementation of the ECC scheme explained in section 7.6 of National > Semiconductor's "Disk Interface Design Guide and User's Manual" (appnote > AN-413). I believe this is the code used on all 5 1/4" and smaller HD units since th= e original 5MB ones. > It looks like the ECC scheme is based on running a CRC forwards over the > data to produce a 32-bit CRC, which is used to validate the data in the > same way the 16-bit CRC validates the IDAM. Error correction apparently > operates by running the CRC in reverse using an "inverse polynomial". I > can't see how this could work -- isn't a CRC by its very nature a > one-way operation? No, the 'standard' CRC as used in floppy discs cannot do more than detect o= ne error bit as it doesn't have a long enough polynomial. Once you can dete= ct more than one bit is in error, then you can correct a bit back to what i= t should be. IIRC the formula works something like if you can detect N bits= of errors with the code, then you can correct N-1 bits. > The application note calls this a "Glover 140A0443" code, but doesn't > bother to reference any papers, books or similar on the subject. There's > an example on how to program NSC's controller chips to use the code, but > nothing on the mathematical background behind it. For instance: how does > it work, and why is the maximum correctable error burst 5 bits long? > > Does anyone recognise this polynomial? > x^32 + x^28 + x^26 + x^19 + x^17 + x^10 + x^6 + x^2 + 1 > aka. x^32 + x^28 + x^26 + x^19 + x^17 + x^10 + x^6 + x^2 + x^0 > or: 0x140A0443 I think you will find it is a Reed-Solomon code http://en.wikipedia.org/wik= i/Reed-Solomon_error_correction > It's not a standard CRC32 polynomial (according to Das Wiki), and I > don't *think* it's a Fire code... though I've been looking for the > original paper on those (P. Fire, "A class of multiple-error-correcting > binary codes for non-independent errors". Sylvania Reports RSL-E-2, > Sylvania Reconnaissance Systems, Mountain View, California, 1959) and > haven't had any success -- other than a few hits (references in other > papers) on Citeseer, it appears all copies of the paper have vanished > into thin air. >=20 > What I'd really like to find out is more about how this algorithm > works... a model implementation (e.g. in C, Python or similar) would be > extremely useful, but at this point even a basic worked example ("here's > a chunk of data, now watch what happens if we flip some bits, and here's > how we repair the flipped bits") would be extremely useful... I think you will find it is a Fire code (although it is that long since I d= ealt with them that I cannot remember). I do recall that 14" Winchester dis= ks used a 56 bit code, and that could correct an 11 bit error burst - but t= hat isn't any help to you. --=20 Scanned by iCritical. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .