Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.electronics.design > #510702
| Newsgroups | sci.electronics.design |
|---|---|
| From | Rob <nomail@example.com> |
| Subject | Re: Hamming ECC |
| References | (2 earlier) <9nV%C.258249$p05.239018@fx28.iad> <2b2fcca1-645d-44d8-9f5d-cb2792a312c8@googlegroups.com> <o9X%C.373423$ll2.82505@fx35.iad> <3MadnSnFhOujUtvGnZ2dnUU7-WfNnZ2d@supernews.com> <wyA1D.364095$T14.327350@fx44.iad> |
| Message-ID | <slrnpke3he.ebu.nomail@xs9.xs4all.nl> (permalink) |
| Date | 2018-07-12 08:15 +0000 |
bitrex <user@example.net> wrote:
> On 07/11/2018 11:47 PM, +++ATH0 wrote:
>> On 2018-07-06 21:17, bitrex wrote:
>>> To start with the simpler one-flag-bit case it seems hard to get wrong.
>>> To begin a write you load the appropriate flag table byte that holds the
>>> flag bit you want to zero into say a processor register, flip the bit to
>>> zero, write it back out. If power is lost at any point during that
>>> process prior to the commit (e.g. WE being de-asserted after the address
>>> and data registers are latched on a parallel SRAM) then nothing has
>>> changed in the SRAM and the associated data page should have whatever it
>>> had originally.
>>>
>>> If processor power is lost during the page write-out then the associated
>>> flag bit is still zero and it will be assumed the page write-out did not
>>> complete. If power is lost during the flag table byte flip bit back to 1
>>> after a page write it's the reverse of the first paragraph, it will be
>>> assumed that the write-out did not complete when it actually did if
>>> power to the processor is lost during that, that sucks but seems like a
>>> fairly unlikely edge-case.
>>
>> Problems arise if you have any sort of multi-tasking, because then you
>> need to have semaphores/mutexes around all this stuff, and you probably
>> need to make the whole thing asynchronous to avoid deadlocks.
>>
>> Journalling file systems end up writing a complete copy of the changed
>> data to the journal, then to the file system, then updating the file
>> system metadata and even then it's not 100% guaranteed safe because the
>> final metadata update can be corrupted too. It's just a smaller window
>> at risk.
>>
>> You need a full copy of the data which is being changed in the journal
>> so you can recover from interrupted partial page writes to the main file
>> system. Simply knowing it failed or no longer has the correct checksum
>> isn't much use.
>>
>
> The situation I'm thinking of in a real-time application is for example
> where battery-backed SRAM is used to store e.g. sequences of user
> entered data for some purpose, like say a list of pulse lengths or
> something. User punches "1234567", it shows up on the screen, user hits
> "commit" and at that point it's stored to a list in "mass storage."
>
> If during the write-out after the "commit" button is pushed power is
> lost during some part of the write sequence, if I know that it failed, I
> can at least on restart wipe that block of memory and not add the entry
> to the table the user sees so they at least know it didn't take.
When that is the usage, it is easy.
The usual situation is that the SRAM is used to store configuration
data that is valid as a complete set. It has to be checked if valid
(e.g. CRC) and if not valid it should revert to the previous state or
back to defaults, depending on the specs. That is where the 2 copies
potentially come in.
What you have is just a serial storage of data and it requires only a
CRC per record. ECC is not much use as bit errors in SRAM are rare,
and the cause of errors more likely is power failure (both during the
write and during powerdown when the battery runs out), and doing ECC
potentially makes things worse ("correcting" bad data to seemingly
valid good data that actually is trash).
Back to sci.electronics.design | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Hamming ECC bitrex <user@example.net> - 2018-07-05 11:00 -0400
Re: Hamming ECC Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2018-07-06 09:31 +0100
Re: Hamming ECC David Brown <david.brown@hesbynett.no> - 2018-07-06 11:05 +0200
Re: Hamming ECC bitrex <user@example.net> - 2018-07-06 22:15 -0400
Re: Hamming ECC gnuarm.deletethisbit@gmail.com - 2018-07-06 20:03 -0700
Re: Hamming ECC bitrex <user@example.net> - 2018-07-06 23:41 -0400
Re: Hamming ECC bitrex <user@example.net> - 2018-07-06 23:48 -0400
Re: Hamming ECC bitrex <user@example.net> - 2018-07-07 00:17 -0400
Re: Hamming ECC +++ATH0 <news@ringpiece.local> - 2018-07-11 20:47 -0700
Re: Hamming ECC bitrex <user@example.net> - 2018-07-12 00:12 -0400
Re: Hamming ECC Rob <nomail@example.com> - 2018-07-12 08:15 +0000
Re: Hamming ECC Clive Arthur <cliveta@nowaytoday.co.uk> - 2018-07-06 12:59 +0100
csiph-web