From: Troy Kisky <troy.kisky@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] RFC on davinci Nand support changes
Date: Wed, 26 Sep 2007 17:52:41 -0700 [thread overview]
Message-ID: <46FAFED9.4050204@boundarydevices.com> (raw)
In-Reply-To: <Pine.LNX.4.64ksi.0709261459210.20962@home-gw.koi8.net>
>
> Again, you are trying to reinvent the wheel. The ECC algorithm is described
> in details in TI documentation and MontaVista implemented it verbatim.
>
>
> This code is a verbatim implementation of what is described in TI
> documentation. It's not supposed to look nice, it's supposed to work.
I guess that's what happens when you implement an algorithm without understanding it.
Example: You have a block of all zeros.
The ecc stored in the spare bytes of this is also 0.
Now, upon reading this block of zeroes, a two bit ecc occurs. The bits that happen to be
read incorrectly are bit # 0 & bit # 0x3f of the block
The hardware calculated ecc will be
0:0 ^ 0:fff = 0:fff after bit 0
0:fff ^ 3f:fc00 = 3f:3f after bit 3f
Now, when your algorithm counts bits you get 12, and decide
it is a single bit ecc error.
I however xor the high and low 12 bits 3f ^ 3f = 0, 0 != fff and
decide it is multi bit ecc error and give an error.
Note, that both approaches would have decide it was a single bit error, if the second
error wouldn't have happened.
I could give an example of another error with your algorithm, but I have
no desire to teach those without a desire to learn and no one else on this
list seems interested in this subject.
Troy
next prev parent reply other threads:[~2007-09-27 0:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-25 1:10 [U-Boot-Users] RFC on davinci Nand support changes Troy Kisky
2007-09-25 17:42 ` ksi at koi8.net
2007-09-25 19:22 ` Troy Kisky
2007-09-26 22:33 ` ksi at koi8.net
2007-09-26 22:55 ` Wolfgang Denk
2007-09-26 23:11 ` ksi at koi8.net
2007-09-27 0:52 ` Troy Kisky [this message]
2007-09-27 4:44 ` ksi at koi8.net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46FAFED9.4050204@boundarydevices.com \
--to=troy.kisky@boundarydevices.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.