HDL support for VS Code with Syntax Highlighting, Snippets, Linting, Formatting and much more!
Install it from VS Code Marketplace or Open VSX Registry.
- Syntax Highlighting
- Verilog-HDL
- SystemVerilog
- Bluespec SystemVerilog
- VHDL
- Verilog-AMS
- Vivado UCF constraints
- Synopsys Design Constraints
- Verilog Filelists (dot-F files)
- Tcl
- Simple Snippets
- Linting support from:
- Icarus Verilog -
iverilog - Modelsim -
modelsim - Verilator -
verilator - Vivado Logical Simulation -
xvlog - Slang -
slang - Verible Verilog Lint -
verible-verilog-lint
- Icarus Verilog -
- Linting support
- Bluespec SystemVerilog
- Ctags Integration
- Autocomplete
- Document Symbols Outline
- Hover over variable declaration
- Go to Definition & Peek Definition
- Module Instantiation
- Language Server support from:
- Formatting support from:
- All linters expect the executable binary (
iverilog,verilator...) to be present in thePATHenvironment variable, unless otherwise specified. - While using
`includedirectives, the path to the files should be relative to the workspace directory, unlessrunAtFileLocationis enabled (not supported by all linters)
This extension uses the tags created using Ctags to provide many of its features. It is recommended to use Universal Ctags as it supports SystemVerilog also, compared to Exuberant Ctags and other older versions. The tags are stored in memory and not as separate files.
Currently the integrated feature supports only tags in the currently opened file, not tags in other files.
Enable this integration with the verilog.ctags.enabled setting.
However, you can use other independent Ctags extensions to find definitions from any file.
For example Ctags Companion works well with this extension
by adding the following settings on .vscode/settings.json in your workspace.
{
"ctags-companion.command": "ctags -R --fields=+nKz --langmap=SystemVerilog:+.v -R rtl /opt/uvm-1.2/src",
}It searches for definitions not only in the workspace, but also in files outside the workspace (ex. /opt/uvm-1.2/src in the example above).
It also supports the readtags command included in Universal Ctags, allowing for fast searches from large workspaces.
- Windows - Daily builds are available at ctags-win32
- Linux - Installation instructions are here
- macOS - Install through Homebrew from here
Add the installation path of Ctags binary in your PATH environment variable or mention it in verilog.ctags.path setting.
-
Rerun lint tool
Choose a lint tool from the list and run it manually. Useful if the code was changed by an external script or version control system.
-
Instantiate Module
Choose a module present in your workspace to instantiate it in the current file.
We currently support the following Language Servers and enabled for Verilog-HDL, SystemVerilog and VHDL. You can enable multiple Language Servers at the same time. It might be pretty unstable because it's currently in the experimental support. If you encounter any problems even if it's not related to this feature, deleting all the config may solve the problem.
| Language Server | Verilog-HDL | SystemVerilog | VHDL |
|---|---|---|---|
| svls | not supported | enabled | not supported |
| veridian | not supported | enabled | not supported |
| HDL Checker | enabled | enabled | enabled |
| verible-verilog-ls | enabled | enabled | not supported |
| rust_hdl | not supported | not supported | enabled |
We currently support Verilog-HDL file formatting with the following formatters.
You can format the Verilog-HDL file by typing Ctrl-Shift-p, then select Format Document.
Entire file formatting is supported. Selected range formatting is not supported yet.
All the settings for formatting is under verilog.formatting namespace.
- Install dependencies with
npm install. - Open the repository in VS Code and start the default build task (
watch) or simply pressF5—theLaunch Extensionconfiguration in .vscode/launch.json will run the build task automatically. - In the Run and Debug view, pick Launch Extension and start debugging. VS Code will open an Extension Development Host pointing at the bundled
language_examplesworkspace so you can try the features immediately. - Set breakpoints in the
srcfiles; the compiled output inoutis mapped via sourcemaps so the breakpoints hit your TypeScript sources.
Logs are outputted to LogOutputChannel in th VS Code. You can check it by opening the Output pane in VS Code and choose Verilog in the drop-down menu.
- Verilog in VSCode With Linting (Using Modelsim) - YouTube
- A Productive VSCode Setup for SystemVerilog Development - Igor Freire
- To all our Contributors
- Textmate Package for Verilog
- SublimeLinter-contrib-iverilog
- SublimeLinter-contrib-vlog
- Sublime Text Bluespec SystemVerilog
- yangsu/sublime-vhdl
- Sublime EDA
- dalance/svls
- vivekmalneedi/veridian
- suoto/hdl_checkerChecker
- chipsalliance/verible
- ericsonj/verilog-format
- thomasrussellmurphy/istyle-verilog-formatter
- slang C++ docs
- bitwisecook/vscode-tcl: Tcl for Visual Studio Code
configs/tcl.configuration.jsonandsyntaxes/tcl.tmlanguage.jsonare obtained from the repo.
- eirikpre/VSCode-SystemVerilog: SystemVerilog support in VS Code
- SystemVerilog syntax is obtained from the repo.

