Quantcast
Channel: Cadence Functional Verification
Viewing all articles
Browse latest Browse all 652

e Language Editing with Emacs

$
0
0

Specman and e have been around for a while, and some clever people have developed a nice syntax highlighting package for Emacs. What does this package do? Well, have a look yourself:

 

Editing in Emacs with the Specman mode 

And

 

Editing in Emacs without the Specman mode 

As you can see, the Specman mode gives you syntax highlighting, automatic indentation, it detects comments and shows them in different font or color if you like, adds end-comments (for example, after "};" you get a comment that tells you what struct/unit was edited), inserts newline after a semicolon and more...

The Specman mode for Emacs used to be available here (www.specman-mode.com), but unfortunately this site is no longer actively maintained. If you do need a more recent version (e.g., if you want to run with Emacs 24.x or later), please download it from the related Cadence forum post.

Once you've downloaded and unzipped it, you need to setup Emacs or Xemacs to load the mode when you start the editor. The mechanics to achieve that are slightly different in Emacs and Xemacs. For Emacs, edit the file <HOME>/.emacs and add the following:


;; indicate where the package is stored
(add-to-list 'load-path"~/xemacs/")
;; load the package
(load "specman-mode")
;; setup files ending in .e or .ecom to open in specman-mode
(add-to-list 'auto-mode-alist '("\\.e\\'" . specman-mode))
(add-to-list 'auto-mode-alist '("\\.ecom\\'" . specman-mode))

 Happy coding,

-Hannes Froehlich


Viewing all articles
Browse latest Browse all 652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>