Skip to content

Commit 8407876

Browse files
committed
Zoom out when gtkwave starts
1 parent 553aac6 commit 8407876

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pyverilator/pyverilator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,11 @@ def start_gtkwave(self):
420420
self.gtkwave_tcl = tclwrapper.TCLWrapper('gtkwave', '-W')
421421
self.gtkwave_tcl.start()
422422
self.gtkwave_tcl.eval('gtkwave::loadFile %s' % self.vcd_filename)
423+
# adjust the screen to show more of the trace
424+
zf = float(self.gtkwave_tcl.eval('gtkwave::getZoomFactor'))
425+
# this seems to work well
426+
new_zf = zf - 5
427+
self.gtkwave_tcl.eval('gtkwave::setZoomFactor %f' % (new_zf))
423428

424429
def send_signals_to_gtkwave(self, signal_names):
425430
if not self.gtkwave_active:

0 commit comments

Comments
 (0)