From 0cdeafb983a2dc596d3b8c96393d34ce9eb9c44b Mon Sep 17 00:00:00 2001 From: Cesar Strauss Date: Mon, 4 Jan 2021 16:40:55 -0300 Subject: [PATCH] Define default zoom level for formal engines --- src/nmutil/gtkw.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nmutil/gtkw.py b/src/nmutil/gtkw.py index 53d5cb6..b3cf647 100644 --- a/src/nmutil/gtkw.py +++ b/src/nmutil/gtkw.py @@ -23,7 +23,8 @@ def write_gtkw(gtkw_name, vcd_name, gtkw_dom, gtkw_style=None, :param color: default trace color :param base: default numerical base :param loc: source code location to include as a comment - :param zoom: initial zoom level, in GTKWave format + :param zoom: initial zoom level, in GTKWave format. Can also be "formal" + when the file comes from a formal engine :param marker: initial location of a marker :param clk_period: clock period in seconds, helping to set a reasonable initial zoom level. @@ -87,6 +88,9 @@ def write_gtkw(gtkw_name, vcd_name, gtkw_dom, gtkw_style=None, gtkw.dumpfile(vcd_name) # set a reasonable zoom level # also, move the marker to an interesting place + if zoom == "formal": + # output from formal engines looks good at this zoom level + zoom = -6.3 if zoom is None: zoom = -42.8 - log2(clk_period) # base zoom level is affected by time resolution units -- 2.30.2