back.pysim: correctly add gtkwave traces for signals with decoders.
authorwhitequark <cz@m-labs.hk>
Fri, 12 Jul 2019 12:17:18 +0000 (12:17 +0000)
committerwhitequark <cz@m-labs.hk>
Fri, 12 Jul 2019 13:35:44 +0000 (13:35 +0000)
nmigen/back/pysim.py

index a32a9677dc2c2c81d2e851f951367924a0037880..76ef2d6a15476c0f4a5edc1624b119a5d18cc247 100644 (file)
@@ -849,7 +849,7 @@ class Simulator:
             def add_trace(signal, **kwargs):
                 signal_slot = self._signal_slots[signal]
                 if self._vcd_names[signal_slot] is not None:
-                    if len(signal) > 1:
+                    if len(signal) > 1 and not signal.decoder:
                         suffix = "[{}:0]".format(len(signal) - 1)
                     else:
                         suffix = ""