2.11. Working with the EDAC

Using memory that is 40 bits wide, the ERC32's EDAC can correct single-bit errors in any 32-bit word, and can detect any double-bit error. The version 1.7 simulator contains a simulation of the EDAC and by default, this is switched off. In this state, the additional 8 bits of information are generated on each write to an EDAC-protected area of memory, but are not tested on memory reads.

The ERC32 offers EDAC protection for RAM, for ERAM and for the boot PROM, provided the PROM is the 40-bit wide kind. The 8-bit PROM has no EDAC protection, and no parity protection either. When EDAC simulation is switched on, then depending on further options set in the system registers, the EDAC may be used to correct and detect errors in memory. This raises several issues, some of which are very important from the point of view of running the odd test program.

In the following example we run a program that requires the EDAC. We introduce random SEU errors into RAM at a rate of 100000 per MB per day, which for a 8MB RAM is aproximately 9 per second.

Example 2-16. Running the simulator with the EDAC

$ erc-coff-run my_program -a "-edac -mer 100000 -trace-edac"
Setting memory error rate to 100000 per MB per day
Tracing EDAC errors
17280000: SEU before: addr 0035c5a0 bit 15, p 0, cb 00, data 00000000
17280000: ...  after:                       p 0, cb 00, data 01000000
34560000: SEU before: addr 00321e4c bit 31, p 0, cb 00, data 00000000
34560000: ...  after:                       p 0, cb 00, data 00000100 
...