From 05548912c73ee5bfbfb6da4903d1c18af332324b Mon Sep 17 00:00:00 2001 From: Zapta Date: Tue, 12 Nov 2024 21:23:37 -0800 Subject: [PATCH] Added before the gtkwave command a command to setup the cache. This is required for gtkwave to start after installing the oss-cad-suite on Windows. This is not required on Darwin and I believe also on linux. With the standlaone upstream oss-cad-suite, this is done in the environment.bat shell script. --- apio/scons/scons_util.py | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/apio/scons/scons_util.py b/apio/scons/scons_util.py index ddde0d72..2195f83f 100644 --- a/apio/scons/scons_util.py +++ b/apio/scons/scons_util.py @@ -516,14 +516,32 @@ def make_waves_target( module is to derive the name of the .gtkw which can be used to save the viewer configuration for future simulations. Returns the new targets. """ - result = env.Alias( - "sim", - vcd_file_target, + + # -- Construct the commands list. + commands = [] + + # -- On windows we need to setup the cache. This could be done once + # -- when the oss-cad-suite is installed but since we currently don't + # -- have a package setup mechanism, we do it here on each invocation. + # -- The time penalty is negligible. + # -- With the stock oss-cad-suite windows package, this is done in the + # -- environment.bat script. + if is_windows(env): + commands.append("gdk-pixbuf-query-loaders --update-cache") + + # -- The actual wave viewer command. + commands.append( "gtkwave {0} {1} {2}.gtkw".format( '--rcvar "splash_disable on" --rcvar "do_initial_zoom_fit 1"', vcd_file_target[0], top_module, - ), + ) + ) + + result = env.Alias( + "sim", + vcd_file_target, + commands, ) return result