Home

Awesome

HDL support for VS Code

HDL support for VS Code with Syntax Highlighting, Snippets, Linting, Formatting and much more!

Install Count Download Count

sample

Installation

Install it from VS Code Marketplace or Open VSX Registry.

Features

Usage Instructions

Ctags Integration

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. 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 -f .vscode/.tags --langmap=SystemVerilog:+.v -R rtl /opt/uvm-1.2/src",
    "ctags-companion.readtagsEnabled": true,
}

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.

Installation of Universal Ctags

Add the installation path of Ctags binary in your PATH environment variable or mention it in verilog.ctags.path setting.

Commands

Language Servers (Experimental)

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 ServerVerilog-HDLSystemVerilogVHDL
svlsnot supportedenablednot supported
veridiannot supportedenablednot supported
HDL Checkerenabledenabledenabled
verible-verilog-lsenabledenablednot supported
rust_hdlnot supportednot supportedenabled

Formatting (Experimental)

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.

Configuration Settings

Use the following settings to configure the extension to your needs.

Compatibility

FeatureWindowsLinuxmacOS
Basics (like Syntax highlighting)Windows 10Ubuntu 20.04macOS 10.15
Icarus VerilogWindows 10Ubuntu 18.04Yes
Vivado Logical SimulationWindows 10Not TestedNot Tested
ModelsimWindows 10Ubuntu 18.04Not Tested
VerilatorWindows 10Debian 9Not Tested
Ctags IntegrationWindows 10Ubuntu 18.10Not Tested
Language ServerWindows 10Ubuntu 20.04macOS 10.15
FormattingNot testedUbuntu 20.04Not tested

If you have tested the linters in new platforms or have issues with them, feel free to file an issue.

Guidelines for Contributing

Logs

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.

Helpful links

Thanks