projects
/
nmigen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1655b59
)
back.pysim: close .vcd/.gtkw files on context manager exit.
author
whitequark
<whitequark@whitequark.org>
Fri, 14 Dec 2018 13:59:03 +0000
(13:59 +0000)
committer
whitequark
<whitequark@whitequark.org>
Fri, 14 Dec 2018 13:59:03 +0000
(13:59 +0000)
nmigen/back/pysim.py
patch
|
blob
|
history
diff --git
a/nmigen/back/pysim.py
b/nmigen/back/pysim.py
index a174ec80aa6c776e181fd318132bdf573ff2809b..d6df00a8130344764a9cd182348ab1c7a4ba7550 100644
(file)
--- a/
nmigen/back/pysim.py
+++ b/
nmigen/back/pysim.py
@@
-579,3
+579,8
@@
class Simulator:
for signal in self._gtkw_signals:
add_trace(signal)
+
+ if self._vcd_file:
+ self._vcd_file.close()
+ if self._gtkw_file:
+ self._gtkw_file.close()