From 739a62a0fa894115f412b927565c504d6f85f40a Mon Sep 17 00:00:00 2001 From: std-max <85441682+std-max@users.noreply.github.com> Date: Sun, 6 Nov 2022 18:14:05 +0100 Subject: [PATCH 1/2] Add a specific menu for VUnit in ModelSim --- vunit/sim_if/vsim_simulator_mixin.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vunit/sim_if/vsim_simulator_mixin.py b/vunit/sim_if/vsim_simulator_mixin.py index ff21c0e04..27c95bf5a 100644 --- a/vunit/sim_if/vsim_simulator_mixin.py +++ b/vunit/sim_if/vsim_simulator_mixin.py @@ -257,6 +257,14 @@ def _create_gui_script(self, common_file_name, config): """ tcl = f'source "{fix_path(common_file_name)!s}"\n' tcl += self._create_user_init_function(config) + tcl += 'add_menu "" VUnit\n' + tcl += 'add_menuitem "" VUnit "vunit user init" vunit_user_init\n' + tcl += 'add_menuitem "" VUnit "vunit compile" vunit_compile\n' + tcl += 'add_menuitem "" VUnit "vunit load" vunit_load\n' + tcl += 'add_menuitem "" VUnit "vunit run" vunit_run\n' + tcl += 'add_menuitem "" VUnit "vunit restart" vunit_restart\n' + tcl += 'add_separator "" VUnit\n' + tcl += 'add_menuitem "" VUnit "vunit help" vunit_help\n' tcl += "if {![vunit_load]} {\n" tcl += " vunit_user_init\n" tcl += " vunit_help\n" From 9e788a779351685402907e277393d620c9846338 Mon Sep 17 00:00:00 2001 From: std-max <85441682+std-max@users.noreply.github.com> Date: Sun, 6 Nov 2022 18:18:44 +0100 Subject: [PATCH 2/2] Rename menu using title case convention --- vunit/sim_if/vsim_simulator_mixin.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vunit/sim_if/vsim_simulator_mixin.py b/vunit/sim_if/vsim_simulator_mixin.py index 27c95bf5a..def3964fd 100644 --- a/vunit/sim_if/vsim_simulator_mixin.py +++ b/vunit/sim_if/vsim_simulator_mixin.py @@ -258,13 +258,13 @@ def _create_gui_script(self, common_file_name, config): tcl = f'source "{fix_path(common_file_name)!s}"\n' tcl += self._create_user_init_function(config) tcl += 'add_menu "" VUnit\n' - tcl += 'add_menuitem "" VUnit "vunit user init" vunit_user_init\n' - tcl += 'add_menuitem "" VUnit "vunit compile" vunit_compile\n' - tcl += 'add_menuitem "" VUnit "vunit load" vunit_load\n' - tcl += 'add_menuitem "" VUnit "vunit run" vunit_run\n' - tcl += 'add_menuitem "" VUnit "vunit restart" vunit_restart\n' + tcl += 'add_menuitem "" VUnit "VUnit User Init" vunit_user_init\n' + tcl += 'add_menuitem "" VUnit "VUnit Compile" vunit_compile\n' + tcl += 'add_menuitem "" VUnit "VUnit Load" vunit_load\n' + tcl += 'add_menuitem "" VUnit "VUnit Run" vunit_run\n' + tcl += 'add_menuitem "" VUnit "VUnit Restart" vunit_restart\n' tcl += 'add_separator "" VUnit\n' - tcl += 'add_menuitem "" VUnit "vunit help" vunit_help\n' + tcl += 'add_menuitem "" VUnit "VUnit Help" vunit_help\n' tcl += "if {![vunit_load]} {\n" tcl += " vunit_user_init\n" tcl += " vunit_help\n"