From: Robert Jordens Date: Sun, 6 Apr 2014 22:04:36 +0000 (+0200) Subject: test/SyncFIFOCase: better test bench termination X-Git-Tag: 24jan2021_ls180~2099^2~369 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce378f47d3edd48bb27733148079d75639363b17;p=litex.git test/SyncFIFOCase: better test bench termination --- 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)