User manual

...the world's most energy friendly microcontrollers
2012-04-24 - Giant Gecko Family - d0053_Rev0.96 196
www.energymicro.com
Figure 14.31. EBI ECC Generation
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Byte 0
Byte 1
Byte 2
Byte 3
Byte N-4
Byte N-3
Byte N-2
Byte N-1
P8'
P8
P8'
P8
P32'
P16
P16'
P8'
P8
P8'
P8
P32
P16
P16'
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
P1 P1' P1 P1' P1 P1' P1 P1'
P2 P2' P2 P2'
P4 P4'
Table 14.8. EBI ECC Bit/Column Parity
Parity bit Generation for 8-bit data
P1' Bit 6 xor Bit 4 xor Bit 2 xor Bit 0 xor P1'
P1 Bit 7 xor Bit 5 xor Bit 3 xor Bit 1 xor P1
P2' Bit 5 xor Bit 4 xor Bit 1 xor Bit 0 xor P2'
P2 Bit 7 xor Bit 6 xor Bit 3 xor Bit 2 xor P2
P4' Bit 3 xor Bit 2 xor Bit 1 xor Bit 0 xor P4'
P4 Bit 7 xor Bit 6 xor Bit 5 xor Bit 4 xor P4
Table 14.9. EBI ECC Byte/Row Parity
Parity bit Generation for 8-bit data
RP(x) Byte(x)(7) xor Byte(x)(6) xor Byte(x)(5) xor Byte(x)(4) xor
Byte(x)(3) xor Byte(x)(2) xor Byte(x)(1) xor Byte(x)(0)
P8' RP(0) xor RP(2) xor RP(4) xor RP(6) xor ... xor RP(N-4) xor
RP(N-2)
P8 RP(1) xor RP(3) xor RP(5) xor RP(7) xor ... xor RP(N-3)xor
RP(N-1)
P16' RP(0) xor RP(1) xor RP(4) xor RP(5) xor ... xor RP(N-4) xor
RP(N-3)
P16 RP(2) xor RP(3) xor RP(6) xor RP(7) xor ... xor RP(N-2) xor
RP(N-1)
Etc. Etc.
The generated ECC code can be read from the EBI_ECCPARITY register according to the format shown
in Figure 14.32 (p. 197) . The number of valid ECC bits depends on the number of transferred bytes
during the time that the ECC hardware is running as indicated in Table 14.10 (p. 197) .