MCPcopy Index your code
hub / github.com/AndrewNolte/vscode-system-verilog

github.com/AndrewNolte/vscode-system-verilog @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
404 symbols 847 edges 31 files 1 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Verilog/SystemVerilog Tools

Verilog and SystemVerilog support including linting from popular tools, completions, formatting, and project level analysis.

This is not the Slang Server extension, this is a ctags-based implementation for vscode. For the newer and more feature rich Slang Server, see https://github.com/hudson-trading/slang-server.

Install it from the VS Code Marketplace or OpenVSX

Linters

slang (recommended) || iverilog (Icarus) || verilator || modelsim || xvlog (Xilinx/Vivado) || xrun (Cadence/Xcelium)

The extension leverages the "-y" flag found on most tools, pointing it to a symlink index of the repo. This makes for almost zero per-project config when modules match each file name. A command titled Verilog: Fix filenames... is offered to help with refactoring these to match.

Note for windows users: "Developer Mode" needs to be turned on in order to create symlinks.

Multiple linters are able to run in parallel:

sample

Language Server

Snappy Hover/Goto Definition on nearly every symbol, including in other files. Optional inlay hints for ports.

sample

Completions- Modules, Params/Ports, Macros, Package references, SV builtins, etc.

sample

Set top level, which shows the hierarchy, different modules used, project level linting, and soon to be waveform integration.

Project View

See a detailed feature list and roadmap in FEATURES.md

Third party language server options: verible-verilog-ls || veridian || svls

Formatters

verible-verilog-format (recommended) || verilog-format || istyle

Verible supports both SystemVerilog and Verilog, while the others are only verilog. verilog.formatDirs lets you specify directories that you want to be formatted.

Recommended Configuration

Install universal-ctags

This is used for definition support, hover support, and most of the analysis features. Use 6.1 or later for port/param definition support

  • Windows - Release are here
  • Linux - Releases are here
  • macOS - Install through Homebrew: brew install universal-ctags

Install slang

This is the recommended linter because it's the fastest and most compliant language frontend, and it has so many more useful warnings than other tools.

Example Configuration

// these get passed to linters and other tools with -I, or the correct format for that tool
"verilog.includes": [
    "hdl/lib",
    "hdl/includes"
],
"verilog.ctags.path": "/usr/local/bin/ctags-universal",
"verilog.lint.slang.enabled": true,
// includes and '-y .sv_cache/files' are already passed to linters
"verilog.lint.slang.args": "--error-limit 200",
"verilog.lint.slang.path": "/usr/local/bin/slang",
// multiple linters can run concurrently
// you can specify if some can only run at the project level
"verilog.lint.verilator.projectEnabled": true,
// tools will use the default name on the path if not given
"verilog.svFormat.formatter": "verible-verilog-format",
"verilog.svFormat.verible.args": "--flagfile=myflags.txt",
"verilog.svFormat.verible.path": "/usr/local/bin/verible-verilog-format",
// select directories to format on save
"verilog.formatDirs": [
    "hdl/my/project/with/formatting"
],

See all config options in CONFIG.md

For debugging your config, you can see the logs in Output tab > select 'verilog' in the dropdown

Contributions are welcome, see DEVELOPING.md

Extension points exported contracts — how you extend this code

Logger (Interface)
(no doc) [3 implementers]
src/lib/logger.ts
SymbolFilter (Interface)
(no doc)
src/analysis/VerilogDoc.ts
IPolicy (Interface)
(no doc)
src/lib/vscodeConfigs.ts
IConfigurationPropertySchema (Interface)
(no doc)
src/lib/vscodeConfigs.ts
IJSONSchema (Interface)
(no doc)
src/lib/jsonSchema.ts
IJSONSchemaMap (Interface)
(no doc)
src/lib/jsonSchema.ts

Core symbols most depended-on inside this repo

info
called by 54
src/lib/logger.ts
getValue
called by 43
src/lib/libconfig.ts
get
called by 25
src/utils.ts
error
called by 18
src/lib/logger.ts
getSymbols
called by 17
src/analysis/VerilogDoc.ts
getVerilogDoc
called by 13
src/IndexComponent.ts
getWorkspaceFolder
called by 13
src/utils.ts
log
called by 12
src/lib/logger.ts

Shape

Method 203
Class 110
Function 67
Interface 16
Enum 8

Languages

TypeScript100%
Python1%

Modules by API surface

src/lib/libconfig.ts72 symbols
src/sidebar/ProjectComponent.ts46 symbols
src/lib/logger.ts29 symbols
src/FormatProvider.ts28 symbols
src/analysis/Symbol.ts27 symbols
src/sidebar/InstancesView.ts24 symbols
src/utils.ts20 symbols
src/analysis/VerilogDoc.ts20 symbols
src/extension.ts16 symbols
src/IndexComponent.ts16 symbols
src/linter/XceliumLinter.ts12 symbols
src/linter/BaseLinter.ts12 symbols

For agents

$ claude mcp add vscode-system-verilog \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact