Create File Template
Hello,
first of all, great tool ;-) makes really a lot of fun working with it.
But just one question from me concerning the templates. Is there a way to create a file template, thus when I go to new, in the menu I can select it there? I would like to use this for testbenches.
Thanks a lot
Yours sincerely
Philipp Nörtersheuser
- Forums:
File Templates
Hi Philipp,
It is currently not possible to add custom file templates directly, but there is a simple workaround:
First create a custom template for your typical testbenches.
To create a new testbench:
Hi Heeckhau, that is the way
Hi Heeckhau,
that is the way I am curretnly doing this, but I hoped there would be a solution to establish that as a default file.
Are there any plans to automatically create testbenches; so componentns and stuff?
Cheers Phil
Automatic test benches
Hi Philipp,
it is on the roadmap, but the specs are still a bit vague. What do you expect from such a feature?
Hendrik.
Hello Hendrik, I would like
Hello Hendrik,
I would like just the same as in ISE for example, thus
- Entity and Architecture
- Generics if needed for the UUT
- UUT Component instantiation and declaration
- Signal generation and initialization
- Clock generation (only the clock <= not clock after 50 ns) or so
- Basic beginning of the testbench (set and unset Reset pin)
That would be all I think. If I find the time I will have a look what is generated there.
Yours sincerely
Philipp Nörtersheuser
Check out emacs vhdl-mode testbench
If you're still speccing this feature, I'd like something comperehensive and configurable like vhdl-mode in emacs. Like this:
From an entity like this:
I get this (with no further typing other than to name the architecture at a prompt):
Some whitespace removed and some '-s' for brevity!
Note that the wavegen proc has some customisations in it - the "finished" signal and its declaration and use in the CLK statement are different from the default, but were easy to add.
Note also that the clk signal ends up declared twice, I haven't figured out how to fix that, so if you could do the right thing there, that'd be even better :)
VHDL Emacs magic
Hi Martin,
Thanks for your request. We were thinking of making all new-file wizards based on configurable templates. I guess we need recursive templates (company header will be a template as well) and intelligent templates (text generation based on the existing entity.
We'll use this for further inspiration.
BTW, can you tell us how to trigger the magic in Emacs VHDL mode for generating a testbench?
Philippe
More magic
Hi Philippe,
If you use C-c C-p C-w (VHDL..Port..Copy) with the cursor ('point' in emacsspeak :) inside the entity, and then C-c C-p C-t (VHDL..Port..Paste as testbench) you'll be prompted for an architecture name, and the rest will be done.
I have the following relevant customisations in my .emacs file:
Hope this helps!
Cheers,
Martin
Thanks
Hi Martin,
Thanks for refreshing my Emacs knowledge. I wanted to try out its behavior for extra inspiration.
Philippe
New File Wizard!
There is an improved (and configurable) New File wizard in the latest release.
Check out the one minute screencast too!
Post new comment