test/test_ecc: update

This commit is contained in:
Florent Kermarrec 2019-01-04 10:43:57 +01:00
parent 6757a14d51
commit 2483d25f79
1 changed files with 5 additions and 5 deletions

View File

@ -72,23 +72,23 @@ class TestECC(unittest.TestCase):
if nerrors < 2:
if (yield dut.decoder.o) != data:
dut.errors += 1
# if 0 error, verify sec == 0 / dec == 0
# if 0 error, verify sec == 0 / ded == 0
if nerrors == 0:
if (yield dut.decoder.sec) != 0:
dut.errors += 1
if (yield dut.decoder.dec) != 0:
if (yield dut.decoder.ded) != 0:
dut.errors += 1
# if 1 error, verify sec == 1 / dec == 0
elif nerrors == 1:
if (yield dut.decoder.sec) != 1:
dut.errors += 1
if (yield dut.decoder.dec) != 0:
if (yield dut.decoder.ded) != 0:
dut.errors += 1
# if 2 errors, verify sec == 0 / dec == 1
# if 2 errors, verify sec == 0 / ded == 1
elif nerrors == 2:
if (yield dut.decoder.sec) != 0:
dut.errors += 1
if (yield dut.decoder.dec) != 1:
if (yield dut.decoder.ded) != 1:
dut.errors += 1
for i in range(3):