Re: Ecc Size




"Gromer" <osIndgy@xxxxxxxxx> wrote in message
news:1124893299.731162.52790@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I was browsing thru the net and could find no documents on ECC
> implementation (algorithm) calculation of the size of ECC for a
> specific Nand Device.
>
> Like if i have a flash Device (nand) of 512MiB, then how is the ecc
> size calculated. Any pointers or PDFs or links would be highly
> appreciable.
>
> Thanks in advance,
> Gromer
>

Remember, when using an ECC code, the number of bits must be
twice as large as the number of bits required to provide a
"bit address" of a single bit error.

This is because the ECC is calculated basically as odd
parity bit for different groupings of bits in the data block.

One bit is the parity of all even-numbered bits
One bit is the parity all odd-numbered bits

One bit is the parity of all bits with bit address bit 1 = 0
One bit is the parity of all bits with bit address bit 1 = 1

One bit is the parity of all bits with bit address bit 2 = 0
One bit is the parity of all bits with bit address bit 2 = 1

etc..

The upshot of this, is that if you compare the ECC you generate
from the data to the ECC stored with the data, they should be
equal if the data has no error (never mind that multiple bit
errors could cause identical ECC's). If there is a single bit error
in the data, the XOR of the generated and read ECC's will return
a number with each pair of bits being 10 or 01 (The bad bit only
being present in one of the bit groupings). If you extract
all the odd number bits (or the complement of the even bits, same
thing) you will get the bit address of the bad bit. Neat, huh?

Additionally, if all bit pairs but one are 10 and 01, that tells
you the single bit error was in the ECC. (the bit in the bad bit
pair).

Other mismatches mean 2 or more bits are in error. Three bits
or more bad could look like no error or correctible one bit error.

So I guess your answer is: 2*n, where 2^n is the number of bits
in the data.

But you don't do an ECC over the entire chip, as the question
seems to indicate. Each block has it's own ECC. Errors are
much more prevalent than a single bit per chip.

256 byte data (2048 bits) has a 22 bit ECC. 2048=2^11. 2*11=22
512 byte data (4096 bits) has a 24 bit ECC. 4096=2^12. 2*12=24

Rufus

I don't have my links handy right now, I'll try to remember...




.



Relevant Pages

  • Re: Ecc Size
    ... I was browsing thru the net and could find no documents on ECC ... implementation (algorithm) calculation of the size of ECC for a ... specific Nand Device. ...
    (comp.arch.embedded)
  • Ecc Size
    ... I was browsing thru the net and could find no documents on ECC ... implementation (algorithm) calculation of the size of ECC for a ... specific Nand Device. ...
    (comp.arch.embedded)
  • Re: Disk to disk copying with overclocked memory
    ... > You seem to have confused ECC and parity. ... Memory configurations that can use parity can use ECC, ... Exception - some embedded systems with smaller memory paths may ...
    (microsoft.public.windowsxp.general)
  • Re: Single-bit corrected errors
    ... Single Bit ECC Memory Error ... My understanding is that each ECC DIMM is 72 bits wide, ... since you have different sized chip selects (or non-power of two ... you should be running in non-interleaved mode ...
    (comp.sys.ibm.pc.hardware.chips)
  • Re: Mixing RAM on P4T533-C
    ... Peter ... When mixing module frequency or error-correction code (ECC), ... > End-of-life module SPD spec mentions chip type K4R571669D ... > seems like reasonable advice, even if I cannot trace down ...
    (alt.comp.periphs.mainboard.asus)