General Description: After I run a simulation with a VHDL testbench created by HDL Bencher, the following error occurs when I attempt to load another simulation from the GUI:
"# bad Optionmenu index "1ps" # Load canceled"
The GUI then freezes, and the MTI application must be terminated.
This error occurs when VHDL testbench created by HDL Bencher is used, or when any testbench that asserts a failure is used. Asserting a failure is one way to end a VHDL simulation when the simulation is complete. Even if a VHDL simulation is successful, HDL Bencher asserts a failure simply to end the simulation when it is complete. Once a failure has been asserted, clicking on the Simulate icon or selecting Simulate -> Simulate from the toolbar will cause this error.
This problem is due to a bug in the 5.6e version of ModelSim. The bug was fixed in the 5.7 version of ModelSim.
When this error occurs, the MTI application must be terminated from the Windows Task Manager:
1. Press the Ctrl, Alt, and Delete keys at the same time. 2. Click on "Task Manager". 3. Click on the Applications tab in the Task Manager. 4. Select ModelSim SE 5.6e. 5. Click on "End Task".
The other resolutions in this Answer Record provide information on avoiding this problem in the future.
Because this error only occurs after a VHDL simulation that asserts a failure is run and the user clicks on the Simulate icon or selects Simulate -> Simulate from the toolbar, this error can be prevented by using a DO file to reload the simulation or by entering the VSim command line at the ModelSim prompt.
After a failure has been asserted, the ModelSim prompt will appear as follows: VSIM(paused)>
At this prompt, load a new simulation by running a DO file or by manually entering the VSim command line. You can also run a DO file by selecting Tools -> Execute Macro and browsing to the DO file that you wish to run.
You can also prevent this error by closing ModelSim and reopening it before loading a new simulation.