Re: [myhdl-list] multiple tracing per run
Brought to you by:
jandecaluwe
From: Henry G. <he...@ca...> - 2016-01-26 13:29:51
|
On 25/01/16 19:14, Marcel Hellwig wrote: > 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) I'm somewhat unfamiliar with the tracing code, but it is (at least it used to be) necessary to manually call the _finalize method on the simulator before being able to run it again. I assume this carries through to the trace code? Henry |