VHDL editors – Notepad++

A good VHDL editor is terribly important during all the phases of your design cycle.

Both Altera Quartus and Modelsim simulator include their own VHDL editors. Both tools include syntax highlighting. In the case of Altera Quartus editor, there is a very useful feature which is the possibility of entering templates for commonly used code blocks (entity, architecture, component) and also for design units (counters, registers, memories, etc.).

However, the selection of an editor is also a matter of personal choice. I know many people who grew with Unix and Linux and prefer editing in that environment, with the addition of enjoying the powerful options of the grep search command.

notepad_fig1
Figure 1 – Notepad side by side edditing, tabs, and block select (dark grey area on left side).

Personally, I prefer Notepad++. Besides syntax highlighting, it has very powerful tools for code entering and maintenance:

  • File tabs for easy switching between source files.
  • Block commenting and un-commenting (including toggle, i.e. CTRL-Q)
  • Powerful search and replace tools, including the ‘search on files’ option.
  • Auto completion, that can be annoying sometimes, but most times is useful. Auto-completion works both for syntax and for remembering already used signals and variables, offering them as options while you type.
  • Line duplication (CTRL-D).
  • Side to side editing, very useful for entering hierarchy / test bench (right click on file tab -> Move to other view)
  • Block editing, very useful for many tasks, among them component instantiation.
  • Bookmarking, quite handy while you go back and forth inside your code (CTRL-F2 for bookmark toggling and F2 to go to next bookmark)
  • Code indentation and de-indentation in blocks.

As many editors, there are for sure some options I don’t know. I have listed those I know and use most frequently. For a complete list you can download their cheat sheet.

 

Notes: (Updated October 2016)

  1. I cannot finish this comment about VHDL editors without mentioning an excellent editor I have stumbled upon lately, Sigasi. It is the only VHDL editor I know that makes code analysis and offers corrections options on the fly. But I have just started to use it, so I will be commenting on it on another post in the future (Oct. 2016 – Still has not managed to make an entry on Sigasi editor… But please keep reading below for an important update regarding Notepad++)
  2. Spacing and tabs. If you work like me with many editors (Notepad++, Quartus, Modelsim, etc.) you should probably have experienced the infuriating TAB issues. Usually the TABs are initialized with different values or not understood at all when crossing from one tool to another. The result is that code that was nicely formatted in one tool, is horrific under another one. I think that I have overcome this issue. This is how you do it:
    1. You want Notepad++ to translate all your TABs to spaces. Personally I have tried and I like that 1 TAB will be converted to three spaces. When the file is saved it has no TABs, only spaces, so most other tools won’t cripple its formatting. To do this go to Preferences > Tab Settings and check the “Replace by Space” checkbox after choosing your desired Tab Spacing value (in my case, as I said, it is three).
    2. If you want to convert an existing file from TABs to settings, go to Edit > Blank Operations > TAB to Space

 

Leave a Reply