From: whitequark Date: Fri, 3 Apr 2020 05:20:42 +0000 (+0000) Subject: back.pysim: fix emission of undriven traces to VCD files. X-Git-Tag: working_23jun2020~19 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ec8386a797cc0e37bc07a2b3c06c0c20e0ef5533;p=nmigen.git back.pysim: fix emission of undriven traces to VCD files. This has been originally implemented in commit d3775eed (which fixed `write_vcd(traces=)` to do something at all), but had a flaw where undriven traces would not be correctly placed in hierarchy. This used to produce incorrect results on pyvcd 0.1, but started causing assertion failures on pyvcd 0.2. Fixes #345. --- diff --git a/nmigen/back/pysim.py b/nmigen/back/pysim.py index 96e98e7..398266e 100644 --- a/nmigen/back/pysim.py +++ b/nmigen/back/pysim.py @@ -93,7 +93,7 @@ class _VCDWaveformWriter(_WaveformWriter): trace_names = SignalDict() for trace in traces: if trace not in signal_names: - trace_names[trace] = trace.name + trace_names[trace] = {("top", trace.name)} self.traces.append(trace) if self.vcd_writer is None: