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-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0989aadadbe6383365c65d85d65b5ab84083e289;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()