From d9aaf0114b9e7450db4b4f89c68404f00d049e9a Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 14 Dec 2018 13:59:03 +0000 Subject: [PATCH] back.pysim: close .vcd/.gtkw files on context manager exit. --- nmigen/back/pysim.py | 5 +++++ 1 file changed, 5 insertions(+) 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() -- 2.30.2