bb-find-module-deps

Parse RTL designs to generate file_list.f with leaf modules first.

41|9|Updated May 22, 2026
One-click install
npx skills add https://github.com/amoslee2026/Babel --skill bb-find-module-deps
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bb-find-module-deps
Source: https://github.com/amoslee2026/Babel/tree/main/.claude/skills/bb-find-module-deps
Command: npx skills add https://github.com/amoslee2026/Babel --skill bb-find-module-deps

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Scan RTL directories to derive a module-to-file mapping and a module instantiation graph, then topologically sort the modules and emit file_list.f (leaves first, top last) for Yosys/Verilator workflows.

Core Features & Use Cases

  • Build module dependency graphs by parsing designs/<name>/rtl/*.sv and identifying module definitions and instantiations.
  • Output an ordered file list (file_list.f) with include/define directives, ready for downstream tools.
  • Trigger scenarios: after RTL generation to prepare file order, or when explicitly invoked via /bb-find-module-deps.

Quick Start

Invoke bb-find-module-deps with rtl_dir set to designs/<name>/rtl and top_module set to the top module to generate file_list.f.

Frequently Asked Questions about bb-find-module-deps

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a topologically sorted Verilog file list for Yosys or Verilator?▼

To generate a topologically sorted Verilog file list for Yosys or Verilator, you can use a dependency analysis tool to scan RTL directories, resolve module instantiations, and emit a file_list.f with leaf modules first and the top module last.

What is the best way to order SystemVerilog files by module dependencies before synthesis?▼

Ordering SystemVerilog files by module dependencies involves parsing designs to build a module-to-file mapping and an instantiation graph, then applying a topological sort to output an ordered file_list.f ready for synthesis workflows.

How do I resolve cyclic dependencies when parsing RTL module instantiations?▼

Resolving cyclic dependencies when parsing RTL module instantiations requires a dependency analysis pipeline that detects cycles during the topological sort phase, ensuring the output file list accurately represents the module hierarchy without breaking the synthesis flow.

Can I automatically extract include and define directives for a Verilog file list?▼

Yes, you can automatically extract include and define directives for a Verilog file list by scanning RTL directories to derive module definitions and instantiations, outputting an ordered file_list.f that integrates these directives for downstream tools.

Does this RTL dependency analysis tool work with nested submodules across multiple directories?▼

Yes, this RTL dependency analysis tool works with nested submodules across multiple directories by scanning the specified designs/<name>/rtl path, resolving inter-module instantiations, and handling multiple submodules to output a correctly ordered file list.

Why is my topological sort failing to identify the correct top module in my RTL design?▼

A topological sort might fail to identify the correct top module in your RTL design if the top_module parameter is not explicitly set or if the RTL directory path does not match the expected designs/<name>/rtl structure required for accurate module-to-file mapping.