Hello everyone,
I use python unittest for testing things and sometimes I want to have a
closer look, why something fails and create a vcd dump.
The problem is, when I want to dump multiple test-cases, this won't
work, because of
> ERROR: test_write_read (__main__.MyTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "test_registerbank.py", line 30, in wrapper
> return Simulation(self.dut_cl, clkGen, stimulus).run()
> File
> "/home/marcel/projects/micro/VE2/lib/python2.7/site-packages/myhdl/_Simulation.py",
> line 129, in run
> _extend(s._update())
> File
> "/home/marcel/projects/micro/VE2/lib/python2.7/site-packages/myhdl/_Signal.py",
> line 201, in _update
> self._printVcd()
> File
> "/home/marcel/projects/micro/VE2/lib/python2.7/site-packages/myhdl/_Signal.py",
> line 321, in _printVcdBit
> print("%d%s" % (self._val, self._code), file=sim._tf)
> ValueError: I/O operation on closed file
Is there a change to do a clean shutdown of the old trace-run and start
a new one (e.g. putting that code in setup and teardown method of the
testcase)
Regards,
Marcel
|