multiple tracing per run

Marcel Hellwig <[email protected]> Mon, 25 Jan 2016 20:14:02 +0100
Newsgroups gmane.comp.python.myhdl
Message-ID <[email protected]>
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

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140

_______________________________________________
myhdl-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/myhdl-list
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCgAGBQJWpnP8AAoJEIROXYQnkAHpMTEP/idSrLiYpki4KulyF0XTJoRc
kaRf+uVOpbNLtzsVW3a2T7sMtjgWzt95bqLnxhCnqHOHFSmrYpzsOe95v/SNbdJm
i6XPKsqpQ0gxEpyO135jXn1woYUu9bnvymjzBtW7YWnCCKpl8qPauGWX6gTCXLxT
gvPgsBm2ugYtg7+l5Bwep5aSSpwcpK0qWMzAmNZxq4S5XvwS2BI7+s9srh5Czjis
/KEAFyZ2Ntb/zWrGVvA4nhmQa7SpQlV4Qppehr/VQKqk/p7f36Cs00htb0Uvnq1S
HyWq35zrSo0cgX4YIL5kaqUBctF/c7RdyNQ1I2JUt4us1EpFIK5s1AtNtOnvzyuf
iQs8Y/UsbwKKIwjqqUpeN6s6sZfdL0LWThoLnTV5U9g7uhGvd6+9oxI/qpRdhMe0
bXLjaItdnC/vYGD3POBFEZylEl4uyGzXD0hT84upo8WQjn0Wd0XDxLnSYvpOEo3a
A7AUOhsKFvV8EolhXdi159y7wniBlpLbGNUBDNO9Dz2Mk4zg/00m+hiKTMaZxCM0
ewqQONwrq1TVMom2vfODlIGK+gnW2TNArl7cHRtEns2psd7draBy595z+5cl34FD
qHstUBh0RpHoX/kKBEt/hcxsINmcso7y3vasBalHD584dDj2c/q4iMNaMEWCszba
oKxlGWDxMjd+W21ozZJI
=RW5j
-----END PGP SIGNATURE-----