Skip to main content

systemrdl-lsp

Language Server Protocol implementation for SystemRDL 2.0 — backed by systemrdl-compiler and pygls. Editor-agnostic; ships the full LSP feature surface most tools have for mainstream languages.

Install

pip install systemrdl-lsp
# or
uv pip install systemrdl-lsp

The server speaks LSP over stdio. Editor integrations launch the systemrdl-lsp CLI and pipe.

Use it from your editor

VSCode / VSCodium / Cursor / Theia

Install the SystemRDL Pro extension (also on Open VSX). The extension supervises this LSP for you — restart, crash recovery, the lot.

Neovim (nvim-lspconfig)

require'lspconfig.configs'.systemrdl_lsp = {
  default_config = {
    cmd = { 'systemrdl-lsp' },
    filetypes = { 'systemrdl' },
    root_dir = require'lspconfig.util'.root_pattern('peakrdl.toml', '.git'),
    settings = {
      ['systemrdl-pro'] = {
        includePaths = {},   -- list of dirs searched by `include
        includeVars = {},    -- $VAR / ${VAR} substitution in include paths
      },
    },
  },
}
require'lspconfig'.systemrdl_lsp.setup{}

Helix

Add to ~/.config/helix/languages.toml:

[language-server.systemrdl-lsp]
command = "systemrdl-lsp"

[[language]]
name = "systemrdl"
scope = "source.rdl"
file-types = ["rdl"]
language-servers = ["systemrdl-lsp"]

Emacs (eglot)

(add-to-list 'eglot-server-programs '(systemrdl-mode . ("systemrdl-lsp")))

Feature surface

Implemented and shipped in v0.15.0:

  • Live diagnostics — 300 ms debounce, 10 s timeout fallback, last-good cache, per-URI bucketing for `included files (clear-on-resolve cycle).
  • Hover — instance address/width/access for regs, parameter values for parametrized types, bridge flag for addrmaps, (← default at line N) annotation when a property comes from a default or dynamic assignment.
  • Goto-definition (F12 / Ctrl-click) — top-level types, instance names (signals, registers), reference paths like top.regfile.CTRL.enable (segment-by-segment), cross-file via `include.
  • Find references (Shift+F12) — every instantiation of a type, cross-file.
  • Rename (F2) — workspace-wide, refuses on collision.
  • Completion — ~85 keywords / properties / access values + user-defined types + user-defined properties. Context-aware narrowing: after sw = only access modes, after addressing = only compact / regalign / fullalign.
  • Document symbols / outline — addrmap → regfile → reg → field.
  • Folding ranges, inlay hints (resolved absolute address ghost-grey at end-of-line), CodeLens (📊 N regs · 0xS..0xE summary above every addrmap).
  • Workspace symbols (Ctrl+T) with optional pre-index for cross-file search.
  • Type hierarchy — subtypes ≡ instances of the type.
  • Document links on `include "..." paths.
  • Document highlight, selection range, signature help inside #(...).
  • Code action — quick-fix "Add = 0 reset value" on field declarations missing a reset.
  • Document formatting — conservative whitespace normaliser.
  • Address conflict warnings — per-addrmap-scoped, skips reused-type bodies.
  • Semantic tokens — distinguishes properties / values / types beyond TextMate scopes.

The custom rdl/elaboratedTree JSON-RPC method powers the memory-map viewer in the VSCode extension and the standalone rdl-viewer CLI; the schema lives at schemas/elaborated-tree.json.

Configuration

Setting Default What
systemrdl-pro.includePaths [] Directories searched by `include. Auto-discovered from peakrdl.toml; sibling-directory fallback.
systemrdl-pro.includeVars {} $VAR / ${VAR} substitution in `include "..." paths.

One-shot CLI

systemrdl-lsp also exposes a non-LSP one-shot for tooling:

python -m systemrdl_lsp.dump my-chip.rdl > tree.json

Emits the full elaborated tree (schema: schemas/elaborated-tree.json) on stdout. Used by the standalone rdl-viewer CLI to drive the browser-served viewer without an editor.

Compatibility

  • Python: 3.10+
  • perl on PATH (optional) unlocks the SystemRDL Perl preprocessor (clause 16.3) for parametric register generation.
  • PeakRDL-regblock UDPs: common regblock properties such as wr_swacc are recognized and shown in the viewer without installing PeakRDL-regblock.

Source

github.com/seimei-d/systemrdl-pro (monorepo: LSP + viewer + VSCode extension).

License

MIT — see LICENSE.

Metadata

Release files for systemrdl-lsp 0.23.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for systemrdl-lsp 0.23.1
File Size Uploaded Provenance Actions
systemrdl_lsp-0.23.1.tar.gz 134.5 kB Without provenance Details for systemrdl_lsp-0.23.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for systemrdl-lsp 0.23.1
File Interpreter ABI Platform Actions
systemrdl_lsp-0.23.1-py3-none-any.whl Python 3 none any Details for systemrdl_lsp-0.23.1-py3-none-any.whl

Total release size: 247.9 kB

Release files / systemrdl_lsp-0.23.1.tar.gz

Download URL systemrdl_lsp-0.23.1.tar.gz
Size 134.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9254fd50e227994f55fc8d18221e5ebb29207eba08f2a42a0fce757d113794c2
BLAKE2b-256 checksum
How to use checksums
28d8e7382020ebfcbf9bf9c4328a536a980567d2b73dfb6d01634a7337dafea9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / systemrdl_lsp-0.23.1-py3-none-any.whl

Download URL systemrdl_lsp-0.23.1-py3-none-any.whl
Size 113.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
860f63fc8e197fb8ab38a98098a74cca491989b4d75a85ac78868b028826b1d0
BLAKE2b-256 checksum
How to use checksums
2ff88451649cc5759720551f2c4a4710d676435dc98ca9ffb81b6c050c82196d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Security for systemrdl-lsp 0.23.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page