From 9a950f051a3d2be855e61b26383907785852caa0 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 12 Oct 2018 17:13:53 +0200 Subject: [PATCH] ecc: update core/test --- litedram/frontend/ecc.py | 8 ++++---- test/test_ecc.py | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/litedram/frontend/ecc.py b/litedram/frontend/ecc.py index 5037944..62af41d 100644 --- a/litedram/frontend/ecc.py +++ b/litedram/frontend/ecc.py @@ -150,8 +150,8 @@ class ECCDecoder(SECDEC, Module): class LiteDRAMNativePortECCW(Module): def __init__(self, data_width_from, data_width_to): - self.sink = sink = Endpoint(wdata_description(data_width_from, False)) - self.source = source = Endpoint(wdata_description(data_width_to, False)) + self.sink = sink = Endpoint(wdata_description(data_width_from)) + self.source = source = Endpoint(wdata_description(data_width_to)) # # # @@ -168,8 +168,8 @@ class LiteDRAMNativePortECCW(Module): class LiteDRAMNativePortECCR(Module): def __init__(self, data_width_from, data_width_to): - self.sink = sink = Endpoint(rdata_description(data_width_to, False)) - self.source = source = Endpoint(rdata_description(data_width_from, False)) + self.sink = sink = Endpoint(rdata_description(data_width_to)) + self.source = source = Endpoint(rdata_description(data_width_from)) self.enable = Signal() self.sec = Signal(8) self.dec = Signal(8) diff --git a/test/test_ecc.py b/test/test_ecc.py index c560917..ba87e14 100644 --- a/test/test_ecc.py +++ b/test/test_ecc.py @@ -53,6 +53,7 @@ class TestECC(unittest.TestCase): def generator(dut, k, nvalues, nerrors): dut.errors = 0 prng = random.Random(42) + yield dut.decoder.enable.eq(1) for i in range(nvalues): data = prng.randrange(2**k-1) yield dut.encoder.i.eq(data)