The main usage of the sim options .init_file.gui is loading the correct wave file.
To load the correct wave file, the vunit_tb_path variable is defined during script evaluation. That variable points to the directory that contains the testbench.
If a user wants to load different wave files for different test benches located in the same directory, the name of the testbench is needed.
This PR adds the name of the test bench as a tcl variable called vunit_tb_name for modelsim, riviera and active-hdl.
This PR also adds the vunit_tb_path for active-hdl.
global wavefile
set wavefile ${vunit_tb_path}/${vunit_tb_name}_wave.do
# try to source a wave file with the name of the design unit
if { [file exists ${wavefile}] } {
puts "loading wave from '${wavefile}'."
do ${wavefile}
} else {
puts "No Wave file found in the testbench directory. If you save a wave as '${vunit_tb_name}_wave.do', it will be loaded automatically next time."
}
The main usage of the sim options.init_file.gui is loading the correct wave file.
To load the correct wave file, the
vunit_tb_path
variable is defined during script evaluation. That variable points to the directory that contains the testbench.If a user wants to load different wave files for different test benches located in the same directory, the name of the testbench is needed.
This PR adds the name of the test bench as a tcl variable called
vunit_tb_name
for modelsim, riviera and active-hdl. This PR also adds thevunit_tb_path
for active-hdl.Example usage for Active-HDL
tb.set_sim_option("activehdl.init_file.gui", "activehdl_gui.do")
activehdl_gui.do: