SystemVerilog Snippets for Emacs

SystemVerilog is a huge language and is still growing. To boot we have two separate verification methodologies (VMM and OVM). It is heartening to see some unification effort by Accellera. But I believe VMM and OVM will still be around for at least a couple of years.

To ease up coding effort, VMM provides vmmgen utility (which seems broken in the recently announced 1.2 release). OVM on the other hand has a couple of utilities available in the contrib area of the OVM World.

Being an Emacs addict, I always craved to have these capabilities as part of Emacs. Over the past year I made some effort in this direction and I think at this point the code templates have matured enough for a public release. Additionally my package (which is built over YASnippet package for Emacs) supports common SystemVerilog constructs like class, case, always etc.

Prerequisites

GNU Emacs (version 22 or later) -- If you are still using XEmacs, I suggest that you have another look at GNU Emacs. The past decade has seen quite a few new developments with GNU Emacs. And a lot of new elisp packages are now supported only for the GNU flavor.

Verilog Mode -- Let me know if there is any other verilog mode for Emacs worth its name, and I will add support for that too.

Installation

Download the package from the following link yasnippet-bundle.el.gz

Uncompress the downloaded file in a directory where you keep your other emacs packages. Make sure that the directory you kept the uncompressed file in, is in your Emacs load path.

Load the downloaded package. You can do this by adding the following lines in your emacs init file.

;; Add the directory to Emacs load path
(setq load-path (cons "/path/to/directory" load-path))

;; Load the package
(require 'yasnippet-bundle)

Now when you launch Emacs, you should see a YASnippet menu in the top menu-bar. Navigating to verilog-mode on this menu-bar will make all the verilog templates visible to you. When editing a file in verilog-mode, you can also access these templates using keyboard shortcuts shown along with the menu-bar entries. All the VMM specific templates can be accessed by typing vmm and following it up with a TAB. Similarly OVM templates can be accessed by typing ovm and then a TAB. SystemVerilog snippets can be invoked by typing the respective keywords followed by a TAB. To know all the package capabilities, just watch the following video tutorial.

If you face any issues with installation, just leave a message. Bug reports and other feedbacks/suggestions are also welcome. I intend to maintain and further develop this package. Ideas and suggestions are most welcome. Future revisions will be announced on Twitter.

15 Responses to “SystemVerilog Snippets for Emacs”

  1. [...] This post was mentioned on Twitter by Scott Little, CoVerify. CoVerify said: SystemVerilog Snippets for Emacs http://bit.ly/6EbQ7T [...]

  2. [...] आ नो भद्राः क्रतवो यन्तु विश्वतः — Let noble thoughts come to us from all directions Home « SystemVerilog Snippets for Emacs [...]

  3. Ronan Barzic says:

    Hi,

    Nice work but will it be possible to get access to the snippets in their “unbundled” form (not embedded in the lisp but as a directory structure)
    Having them in the lisp file make it impossible to share a common directory for snippets between developpers

    Thank you

  4. Kandice Mastropaolo says:

    Blog serve a very beneficial purpose, in case you are? any talented article writer wanting to communicate yourself. Being a freelancer, you could like to have a look at ezdia, another marketing tool in which allows you to business the expertise.

  5. obedient on front page

  6. Sherrie says:

    Hello everyone, it’s my first go to see at this web site,
    and post is in fact fruitful in support of me, keep up posting these types of content.

  7. Alsedov.Ru says:

    I every time spent mmy half an hour tto reaad this blog’s articles or reviews daily along wwith a mug of coffee.

    Also visit my web blog … красота (Alsedov.Ru)

  8. Hi there! Do you use Twitter? I’d like to follow you if that would be okay.
    I’m undoubtedly enjoying your blog and look forward to new updates.

    my blog: pikavippi laina luotto

  9. medicine says:

    You actually make it seem so easy with your presentation but I find this matter to be actually something which I think I would never understand.
    It seems too complicated and very broad for me. I’m looking
    forward for your next post, I will try to get
    the hang of it!

  10. Nice blog here! Also your web site loads up fast! What web host are you using?
    Can I get your affiliate link to your host? I wish my
    web site loaded up as fast as yours lol

    Look into my weblog :: ruletti reeglid

  11. Good blog post. I absolutely love this website. Keep writing!

    Feel free to surf to my homepage; vippi tilille (http://www.vippi100.net/)

  12. rea says:

    Great blog! Do you have any hints for aspijring writers?
    I’m hoping to start my own blog soon but I’m a little lost on
    everything. Would you suggest starting with a free platform like WordPress or go for a pad
    option? There aare so many chooices out there that I’m complpetely overwhelmed ..

    Any recommendations? Thanks!

  13. Albertina says:

    Electronic cigarettes are run by dangers of electronic cigarettes batteries,
    and an important safety feature has been included to protect the health of those
    people around you. He felt very sick after that. Overall,
    this avatar of the actual cigarette smoking.

    Here is my blog :: vvgo electronic cigarette [Albertina]

  14. Tamara says:

    you’re truly a excellent webmaster. The site loading velocity is incredible.
    It seems that you’re doing any distinctive trick.
    In addition, The contents are masterwork. you’ve performed
    a magnificent task on this topic!

    My blog post; pikavipit netistä (Tamara)

  15. Eva says:

    I am genuinely delighted to read this weblog posts which contains tons of
    useful data, thanks for providing such statistics.

Leave a Reply

Comment moderation is enabled. Your comment may take some time to appear.