From 11cc26c690225ff7e24d3f05a28f2e101d0fd605 Mon Sep 17 00:00:00 2001 From: Cesar Strauss Date: Wed, 18 Nov 2020 07:55:31 -0300 Subject: [PATCH] Avoid use of "trace_bit" to print trace bits It turns out, "trace_bit" really depends on the "trace_bits" context to update flags. Use the normal "trace" call instead. --- src/nmutil/gtkw.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/nmutil/gtkw.py b/src/nmutil/gtkw.py index 83a7db1..8f15bd8 100644 --- a/src/nmutil/gtkw.py +++ b/src/nmutil/gtkw.py @@ -145,12 +145,10 @@ def write_gtkw(gtkw_name, vcd_name, gtkw_dom, gtkw_style=None, node_color = colors.get(node_style.get('color')) node_base = node_style.get('base') display = node_style.get('display') - if 'bit' not in node_style: - gtkw.trace(signal_name, color=node_color, - datafmt=node_base, alias=display) - else: + if 'bit' in node_style: bit = node_style['bit'] - gtkw.trace_bit(bit, signal_name, color=node_color, - alias=display) + signal_name = f'({bit}){signal_name}' + gtkw.trace(signal_name, color=node_color, + datafmt=node_base, alias=display) walk(gtkw_dom, root_style) -- 2.30.2