Presentation is loading. Please wait.

Presentation is loading. Please wait.

Error Detection / Correction

Similar presentations


Presentation on theme: "Error Detection / Correction"— Presentation transcript:

1 Error Detection / Correction
Hamming code

2 Error Detection/Correction
Errors: Hard Failure Permanent defect Soft Error Random, non-destructive No permanent damage to memory Coding: Coding can be used for - Error detection - Error correcting Hamming code will be explored

3 Error Correcting Code Function
The output of the “Compare” to the “Corrector” is termed the “syndrome”, and is K bits long

4 Hamming Code Example Visualizing: With even parity: Word:
Identifying error: With Error:

5 Increased word length for error correcting

6 Hamming Code Design – determining K
To store an M bit word with detection/correction takes M+K bit words If K =1, we can detect single bit errors but not correct them If 2K - 1 >= M + K , we can detect, identify, and correct all single bit errors, i.e. the syndrome contains the information to correct any single bit error Example: For M = 8: and K = 3: 23 – 1 = 7 < (doesn’t work) and K = 4: 24 – 1 = 15 > (works!) Therefore, we must choose K =4, i.e., the minimum size of the syndrome is 4

7 Hamming Code Syndrome If we compare the read K bits compared with the write K bits, using an exclusive or function, the result is called the “syndrome”. If the syndrome is all zeros, there were no errors. If there is a 1 bit somewhere, we know that represents an error.

8 Hamming Code Syndrome Design Criteria

9 A Layout of Data and Check Bits that Achieves Our Design Criteria:
C1 is a parity check on every data bit whose position is xxx1 C1 = D1 exor D exor D4 exor D exor D7 C2 is a parity check on every data bit whose position is xx1x C2 = D exor D3 exor D exor D6 exor D7 C4 is a parity check on every data bit whose position is x1xx C4 = D2 exor D3 exor D exor D8 C8 is a parity check on every data bit whose position is 1xxx C8 = D5 exor D6 exor D7 exor D8 Why? Because we want the syndrome, the Hamming test word, to yield the address of the error.

10 Example:

11 Example: Data stored = Check bits: Putting it together:

12 Example: Word fetched: Check bits: Putting it all together:
EXOR’ing: 0110 = 6  bit position 6 is wrong, i.e. bit D3 is wrong

13 SEC-DEC Example – Requires One Extra Check Bit
Single Error Correction, Double Error Detection: Single Error Correction: Word With Even Parity Word With Even Parity With Two Errors With Errors Identifying Error SEC Attempt IS SEC Correct? Extra Bit Confirms DE

14 Lab Project 1 – 22x3 Memory Design (Due 10/25/07)
The bus signals are: D<0:2>, A<0:3>, AE (address enable), R/W# Clearly show the master, decoders, muxes, and bus. Data is transferred on the falling edge of the clock. Use LED’s to display bus signals. Use tristate buffers to drive the bus data lines (why?). Part 1: Clearly explain your design Show the timing diagrams for the design implementation Part 2: Implement your design on the LogicWorks5 Simulator Capture the timing diagrams from the Simulator for your report Part 3: (with ONE partner) Build a circuit(s) in the Laboratory Capture the oscilloscope traces for your report Part 4: Document your project in a report written to a professional audience of your peers – Title Page, Abstract, Problem Description, Design, Data, Conclusions (include descriptions of problems and learning), and References) Have fun, explore, and don’t be afraid to be creative !


Download ppt "Error Detection / Correction"

Similar presentations


Ads by Google