Verilog
Verilog.Com Home

Emacs editing mode for Verilog
Get the Emacs editing mode for Verilog
Installing the Verilog-mode

IEEE Verilog 1364

Free Online Verilog Training Class
Books about Verilog
Frequently asked questions
Links about Verilog

Privacy


 

How to Install Verilog-Mode version 840 for Emacs

This version published 01/08/13


Click here if you've got it installed, but got no colors...

Click here if you'd like to alter the way search operates in the Verilog mode

Click here if you want to see some frequently asked questions and answers.

Click here if you want to see how to install it on Windows.

This install guide has been translated to the Serbo-Croatian language by Jovana Milutinovich from WebHostingGeeks.com.

OK, you want to use the Verilog emacs mode, but have never used emacs, or always had some one else do the messy set up details. Here is a step by step recipe for installing the verilog-mode:

  1. Look at the mail message your received. If you have a relatively modern mail reader, you will see that there is an attachment, called verilog-mode.el, or perhaps verilog-mode.el.gz. Your mail reader will typically give you the opportunity to open this file, run the file, or save this into a file. If you can, select to uncompress and save the file as verilog-mode.el.

  1. If your mail reader didn't know how to uncompress the file, it will offer to save the file as verilog-mode.el.gz. Go ahead and save it to the suggected file name, and then uncompress the file yourself.

    To uncompress the file, on a Linux or Unix machine use gunzip which you should have, if not you can get it from the Free Software Foundation. Run:

    % gunzip verilog-mode.el.gz

    On a Windows machine, the tool called winzip can be used to uncompress the file; find one by searching the net.

  1. To install verilog mode for just your own use continue as follows:


    (defun prepend-path ( my-path ) (setq load-path (cons (expand-file-name my-path) load-path))) (defun append-path ( my-path ) (setq load-path (append load-path (list (expand-file-name my-path))))) ;; Look first in the directory ~/elisp for elisp files (prepend-path "~/elisp") ;; Load verilog mode only when needed (autoload 'verilog-mode "verilog-mode" "Verilog mode" t ) ;; Any files that end in .v, .dv or .sv should be in verilog mode (add-to-list 'auto-mode-alist '("\\.[ds]?v\\'" . verilog-mode)) ;; Any files in verilog mode should have their keywords colorized (add-hook 'verilog-mode-hook '(lambda () (font-lock-mode 1)))
  1. To install verilog mode for general use, continue as follows:
    ;; Load verilog mode only when needed (autoload 'verilog-mode "verilog-mode" "Verilog mode" t ) ;; Any files that end in .v should be in verilog mode (setq auto-mode-alist (cons '("\\.v\\'" . verilog-mode) auto-mode-alist)) ;; Any files in verilog mode should have their keywords colorized (add-hook 'verilog-mode-hook '(lambda () (font-lock-mode 1)))