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.
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: