From: whitequark Date: Fri, 14 Dec 2018 13:59:03 +0000 (+0000) Subject: back.pysim: close .vcd/.gtkw files on context manager exit. X-Git-Tag: working~262 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d9aaf0114b9e7450db4b4f89c68404f00d049e9a;p=nmigen.git back.pysim: close .vcd/.gtkw files on context manager exit. --- diff --git a/nmigen/back/pysim.py b/nmigen/back/pysim.py index a174ec8..d6df00a 100644 --- 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()