Sigasi's Blog

This website hosts blogs on multiple topics that relate to the world, work and lives of Sigasi team members.

Sigasi HDT
All blog posts related to our product, Sigasi HDT: tips and tricks, howtos, feature discussions, ...
Jan on HDL design
Jan's blog about his personal views on HDL design. Relevant for the future, but aware of the past.
VHDL
Posts that will make you a better VHDL designer, regardless of the tools you use.
Developing for Eclipse
We develop on top of Eclipse, so we have some experience in this field. In this feed, we share some of this experience.

You can easily subscribe to each of these blogs by clicking the rss icons. It is also possible to subscribe to all blog posts

Export a Sigasi HDT project to an archive file

If you want to mail a Sigasi HDT VHDL project to a colleague (or to support), you can easily archive your project within Sigasi HDT itself.

Just right-click on your project in the project explorer and select Export...

Next select Archive File

Using external tools

Some people have asked about integration with simulators and synthesis tools. For now, the integration is based on calling an external script for starting a simulation or synthesis. The way to do this is described in the manual Help > Help Contents > Sigasi HDT > Sigasi HDT User Manual > External Tools.

As an example, I've attached a simple example which uses GHDL as simulator.

The compile script could look like this (on a unix machine):

#!/bin/bash
mkdir work
ghdl -i --workdir=work *.vhd || exit -1
ghdl -m --workdir=work testbench || exit -1
 
echo start simulation
./testbench --stop-time=200ns
echo simulation finished

Configure your external tools settings as follows:
external tools screenshotexternal tools screenshot

Dynamic menu items in Eclipse

I wanted to add a dynamic menu contribution item to the popup menu of project explorer. I could not immediately find out how to do this, so I decided to document it here. Eventually it turned out to be quite easy.

7-segment display

A few weeks ago, a friend of mine talked about using a seven-segment display in a VHDL lab in his university.

Of course, he wanted his students to simulate before they synthesize. I thought it would be nice to have a module that can emulate a this a seven-segment display as ASCII-art.

7-segment display shows "F62"7-segment display shows "F62"

I created this module in about an hour and after some more minor modifications, I decided to publish it for everybody to use.

Using Custom Templates in Sigasi HDT

In a previous blog post Using Autocomplete Templates in Sigasi HDT, I introduced Autocomplete Templates in Sigasi HDT and demonstrated how to use the pre-defined templates. In this post I'll explain how to customize these templates and how to create your own. Chances are high that the pre-defined templates slightly differ from your preferred style or that you have your own standard pieces of code that you use on a regular basis.

Edit existing templates

To demonstrate the power of custom templates I will tailor the "process"-template of the example in my previous post to my preferred style. In this elaborated "process" example, I demonstrated how to replace "rst" by "reset" and "clk" by "clock" in the template editing session. If all reset signals in my design are called "reset" instead of "rst" (and "clock" instead of "clk"), it would be better to modify the template, so that the names are correct by default.

The first step is to open the Templates Preference page: Window > Preferences > VHDL > Templates and select the "process" template.

Click Edit... and you will see the template's code.

The syntax is really simple. The template contains text and variables. The text is inserted as is when the template is expanded. Variables, enclosed in curly braces ${ }, become fields that can still be modified by the user once the template is expanded. The name of the variable will be used as the default value.

In this example we want to replace the default of "rst" with "reset" and "clk" with "clock". You can simply achieve this by changing the variable names in the template. Notice that you have to replace all occurrences, otherwise HDT will regard them as different variables.

Press OK (twice) to confirm the changes.

If you now autocomplete the "process" template, you will see that the default names for the clock and reset signals have changed.

Feel free to experiment with more customizations to the templates like adding default comments or changing white space and indentation.

Create new templates

Creating new templates is the evident next step. In the Templates Preference Page (Window > Preferences > VHDL > Templates), simply press New....

First you have to specify a Name for your new template. Choose it carefully because this name will be what you have to start typing when you want to expand the template.

The Description is what you will see next to the template name if there are multiple possible templates that can be expanded.

Next you can insert the actual template. Note that apart from user-defined variables (like ${name}, ${clk} and ${rst} in the above example), you can also use pre-defined template variables. Pre-defined template variables are variables that are filled in by HDT itself when the template is expanded. Examples are ${user} and ${date}. If I would autocomplete a template that contains the ${user} variable it would become "heeckhau" in the expanded template. Note that you can use Ctrl+Space to auto-complete these pre-defined variables when you are editing the template.

Useful examples of custom templates are file headers, default library and use clauses, (others=>'0'), ...

Conclusion

Custom templates can really help you improve you coding speed by assisting you in typing faster, especially for verbose VHDL constructs. Templates are really flexible and can be customized to really suit your needs.

If you create new templates that you think might be useful for other VHDL designers; feel free to share them on our forum or in the comments. I am also very curious to hear which templates you think are still missing as defaults in Sigasi HDT.

Syndicate content