improving reliability n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Improving Reliability PowerPoint Presentation
Download Presentation
Improving Reliability

Loading in 2 Seconds...

play fullscreen
1 / 17

Improving Reliability - PowerPoint PPT Presentation


  • 116 Views
  • Uploaded on

Improving Reliability. We used parity to determine when a memory bit failed. We can protect buses from transmission failures using parity/ECC. Detected with parity: 1 bit errors Corrected with ECC (Error correcting codes). Parity. If any two different valid datum, in memory

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Improving Reliability' - eagan


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
improving reliability
Improving Reliability

We used parity to determine when a memory bit failed. We can protect buses from transmission failures using parity/ECC.

Detected with parity: 1 bit errors

Corrected with ECC (Error correcting codes)

parity
Parity

If any two different valid datum, in memory

or on a bus, differ by at least 2 bits:

It is easy to detect if one bit fails since

a one bit failure will result in an invalid

data value.

How can we make sure any good data differs

by at least two bits?

why parity works to detect one bit errors
Why parity works to detect one bit errors…
  • All valid (and unique) data encoding must differ by at least one bit.
    • Argument: if they don’t they aren’t unique.
  • Pick any two values:
    • If they differ by more than one bit, a single bit error will not turn one into the other
    • If they differ by one bit then if we count the number of 0 bits in their encoding, one of the encodings will have an odd number of 0s, the other will have an even number and therefore their parity bits MUST also differ, so they will also differ by two bits. So we can’t change one valid encoding into another by changing only 1 bit!
example
Example
  • Two number: 100110 and 101110
  • Add odd parity bits: 1001100 and 1011101
  • Now these numbers differ by 2 bits
  • What if they already differ by more than one bit?
    • No problem, a 1-bit error can’t turn one into the other
error correcting codes
Error Correcting Codes

If any two different valid datum, in memory

or on a bus, differ by at least 3 bits:

It is easy to detect and correct if one bit fails

since a one bit failure will result in an invalid

data value and we know which valid data

value is only one bit away.

How can we make sure any good data differs

by at least three bits?

error correcting codes1
Error Correcting Codes
  • Use multiple parity bits, each computing parity over a different set of data bits.
  • Each data bit is used to calculate parity by a different combination (or permutation) of 2 or more parity bits.
    • data bit 0 may be used in the calculation of parity bits 1 and 2,
    • while data bit 1 is used by parity bits 1 and 3.
  • When a parity bit is flipped, only its parity calculation will be wrong.
ecc on 4 bits of data
ECC on 4 bits of data
  • Data bit 0 is used by parity 0 and 1
  • Data bit 1 is used by parity 0 and 1 and 2
  • Data bit 2 is used by parity 0 and 2
  • Data bit 3 is used by parity 1 and 2
    • P0 = odd_parity (D0, D1, D2)
    • P1 = odd_parity (D0, D1, D3)
    • P2 = odd_parity (D1, D2, D3)
calculating ecc 4 bits
Calculating ECC (4 bits)

D3 D2 D1 D0

P2 P1 P0

D3 D2 D1 D0

P2 P1 P0

0 0 0 0

0 0 0 1

0 0 1 0

0 0 1 1

0 1 0 0

0 1 0 1

0 1 1 0

0 1 1 1

1 0 0 0

1 0 0 1

1 0 1 0

1 0 1 1

1 1 0 0

1 1 0 1

1 1 1 0

1 1 1 1

calculating ecc 4 bits1
Calculating ECC (4 bits)

D3 D2 D1 D0

P2 P1 P0

D3 D2 D1 D0

P2 P1 P0

0 0 0 0

0 0 0 1

0 0 1 0

0 0 1 1

0 1 0 0

0 1 0 1

0 1 1 0

0 1 1 1

1

0

0

1

0

1

1

0

1 0 0 0

1 0 0 1

1 0 1 0

1 0 1 1

1 1 0 0

1 1 0 1

1 1 1 0

1 1 1 1

1

0

0

1

0

1

1

0

calculating ecc 4 bits2
Calculating ECC (4 bits)

D3 D2 D1 D0

P2 P1 P0

D3 D2 D1 D0

P2 P1 P0

0 0 0 0

0 0 0 1

0 0 1 0

0 0 1 1

0 1 0 0

0 1 0 1

0 1 1 0

0 1 1 1

1

0

0

1

1

0

0

1

1

0

0

1

0

1

1

0

1 0 0 0

1 0 0 1

1 0 1 0

1 0 1 1

1 1 0 0

1 1 0 1

1 1 1 0

1 1 1 1

0

1

1

0

0

1

1

0

1

0

0

1

0

1

1

0

calculating ecc 4 bits3
Calculating ECC (4 bits)

D3 D2 D1 D0

P2 P1 P0

D3 D2 D1 D0

P2 P1 P0

0 0 0 0

0 0 0 1

0 0 1 0

0 0 1 1

0 1 0 0

0 1 0 1

0 1 1 0

0 1 1 1

1

1

0

0

0

0

1

1

1

0

0

1

1

0

0

1

1

0

0

1

0

1

1

0

1 0 0 0

1 0 0 1

1 0 1 0

1 0 1 1

1 1 0 0

1 1 0 1

1 1 1 0

1 1 1 1

0

0

1

1

1

1

0

0

0

1

1

0

0

1

1

0

1

0

0

1

0

1

1

0

test question
Test question
  • The following 4 bit data value is encoded with ECC (as shown in class). Unfortunately it has a 1 bit error, fix it!

D3 D2 D1 D0

P2 P1 P0

0 0 0 1 010

D3 is used by P2 and P1

test question solution
Test question Solution
  • The flipped bit is D3, which should be a 1.

D3 D2 D1 D0

P2 P1 P0

1 0 0 1 010

D3 is used by P2 and P1

how many ecc parity bits p do you need for n bits of data
How many ECC parity bits (P) do you need for N bits of data?
  • You use 1 ECC parity bit pattern for each data bit error.
    • N bit patterns for fixing 1 bit errors
  • Plus 1 more pattern for each parity bit
    • P bit patterns
  • Plus 1 pattern for “correct value”

N + P + 1 = 2P

how many ecc bit do you need for a 78 bit bus
How many ECC bit do you need for a 78 bit bus?

Patterns I need to decide

which bit is wrong if 1 bit

is flipped

Unique pattern I

can represent with

P ECC parity bits

78 + P + 1  2P

26 = 64 (too small)

27 = 128 (which is > 78+7+1)

So, 7 ECC parity bits needed

question
Question
  • Prove that ECC has at least 3 bits different in any two representations.
  • Answer:
    • if they are different, then they must differ by at least 1 data bit.
    • Each data bit is covered by at least 2 parity bits
      • Those parity bits must now differ since one must have an odd number of data 1’s and the other even.
question1
Question
  • How do you decide which bit is wrong?
  • If only one parity bit is the wrong parity, then that parity bit has been corrupted
    • Because and data bit is checked by at least 2 parity bits a data bit failure will cause 2 or more parity bit errors.
  • If two or more parity bits are wrong, then the pattern of the parity bits that fail uniquely identify the corrupted data bit.