BTA Design Services | DV Environment
Version: 3.0-hierarchical | Date: October 16, 2025
BTA Design Services Inc specializes in ASIC and FPGA design and verification services, custom IP development, embedded software, and DevOps capabilities creation. We are able to do turnkey design, augment or enhance existing design teams, or deliver complete and verified IP blocks to spec. There are no limits to how we engage with our customers, and we are proud of our ability to adapt.
This project was inspired by the work of Srinivasan Venkataramanan and AsFigo. Their pioneering efforts in open‑source SystemVerilog linting, particularly the BYOL (“Build Your Own Linter”) philosophy and SVALint, provided the foundation for this project.
The syntax and style checks in this linter are built on Verible, the open‑source SystemVerilog parsing and linting engine maintained by Google and the CHIPS Alliance community..
Released under the MIT License. See LICENSE file for details.
NaturalDocs Linter Validates NaturalDocs-style comments in SystemVerilog (modules, classes, functions, tasks, typedefs, parameters, constraints), flagging missing or mismatched tags and descriptions.
Verible Linter Uses Verible’s AST to enforce SystemVerilog syntax and style (indentation, line length, naming, formatting) with precise rule-based reporting
Sphinx generated API
This index provides quick navigation to all documentation for the modular linting framework.
-
QUICKSTART.md - Quick start guide (START HERE)
- 30-second quick start
- Common commands
- Configuration options (monolithic vs hierarchical)
- Usage patterns and examples
- Test runner usage
-
README_MODULAR.md - Complete user guide
- Full feature documentation
- Hierarchical configuration reference
- Adding rules and linters
- API reference
- Best practices
-
example/README.md - Developer guide
- Step-by-step guide to add rules
- Step-by-step guide to add linters
- Configuration examples
- Testing procedures
- Best practices
- ARCHITECTURE.md - System architecture
- Component diagrams
- Data flow diagrams
- Design patterns
- Extensibility points
| File | Purpose | Key Classes |
|---|---|---|
base_rule.py |
Abstract base for rules | BaseRule, RuleViolation, RuleSeverity |
base_linter.py |
Abstract base for linters | BaseLinter, LinterResult |
linter_registry.py |
Plugin registry | LinterRegistry, @register_linter |
config_manager.py |
Configuration management | ConfigManager |
__init__.py |
Package exports | - |
| File | Purpose | Supported Files |
|---|---|---|
naturaldocs_linter.py |
NaturalDocs adapter | .sv, .svh |
verible_linter.py |
Verible adapter | .sv, .svh, .v, .vh |
__init__.py |
Package exports | - |
| File | Rules | Description |
|---|---|---|
file_header.py |
3 rules | File header documentation |
include_guards.py |
2 rules | Include guard validation |
package_docs.py |
1 rule | Package documentation |
class_docs.py |
1 rule | Class documentation |
function_docs.py |
1 rule | Function documentation |
task_docs.py |
1 rule | Task documentation |
constraint_docs.py |
1 rule | Constraint documentation |
typedef_docs.py |
1 rule | Typedef documentation |
variable_docs.py |
1 rule | Variable documentation |
parameter_docs.py |
1 rule | Parameter documentation |
__init__.py |
- | Package exports |
Total: 13 individual rules
| File | Purpose |
|---|---|
tb_lint.py |
Main orchestrator - shows command lines, TB_LINT summary |
run_all_tests.sh |
One-line script to run all .sv files in test/ |
example/example_custom_rule.py |
Example custom rule implementation |
example/example_custom_linter.py |
Example custom linter implementation |
verible_verilog_syntax.py |
Verible Python wrapper for AST parsing |
| File | Purpose |
|---|---|
configs/lint_config.json |
Default - Root config linking individual linter configs |
configs/naturaldocs.json |
Individual NaturalDocs config (supports all rule controls) |
configs/verible.json |
Individual Verible configuration (rule enable/disable, severity) |
lint_config_modular.json |
Alternative monolithic configuration (all-in-one) - deprecated |
| File | Purpose |
|---|---|
README.md |
This file - Main documentation index |
QUICKSTART.md |
START HERE - Quick start guide with hierarchical config |
example/README.md |
Developer guide - How to add linters and rules |
README_MODULAR.md |
Complete documentation (updated for v3.0) |
ARCHITECTURE.md |
System architecture and design patterns |
→ Start with QUICKSTART.md
→ Read ARCHITECTURE.md
→ Read example/README.md - Complete guide
→ Study example/example_custom_rule.py
→ Read example/README.md - Complete guide
→ Study linters/naturaldocs_linter.py
→ See "Configuration" in README_MODULAR.md
→ Edit lint_config_modular.json
→ Read "Design Patterns" in ARCHITECTURE.md
→ Check example_custom_rule.py
→ Review rules in rules/naturaldocs/
- ARCHITECTURE.md - System architecture
- Component diagrams
- Data flow
- Design patterns
- Plugin system
-
QUICKSTART_MODULAR.md - Quick start
- Basic commands
- Common use cases
- Quick configuration
-
README_MODULAR.md - Complete guide
- Full feature list
- Configuration reference
- Output formats
- Best practices
-
README_MODULAR.md - Developer guide
- Adding rules
- Adding linters
- API reference
- Testing
-
ARCHITECTURE.md - Design reference
- Extensibility points
- Design patterns
- Component interaction
BaseRule (core/base_rule.py)
├── rule_id: str
├── description: str
├── default_severity() → RuleSeverity
├── check(file, content, context) → List[RuleViolation]
└── create_violation(...) → RuleViolation
BaseLinter (core/base_linter.py)
├── name: str
├── supported_extensions: List[str]
├── _register_rules()
├── prepare_context(file, content) → context
└── lint_files(files) → LinterResult
LinterRegistry (core/linter_registry.py)
├── register(linter_class)
├── get_linter(name, config) → BaseLinter
├── get_all_linters(config) → List[BaseLinter]
└── list_linters() → List[str]
ConfigManager (core/config_manager.py)
├── get_linter_config(name) → dict
├── get_rule_config(linter, rule) → dict
├── is_rule_enabled(linter, rule) → bool
└── get_rule_severity(linter, rule) → str
See rules/naturaldocs/*.py for complete implementations:
file_header.py- Simple text-based checksclass_docs.py- AST-based checksfunction_docs.py- Complex logic with prototypes
linters/naturaldocs_linter.py- AST-based linterlinters/verible_linter.py- External tool wrapper
- Location: https://github.com/chipsalliance/verible
- Documentation: https://chipsalliance.github.io/verible/
- Purpose: SystemVerilog parser and linter
- Location: https://www.naturaldocs.org/
- Documentation: https://www.naturaldocs.org/reference/
- Purpose: Natural Docs is an open source documentation generator for multiple programming languages
- Required: Python 3.6+
- Modules:
verible_verilog_syntax
- Check this index for relevant documentation
- Review appropriate documentation file
- Study example code
- Open Issue
- Review ARCHITECTURE.md for design rationale
- Study source code
- Open Issue
- Read QUICKSTART_MODULAR.md
- Run
python3 tb_lint.py --list-linters - Run
python3 tb_lint.py -f files.txt - Review results
- Read "Adding a New Rule" in README_MODULAR.md
- Study
example_custom_rule.py - Create rule in
rules/naturaldocs/ - Register in
__init__.py - Add to linter
- Configure in
lint_config_modular.json - Test
- Read "Adding a New Linter" in README_MODULAR.md
- Study
linters/naturaldocs_linter.py - Create linter class
- Use
@register_linter - Implement required methods
- Configure in
lint_config_modular.json - Test
- Read ARCHITECTURE.md
- Study component diagrams
- Review data flow
- Examine design patterns
- Explore source code
Copyright (c) 2025 BTA Design Services | October 16, 2025
Version: 3.0-hierarchical
Navigation: You are at the main documentation index. Use the links above to navigate to specific topics.
