Skip to content

Commit 934d4e8

Browse files
committed
Restored the default auto zoom out of gtkwave, it can now be disable by configuring apio.ini.
1 parent ffe8c22 commit 934d4e8

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

apio/scons/plugin_util.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,11 @@ def create_default_gtkw_file(
461461

462462
# -- The actual wave viewer command.
463463
gtkwave_cmd = ["gtkwave"]
464-
gtkwave_cmd.extend(["--rcvar=splash_disable on"])
464+
# -- NOTE: Users can override these rcvars by adding the desired
465+
# -- rcvar options in apio.ini gtkwave-extra-options which will win
466+
# -- since they will appear later in the command line.
467+
gtkwave_cmd.append("--rcvar=splash_disable on")
468+
gtkwave_cmd.append("--rcvar=do_initial_zoom_fit 1")
465469
if gtkwave_extra_options:
466470
gtkwave_cmd.extend(gtkwave_extra_options)
467471
gtkwave_cmd.extend([vcd_path, gtkw_path])

docs/cmd-apio-sim.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ signals, modify them in GTKWave and save your configuration using the
1818
`File > Write Save File` menu command. The `apio sim` command will never
1919
overwrite a `.gtkw` files that were saved in this way.
2020

21+
The command line that used to invoke the signal viewer `gtkwave` can be
22+
customized using the `apio.ini` option `gtkwave-extra-options`.
23+
For example, the option below disables the var `do_initial_zoom_fit` to prevent
24+
gtkwave from forcing a fully-out zoom upon start.
25+
26+
```
27+
[env:default]
28+
gtkwave-extra-options =
29+
--rcvar=do_initial_zoom_fit 0
30+
```
31+
2132
The `apio sim` command defines the macro `APIO_SIM=1`, which allows failed
2233
assertions to skip the `$fatal` call. This lets the simulation continue and
2334
display faulty signals in the GTKWave viewer.

docs/project-file.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,13 @@ raw -- verible-verilog-format --helpfull`
173173

174174
The optional `gtkwave-extra-options` string list option allows adding options to the
175175
gtkwave command that that is invoked by the `apio sim`.
176-
In the example below, it enable the flag `do_initial_zoom_fit` to force
177-
gtkwave to always start with a fully zoomed out view of the signals.
176+
For example, the option below disables the var `do_initial_zoom_fit` to prevent
177+
gtkwave from forcing a fully-out zoom upon start.
178178

179179
```
180180
[env:default]
181181
gtkwave-extra-options =
182-
--rcvar=do_initial_zoom_fit 1
182+
--rcvar=do_initial_zoom_fit 0
183183
```
184184

185185
### nextpnr-extra-options

0 commit comments

Comments
 (0)