A method for the detection and correction of errors in digital data, comprising the steps of:
- providing a source of digital data in the form of successive words of binary information;
- providing a first data buffer for storing N words;
- providing at least two XPQ circular queues (XPQ1 and XPQ2) for generating an error correction syndrome, wherein each of said XPQ circular queues has a length which is a prime number, and wherein each of said XPQ circular queues has a length which is unique with respect to other of said XPQ circular queues;
- providing a first CRC buffer;
- providing a first XPQ CRC word buffer;
- sequentially loading each data word of said N data words into said first data buffer, and generating a CRC word stored in said first CRC buffer;
- executing a logical XOR operation on each of said sequentially loaded N data words in each of said XPQ circular queues, and generating an XPQ CRC word from the words comprising said XPQ circular queues;
- providing a second data buffer;
- providing at least two circular queues XPQ1' and XPQ2' for generating an error correction syndrome, wherein said circular queue XPQ1' has a length equal to the length of circular queue XPQ1, and said circular queue XPQ2' has a length equal to the length of circular queue XPQ2
- providing a second CRC buffer;
- providing a second XPQ CRC word buffer;
- transmitting said N data words stored in said first data buffer to said second data buffer, sequentially loading said N data words into said second data buffer, and generating a second CRC word stored in said second CRC buffer;
- executing a logical XOR operation on each of said N data words transmitted from said first data buffer to said second data buffer in each of said circular queues XPQ1' and XPQ2', and generating an XPQ CRC word from the words comprising said XPQ' circular queues;
- detecting errors in said N data words stored in said second data buffer by comparing said the contents of said first CRC buffer with the contents of said second CRC buffer, such that in the event said contents are not equal, one or more errors exist in said N data words stored in said second data buffer;
- detecting if said errors in said N data words stored in said second data buffer may be correctable by comparing the contents of said first XPQ CRC buffer with the contents of said second XPQ CRC buffer, such that if said contents are equal said errors in data stored in said second data buffer may be correctable;
- creating XPQ imprinter circular queues, comprising the steps of:
- executing a logical XOR operation between each word comprising said XPQ1 and XPQ1' circular queues to obtain an XPQ1 imprinting queue;
- executing a logical XOR operation between each word comprising said XPQ2 and XPQ2' circular queues to obtain an XPQ2 imprinting queue;
- generating an intermediate correction mask comprising the steps of:
- providing first and second intermediate correction mask buffers having a capacity of N data words;
- repetitively sequentially writing the contents of said XPQ1 imprinting queue into said first intermediate correction mask buffer, beginning with the first word stored in said XPQ1 imprinting queue and ending with the last word stored in said XPQ1 imprinting queue, until every available location in said first intermediate correction mask buffer is written into;
- repetitively sequentially writing the contents of said XPQ2 imprinting queue into said second intermediate correction mask buffer, beginning with the first word stored in said XPQ2 imprinting queue and ending with the last word stored in said XPQ2 imprinting queue, until every available location word in said second intermediate correction mask buffer is written into;
- logically ANDing each corresponding word of said first and second intermediate correction buffers to obtain a single XPQ correction mask;
- evaluating the contents of said XPQ correction mask to determine if said errors are correctable, including determining if the contents of said XPQ correction mask include more than a single logical one value in any bit column, such that in the event that any of said bit columns contain more than a single logical one, said errors are not correctable;
- wherein in the event said error is correctable, said errors are corrected by executing a logical XOR operation between each corresponding word of said XPQ correction mask and said second data buffer to generate a corrected data buffer
- whereby errors are detected and corrected.