Add base and display styles
authorCesar Strauss <cestrauss@gmail.com>
Sun, 23 Aug 2020 18:06:21 +0000 (15:06 -0300)
committerCesar Strauss <cestrauss@gmail.com>
Sun, 23 Aug 2020 18:06:21 +0000 (15:06 -0300)
src/soc/experiment/alu_fsm.py

index 7e09ab94ef19750eeb798355231782564f737535..f3973682b915555528eb823e46d14a52748dcf94 100644 (file)
@@ -363,10 +363,11 @@ def write_gtkw(gtkw_name, vcd_name, gtkw_style, gtkw_dom,
                     # prepend module name to signal
                     if 'module' in node_style:
                         signal_name = node_style['module'] + '.' + signal_name
-                    color = None
-                    if 'color' in node_style:
-                        color = colors[node_style['color']]
-                    gtkw.trace(signal_name, color=color)
+                    color = colors.get(node_style.get('color'))
+                    base = node_style.get('base')
+                    display = node_style.get('display')
+                    gtkw.trace(signal_name, color=color, datafmt=base,
+                               alias=display)
 
         walk(gtkw_dom, root_style)