Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21184 Discussions

ModelSim opening in default text editor

JHubb2
Beginner
15,375 Views

Hello!

When I double click a .vhd file in ModelSim, it opens in Notepad++, is there any way to make it such that files open in ModelSim instead.

 

And to clarify, I am NOT asking how to change the default editor in Windows for .vhd files, I know that ModelSim is using the default program. I wish to know if there is any way to have ModelSim be the editor for files double-clicked in the ModelSim GUI rather than the default one popping up.

 

Thanks!

0 Kudos
3 Replies
RichardTanSY_Intel
15,128 Views
There are two methods that I found in which by double-clicking the .vhd file in ModelSim GUI, it will open in ModelSim GUI instead of Notepad++. 1. Change the default editor in Window for .vhd file. Click right the file. Click Properties. Click 'Change' Button beside the 'Opens with: '. Change the editor setting to modelsim.exe. (since you would like to maintain the editor setting in Window, please refer to the second method.) 2. The other way is to Add Existing File in the project (either in the new or current project). Once done, the .vhd file in Modelsim will be available to open in Modelsim GUI by double-clicking. You only need to do once and all the .vhd file in Modelsim will open in Modelsim GUI. Do note: If you, later on, try to open the .vhd file by double-clicking the file in Window (for your case in which the default editor is Notepad++), it will cause the .vhd file in Modelsim opens in Notepad++ instead. To avoid changing back and forth, edit the .vhl file in Window through right-clicking the .vhd file and 'Edit with NotePad++'. Meaning you will lose the freedom to double-clicking the .vhd file in Window. Another alternate way without double-clicking is to put a script in the transcript: edit <.vhd file name> and the .vhd file will open in Modelsim GUI. Hope it helps.
0 Kudos
hans86
Novice
15,128 Views

I suspect you are using projects as the default behaviour is to open the file as read-only, this is independent of the Windows preferences. As Shyan mentioned you can change the double click behaviour from the project settings. Check to see if you don't have some custom setting for example "edit %f".

 

If you want to get back to the default settings you need to rename/delete the following register key:

 

HKEY_CURRENT_USER\Software\Model Technology Incorporated\ModelSim

 

delete or rename to something like:

 

HKEY_CURRENT_USER\Software\Model Technology Incorporated\ModelSim_old

 

When you next start Modelsim it will write a new set of default key values, your double click should now be as per the default. Be careful editing your registry as you can serious screw up your Windows.

 

Now the question is why do you want to use the Modelsim editor, it is only useful for setting breakpoints, back annotation and single stepping, as a source code editor it is pretty basic, notepad++ is much much better.

 

I would also suggest not using projects as they will at some point start to work against you. Using .do/.tcl files is dead simple (just copy and paste from the transcript) and will make your life a lot easier,

 

Good luck,

hans86.

0 Kudos
ShubhamKS
Beginner
12,499 Views

1) Close all the projects.

2) Restart the ModelSim.

3) Open the existing project (any project) from file menu.

You will have this issue mostly fixed.

Reply