5

The fundamental formula for a Hamming coding is as below:

2^k≥n+k+1

Where k = # of parity bits and n = data bits

In a DDR system with ECC feature, every data byte will generate an additional ECC bit which makes a byte data 9 bits long.

However, if simply applying the Hamming code formula here, 8 bits of data will require 4 parity bits which will make the encoded data 12 bits long.

In this case, how can the DDR ECC feature be realized with the Hamming coding scheme?

JRE
  • 67,678
  • 8
  • 104
  • 179
Learner
  • 175
  • 11
  • It's trivial to understand by using a venn diagram or a concept related to packing spheres, in this case. – jonk Sep 27 '20 at 12:41

3 Answers3

8

The ECC is not performed on an individual byte basis.

Usually, 8 bytes are combined with one parity bit per byte. Giving a total of 72 bits.

Since only 7 parity bits are needed to correct single-bit errors and 8 are available the extra bit can be used to detect double bit errors, although not correct the error.

Hamming code

Hamming Codes With Additional Parity

Kevin White
  • 32,097
  • 1
  • 47
  • 74
  • So every additional bit generated from a byte data is simply a parity result from that particular 8 bits data? – Learner Sep 27 '20 at 13:06
  • 4
    @Learner - no. The parity bits have to come from a combination of bits among multiple bytes. – Kevin White Sep 27 '20 at 13:09
  • Looking at the algorithm table from the Wikipedia, supposed 64 bits data only require 7 parity bits. Technically, can i say that the parity #8 in a DDR symbol is redundant? – Learner Sep 27 '20 at 13:26
  • 1
    @Learner - it adds the capability of detecting double-bit errors. – Kevin White Sep 27 '20 at 19:43
6

DDR4 is not byte accessable. Each address has 64 bits or 8 bytes. The ECC makes each symbol 72 bits wide.

Justme
  • 127,425
  • 3
  • 97
  • 261
  • that's mean the 2^k≥n+k+1 formula still valid for this? 2^8 >= 64+8+1 – Learner Sep 27 '20 at 13:09
  • 3
    @Learner No, `2^7 ≥ 64+7+1`. When ECC is used for DDR RAM, there are usually a multiple of 9 chips (usually 9 chips with 8 bits per chip). Thus, there are 72 bits available: 64 bits for the data, 7 bits for the Hamming code and 1 bit which is often used as a parity bit to detect double bit errors. – Toothbrush Sep 27 '20 at 22:22
0

as far as I know, ECC with DDRam only can correct single bit errors.

schnedan
  • 2,538
  • 7
  • 16