A Verilog-2001 RTL parser, hierarchy analyzer, and lint tool written in MoonBit.
Dependencies
moon update
moon check --target all
moon test --target all
moon run src/cli -- check examples/counter.v
moon run src/cli -- outline examples/hierarchy.v
moon run src/cli -- graph examples/hierarchy.vmoonbit-rtl check <file> [--format=text|json|sarif]
moonbit-rtl outline <file>
moonbit-rtl graph <file>
moonbit-rtl summary <file>
moonbit-rtl ir <file>
moonbit-rtl tokens <file>| Code | Category | Meaning | Default |
|---|---|---|---|
| RTL101 | structure | duplicate module declaration | warning |
| RTL102 | structure | unresolved module instance | error |
| RTL201 | driving | internal signal is never driven | warning |
| RTL202 | driving | signal has multiple independent drivers | error |
| RTL203 | driving | output port is never assigned | warning |
| RTL204 | width | known assignment widths do not match | warning |
| RTL205 | connectivity | instance port direction/width contract mismatch | error |
| RTL206 | connectivity | instance contract cannot be resolved | warning |
| RTL207 | control flow | procedural assignment is conditional | info |
src/source source files, spans, line indexes, and source bundles
src/lexer tokens, lexer, token metrics, and delimiter queries
src/syntax public AST, visitors, queries, and design metrics
src/parser recovering Verilog parser and recovery analysis
src/semantic symbol index, contracts, control flow, IR, and graph analytics
src/lint configurable rules, categories, and diagnostic reports
src/diagnostic reports, text/JSON/SARIF/DOT/Markdown renderers
src/cli command-line entry point and reusable batch analysis API
examples valid and intentionally broken RTL fixtures
benchmarks deterministic parser/index workload and benchmark instructions
docs design, rules, IR, benchmark, and acceptance evidencemoon run src/cli -- check examples/broken.v --format=json
moon run src/cli -- summary examples/hierarchy.v
moon run src/cli -- ir examples/hierarchy.v
moon run src/cli -- tokens examples/counter.v
moon run benchmarks --target wasm-gcmoon fmt
moon check --target all
moon test --target wasm-gc
moon info
.\scripts\count-moonbit-lines.ps1A Verilog-2001 RTL parser, hierarchy analyzer, and lint tool written in MoonBit.
Dependencies