From 346e64c3f254825f81a6af28339d3f303d8544c0 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Sun, 4 Nov 2018 17:07:00 +0100 Subject: [PATCH] frontend/ecc: fix typo --- litedram/frontend/ecc.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/litedram/frontend/ecc.py b/litedram/frontend/ecc.py index 62af41d..4efcfef 100644 --- a/litedram/frontend/ecc.py +++ b/litedram/frontend/ecc.py @@ -8,6 +8,7 @@ from litex.soc.interconnect.stream import * from litedram.common import wdata_description, rdata_description + def compute_m_n(k): m = 1 while (2**m < (m + k + 1)): @@ -44,7 +45,7 @@ def compute_cover_positions(m, p): return r -class SECDEC: +class SECDED: def place_data(self, data, codeword): d_pos = compute_data_positions(len(codeword)) for i, d in enumerate(d_pos): @@ -76,7 +77,7 @@ class SECDEC: [codeword[i] for i in range(len(codeword))])) -class ECCEncoder(SECDEC, Module): +class ECCEncoder(SECDED, Module): def __init__(self, k): m, n = compute_m_n(k) @@ -103,7 +104,7 @@ class ECCEncoder(SECDEC, Module): self.comb += o.eq(Cat(parity, codeword_d_p)) -class ECCDecoder(SECDEC, Module): +class ECCDecoder(SECDED, Module): def __init__(self, k): m, n = compute_m_n(k)