From: Cesar Strauss Date: Wed, 18 Nov 2020 10:55:31 +0000 (-0300) Subject: Avoid use of "trace_bit" to print trace bits X-Git-Tag: 24jan2021_ls180~6 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=11cc26c690225ff7e24d3f05a28f2e101d0fd605;p=nmutil.git 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. --- 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)