Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

a2k-hanlon/linter-veriloghdl

Repository files navigation

linter-veriloghdl

Atom linter for Verilog/SystemVerilog, using Icarus Verilog, Slang, Verible, or Verilator.

Screenshot showing example of use with Verilator

Package Installation and Setup

  1. Ensure you have one of the supported Verilog/SystemVerilog compilers installed and working. If you do not yet have one installed, see the information in Compiler Installation.
  2. Install this package through the "Install" tab in Atom's settings, or run apm install linter-veriloghdl.
  3. Open the settings for this package through Atom's settings. Choose which compiler to use, and specify the path to the compiler's executable if necessary. For example, with Verilator on Windows (obtained through MSYS2) you may need to enter C:\msys64\mingw64\bin\verilator_bin.exe for "Verilator Executable".
  4. If you wish, you can modify the command arguments to any of the compilers by entering options as a comma-separated list.

Linting SystemVerilog with Icarus Verilog

Icarus Verilog does support as much of SystemVerilog as the other tools, but for linting this compiler may suffice. Most likely, you will want to add the -g2012 option to iverilog in the package settings if linting SystemVerilog.

Other Notes

Compiler Installation

Icarus Verilog (iverilog)

On Linux, you can install it using your package manager: eg. apt install iverilog

On macOS, you can use homebrew: brew install icarus-verilog

On Windows, the easiest way to install Icarus Verilog is using a pre-built installer, like those available here: https://bleyer.org/icarus/.

Slang

On Linux, you can download a binary from https://github.com/MikePopoloski/slang/releases/latest

On macOS, compiling from source is necessary. Slang has no provided binary for macOS. Instructions for compiling slang from source can be found at https://sv-lang.com/building.html

On Windows, you can download a binary from https://github.com/MikePopoloski/slang/releases/latest (this is the same place as for Linux binaries).

Verible

On Linux, you can download a binary from https://github.com/google/verible/releases/latest

On macOS or Windows, you can try compiling from source. See https://github.com/google/verible

Verilator

On Linux, you can install Verilator using your package manager: eg. apt install verilator

On macOS, you can use homebrew: brew install verilator

On Windows, you can obtain Verilator through MSYS2, or compile it from source using MinGW or Cygwin. Instructions for installing Verilator on Windows are included with this package in verilator-install-windows.md. There are instructions for installation with MSYS2 and for compiling Verilator from source with Cygwin.

Note that GTKWave is not necessary for linting, even though it may be bundled with intstallers or suggested by documentation for the compilers.

Acknowledgments

This package is based on the linter-verilog and linter-verilator packages for Atom, along with a few of their forks. Thanks to the authors of these packages!