test/SyncFIFOCase: better test bench termination
This commit is contained in:
parent
e94f30f15d
commit
ce378f47d3
|
@ -29,7 +29,11 @@ class SyncFIFOCase(SimCase, unittest.TestCase):
|
||||||
tbp.dut.re = tbp.simulator.cycle_counter % 3 == 0
|
tbp.dut.re = tbp.simulator.cycle_counter % 3 == 0
|
||||||
# the output if valid must be correct
|
# the output if valid must be correct
|
||||||
if tbp.dut.readable and tbp.dut.re:
|
if tbp.dut.readable and tbp.dut.re:
|
||||||
|
try:
|
||||||
i = seq.pop(0)
|
i = seq.pop(0)
|
||||||
|
except IndexError:
|
||||||
|
print(tbp.dut.level)
|
||||||
|
raise StopSimulation
|
||||||
self.assertEqual(tbp.dut.dout.a, i)
|
self.assertEqual(tbp.dut.dout.a, i)
|
||||||
self.assertEqual(tbp.dut.dout.b, i*2)
|
self.assertEqual(tbp.dut.dout.b, i*2)
|
||||||
self.run_with(cb, 20)
|
self.run_with(cb)
|
||||||
|
|
Loading…
Reference in New Issue