Skip to content

[Not Finished] A VSCode extension for hierarchically viewing Verilog and SystemVerilog module structures.

License

Notifications You must be signed in to change notification settings

ZhaoCake/sv-hierarchy-viewer

Repository files navigation

SV Hierarchy Viewer

Note: This extension is currently under active development and has not reached its final release state.


A VSCode extension for hierarchically viewing Verilog and SystemVerilog module structures.

Features

  • 🔍 Recursive Directory Scanning: Automatically discover all Verilog/SystemVerilog files in your workspace
  • 🌲 Hierarchical Module View: Visualize module instantiation relationships in a tree structure
  • 📝 Macro Support: Parse and resolve \define` preprocessor directives
  • 🎯 Navigate to Definition: Click on any module to jump to its source code
  • ⚙️ Custom Paths: Scan specific directories beyond the workspace root
  • 🎨 File Pattern Support: Configure which file extensions to scan (.v, .sv, .vh, .svh)

Usage

Automatic Scan

  1. Open a workspace containing Verilog/SystemVerilog files
  2. Open the "SV Hierarchy" view from the activity bar
  3. Click "Scan Workspace" to analyze all modules

Custom Path Scan

  1. Click "Scan Custom Path" in the view toolbar
  2. Enter the absolute path to scan
  3. The hierarchy will be built from that location

Navigation

  • Click any module in the tree to navigate to its definition
  • Expand/collapse module instances to explore the hierarchy
  • Use the refresh button to rescan after file changes

Configuration

Configure the extension in your VSCode settings:

{
  "svHierarchy.filePatterns": ["**/*.v", "**/*.sv", "**/*.vh", "**/*.svh"],
  "svHierarchy.excludePatterns": ["**/node_modules/**", "**/.*/**"],
  "svHierarchy.maxSearchDepth": 10,
  "svHierarchy.autoScanOnStartup": false
}

Development

This project uses Nix flakes for development environment management.

Setup

# Enter development shell
nix develop

# Install dependencies
npm install

# Compile
npm run compile

# Watch mode
npm run watch

# Package extension
vsce package

License

MIT

About

[Not Finished] A VSCode extension for hierarchically viewing Verilog and SystemVerilog module structures.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published