vunit
vunit copied to clipboard
Add missing VUunit macros for ActiveHDL simulator when running in GUI mode
When a simulator runs in GUI mode, the following procedures are expected to be available from the GUI console window:
# vunit_help
# - Prints this help
# vunit_load [vsim_extra_args]
# - Load design with correct generics for the test
# - Optional first argument are passed as extra flags to vsim
# vunit_user_init
# - Re-runs the user defined init file
# vunit_run
# - Run test, must do vunit_load first
# vunit_compile
# - Recompiles the source files
# vunit_restart
# - Recompiles the source files
# - and re-runs the simulation if the compile was successful
These are defined inside TCL files that are automatically generated by VUnit. These files are "sourced" into the simulator once it starts in GUI mode. The script files are called gui.tcl, common.tcl and batch.tcl.
The existing version of VUnit does not define all of these macros for ActiveHDL. They are all supposed to work in ModelSim and RivieraPro according to my current understanding. The reason for not defining all of them is that ActiveHDL console is not a true TCL console. This is partially true in that by default the console is not in TCL mode. This can be changed by executing scripterconf -tcl command. This shall change the console mode into a true TCL console.
At present vunit_run and vunit_load are defined inside the common.tcl. They can be run from the console window once it has been put into TCL mode by executing the scripterconf -tcl command. It should be possible to describe the rest of the commands vunit_user_init, vunit_compile and vunit_restart for ActiveHDL also.
The script generation happens inside activehdl.py for ActiveHDL. The details of scripterconf can be found inside user manual of ActiveHDL.
Here is the user manual excerpt for the scripterconf command. It has been taken from the user manual of the ActiveHDL 11.1 64x. scripterconf command.pdf