verible

Verible is a suite of SystemVerilog developer tools, including a parser, style-linter, formatter and language server

What is verible?

Verible is a suite of SystemVerilog developer tools, including a parser, style-linter, formatter and language server

Overview of verible

What it is

Verible is a suite of SystemVerilog developer tools that includes a parser, style-linter, formatter, and language server. The project's main mission is to parse SystemVerilog (IEEE 1800-2017) for a wide variety of applications, including developer tools. It was born out of a need to parse un-preprocessed source files, which is suitable for single-file applications like style-linting and formatting. The spirit of the project is that no-one should ever have to develop a SystemVerilog parser for their own application, because developing a standard-compliant parser is an enormous task due to the syntactic complexity of the language.

Key features

  • Parser: provides a standalone verible-verilog-syntax tool to help visualize the syntax structure, with ability to export a concrete syntax tree in JSON format and a Python wrapper module.
  • Style Linter: verible-verilog-lint identifies constructs or patterns in code that are deemed undesirable according to a style guide, with features including style guide citations in diagnostics, rule deck configurability, waiver mechanisms, and a GitHub SystemVerilog linter action.
  • Formatter: verible-verilog-format manages whitespace in accordance with a particular style, with features including correcting indentation, inter-token spacing, line-wrapping to a column limit, support for incremental formatting, interactive formatting, tabular alignment, and a GitHub SystemVerilog formatter action.
  • Language Server: verible-verilog-ls implements the standardized language server protocol and provides formatting and linting, with quick-fixes if possible.
  • Lexical Diff: verible-verilog-diff compares two input files for equivalence.
  • Code Obfuscator: verible-verilog-obfuscate transforms Verilog code by replacing identifiers with obfuscated names of equal length, preserving all other text.

Use cases

Verible is suitable for developers working with SystemVerilog code who need to parse, lint, format, or analyze their source files. It can be used in editor integrations via the language server, in continuous integration pipelines with GitHub actions, and for troubleshooting syntax structure. The tools are also useful for preparing test cases with tool vendors using the code obfuscator, and for indexing source code with the Kythe schema extractor.

Getting started

For simple installation, binary releases are provided for Linux and Windows, including statically linked binaries for x86 and Arm. There is also a homebrew package for MacOS. To build from source, you need the bazel build system and a C++20 compatible compiler:bash# Build all tools and librariesbazel build -c opt //...To install locally after building:bashbazel build -c opt :install-binaries.github/bin/simple-install.sh ~/bin

License and pricing

The license is not stated in the provided metadata (NOASSERTION). The project is categorized as open source.---

這是什麼

Verible 是一套 SystemVerilog 開發者工具套件,包含解析器、風格檢查器、格式化工具和語言伺服器。該專案的主要任務是解析 SystemVerilog (IEEE 1800-2017),以應用於各種用途,包括開發者工具。它源於解析未經預處理的原始碼的需求,這適合於風格檢查和格式化等單一檔案應用。專案的精神是沒有人應該需要為自己的應用程式開發 SystemVerilog 解析器,因為由於語言的語法複雜性,開發符合標準的解析器是一項巨大的任務。

主要功能

  • 解析器:提供獨立的 verible-verilog-syntax 工具,幫助視覺化語法結構,能夠以 JSON 格式匯出具體語法樹,並提供 Python 包裝模組。
  • 風格檢查器:verible-verilog-lint 根據風格指南識別程式碼中不理想的結構或模式,功能包括診斷中的風格指南引用、規則集可配置性、豁免機制,以及 GitHub SystemVerilog 檢查器動作。
  • 格式化工具:verible-verilog-format 根據特定風格管理空白,功能包括修正縮排、標記間距、行包裝到欄位限制、支援增量格式化、互動式格式化、表格對齊,以及 GitHub SystemVerilog 格式化動作。
  • 語言伺服器:verible-verilog-ls 實作標準化的語言伺服器協定,提供格式化和檢查功能,並在可能的情況下提供快速修復。
  • 詞法差異工具:verible-verilog-diff 比較兩個輸入檔案是否等效。
  • 程式碼混淆器:verible-verilog-obfuscate 透過將識別碼替換為等長度的混淆名稱來轉換 Verilog 程式碼,保留所有其他文字。

使用情境

Verible 適用於需要解析、檢查、格式化或分析 SystemVerilog 原始碼的開發者。它可以透過語言伺服器整合到編輯器中,透過 GitHub 動作整合到持續整合流程中,並用於語法結構的除錯。程式碼混淆器可用於準備與工具供應商共享的測試案例,而 Kythe 模式提取器則可用於索引原始碼。

快速開始

對於簡單安裝,提供 Linux 和 Windows 的二進位發行版,包括 x86 和 Arm 的靜態連結二進位檔。MacOS 也有 homebrew 套件。若要從原始碼建置,需要 bazel 建置系統和 C++20 相容編譯器:bash# 建置所有工具和函式庫bazel build -c opt //...建置後在本地安裝:bashbazel build -c opt :install-binaries.github/bin/simple-install.sh ~/bin

授權與價格

提供的元資料中未說明授權條款 (NOASSERTION)。該專案被歸類為開源。

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/chipsallianceverible.svg)](https://yunodb.com/tools/chipsallianceverible?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/chipsallianceverible?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/chipsallianceverible.svg" alt="Featured on YunoDB" height="20"></a>