Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a specific menu for VUnit in ModelSim GUI #844

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions vunit/sim_if/vsim_simulator_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The add_menu and and add_menuitem commands are mot supported by Riviera-PRO and Active-HDL. Quickly looking at these tools I don't see anything similar. I suggest that this is limited to ModelSim for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I did not see that it was used for both ModelSim and Aldec simulators :s
How would you like to procede? Overiding _create_gui_script in modelsim.py and calling super() in it?
Or adding a variable in the mixin like extra_gui_commands and tcl += f"{extra_gui_commands}\n" and set in modelsim.py?

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"
Expand Down