There is limited & scattered knowledge available in the programmable logic space online. I recently stumbled upon Programmable Planet, a website dedicated to Programmable Devices.
Programmable planet is undoubtedly emerging as the best online resource for “all things programmable” as they call it. It has FPGA, VHDL concepts explained by industry experts - now that’s something new. These experts are very much active in the website & available for comments/clarifications.
If you haven’t gone through Programmable Planet, I suggest you do it right away.
Here’s the permalink —> http://bit.ly/MTNMAR
I’ve already emphasized about the coolness of Notepad++ (NPP) for VHDL editing. You can find those posts here & here.
This post is about must have Notepad++ Plugins. All plugins can be downloaded from sourceforge.net. You need to manually add the *.dll file into the plugin directory of Notepad++ installation folder. You can alternatively go to Plugin Menu & open Plugin Manager which shows the list of available plugins & you can install directly.
Must Have NPP Plugins List
- NPP VHDL - supports templates for Entity, signal declaration, test bench & port instantiation.
- NPP Compare
- MultiClipboard
- Xbrackets lite - auto closing of brackets
- NPP Export
How to download NPP Plugins?
All plugins can be downloaded from sourceforge.net.
You need to manually add the *.dll file into the plugin directory of Notepad++ installation folder. You can alternatively go to Plugin Menu & open Plugin Manager which shows the list of available plugins & you can install directly.
These are really powerful plugins once you start using them.
I’ll post about other interesting plugins once I find them. Watch this space for more.
We often use basic arithmetic operations for synthesis - adders, multipliers & sometimes the division operation.
Some useful tips while using arithmetic operators:
- It is always recommended to use advanced options for synthesis in XST like “Use Mult”, “Use DSP” while using arithmetic operations.
- Check for customizable IP Cores. Most arithmetic operations are covered in FPGA vendor specific IP’s.
- However if you wish to use +,*,/ operators you will need to include libraries which define these operators.
Table shows VHDL Libraries needed to be added for specific arithmetic operations

- Timing hazards are fluctuations occurring during transient period i.e before output reaches steady state value.
- These fluctuations cause very short/narrow pulses called glitches.
- Circuit is said to have timing hazards if it has glitches.
- Timing hazards can be either static or dynamic.
- Dynamic hazards occur when the output produces a L->H or H->L transition.
- Multiple 1-bit changes causes glitches because of different propagation delay of convergent paths.
Glitches in Multi-bit Counter
- If you observe the post-route simulation of a multi-bit counter you’re most likely to observe glitches where multiple 1-bit change occurs.
- For example if a counter is changing from “1111” to “0000” there is a 4-bit change which is susceptible to glitches.
- The solution is to reduce the number of 1-bit changes.
- It can be done by employing other methods of encoding for counter instead of a simple binary counter. Gray, one-hot, one-cold or any other counter with lesser number of bit change can overcome the problem.
- The same logic even applies to FSM encoding. It is better to use optimum state encoding to avoid glitches.
Some parts of this post are inspired from the great book on RTL design by Pong Chu published by Wiley IEEE Press.
Integer has a range from -(2**31)-1 to (2**31)-1 but rarely do we use that range.
I would recommend to always declare integer with a Range as shown below.
Example Integer Declaration:

The range 0 to 1E3 acts as a RANGE CHECK. It does NOT refer to the memory to be allocated for integer. If you exceed the range, simulator shows an error. I checked with ModelSim & it issues a fatal error.
Every programming book begins with “Hello World” as the first code. The hardware equivalent of “Hello World” would be “Glowing LED’s”
Here’s what you’ll need
1. FPGA Board with User LED’s (duh)
2. USB programming cable or JTAG programmer
3. Design software by FPGA vendor
Choose an HDL Language & simulator. I used VHDL with ModelSim.
Here’s the VHDL code snippet to “Glow 2/4 LED’s “
Step1: Write HDL code

Step 2: Simulate using any VHDL simulator
Step 3: Add user constraints (.ucf extension) for LED location. You need to check datasheet of FPGA board for User LED locations. Synthesis, Implement & Generate bitstream (.bit file).
Example UCF File with ‘LOC’ation constraints

Step 4: Program/configure bitstream using JTAG/USB Programmer.
Step 5: Observe LED’s.
It is as simple as these 5 steps. Your first project is ready.
To choose an inexpensive FPGA board use read the previous post which you can find here.
Addendum —> You could display “Hello World” by interfacing FPGA with an LCD/VGA but it requires writing the interface logic & moreover using FPGA’s for displaying text would be wastage of silicon real estate.
I’ve seen many sites with queries on VHDL Editors. I’ll list a few of them here. These are NOT IDE’s.
- Notepad++ with VHDL plugin - Works amazingly well on Windows. Its a very lightweight program. Pros : fullscreen option, code folding, good color schemes Cons: no in-built VHDL templates
- gVIM & Emacs if you swear by UNIX
- Sigasi HDT - Eclipse based environment
- ScriptumHDL
You will still need a simulator to view the outputs & a synthesis/implementation/bitstream generation tool for FPGA implementation.
Xilinx & Altera offer a pretty decent design environment. You can integrate these editors with your FPGA design software. Let me know if you’ve worked on a better editor.
Integration with ISE : Go to Edit —> Preferences —> ISE General —> Editors
Select custom editor & add {C:\Program Files\Notepad++\notepad++.exe} $1

Here’s a snapshot of Notepad++

