test/test_bist: use generator to corrupt memory (allow testing base address on checker/generator)
This commit is contained in:
parent
40168db0b4
commit
d213a628f8
|
@ -56,22 +56,18 @@ def main_generator(dut, mem):
|
||||||
yield from checker.run(16, 64)
|
yield from checker.run(16, 64)
|
||||||
assert checker.errors == 0
|
assert checker.errors == 0
|
||||||
|
|
||||||
# corrupt memory (4 errors)
|
# corrupt memory (using generator)
|
||||||
for i in range(4):
|
yield from generator.reset()
|
||||||
mem.mem[i+16] = ~mem.mem[i+16]
|
yield from generator.run(16 + 60, 64)
|
||||||
|
|
||||||
# read (4 errors)
|
# read (4 errors)
|
||||||
yield from checker.reset()
|
yield from checker.reset()
|
||||||
yield from checker.run(16, 64)
|
yield from checker.run(16, 64)
|
||||||
assert checker.errors == 4
|
assert checker.errors == 4
|
||||||
|
|
||||||
# revert memory
|
|
||||||
for i in range(4):
|
|
||||||
mem.mem[i+16] = ~mem.mem[i+16]
|
|
||||||
|
|
||||||
# read (no errors)
|
# read (no errors)
|
||||||
yield from checker.reset()
|
yield from checker.reset()
|
||||||
yield from checker.run(16, 64)
|
yield from checker.run(16 + 60, 64)
|
||||||
assert checker.errors == 0
|
assert checker.errors == 0
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue