From ce378f47d3edd48bb27733148079d75639363b17 Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Mon, 7 Apr 2014 00:04:36 +0200 Subject: [PATCH] test/SyncFIFOCase: better test bench termination --- migen/test/test_fifo.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/migen/test/test_fifo.py b/migen/test/test_fifo.py index 6aac2483..ac5ec464 100644 --- a/migen/test/test_fifo.py +++ b/migen/test/test_fifo.py @@ -29,7 +29,11 @@ class SyncFIFOCase(SimCase, unittest.TestCase): tbp.dut.re = tbp.simulator.cycle_counter % 3 == 0 # the output if valid must be correct if tbp.dut.readable and tbp.dut.re: - i = seq.pop(0) + try: + i = seq.pop(0) + except IndexError: + print(tbp.dut.level) + raise StopSimulation self.assertEqual(tbp.dut.dout.a, i) self.assertEqual(tbp.dut.dout.b, i*2) - self.run_with(cb, 20) + self.run_with(cb) -- 2.30.2