← Back to skills
Semiconductor & VLSI · Made here

RTL Diagrams

verilog-to-diagram · rtl → svg

Parses module hierarchy, ports and FSMs from Verilog/SystemVerilog and renders block diagrams and state diagrams as SVG.

Download SKILL.mdAdd to a recipe
Watch the demo0:55
Borrow a skill and use it0:55
In Claude (connector)install_skill("verilog-to-diagram")
CLIlendskill install verilog-to-diagram

SKILL.md

---
name: verilog-to-diagram
description: Generate diagrams from Verilog/SystemVerilog — module hierarchy and block diagrams with ports and buses, FSM state diagrams from case statements, and datapath sketches — rendered as Mermaid/Graphviz SVG. Use for documenting RTL, design reviews, teaching, or 'draw this module'.
license: Proprietary — Lendskill original
---

# RTL Diagrams

## 1. Extract
- Hierarchy: module instances and their connections (parse with a tool such as Yosys `show`/`write_json`, Verible, or a careful read for small files).
- Ports: direction and width per module.
- FSMs: the state register, state encoding (enum/localparam), and transitions with their conditions from the `case` statement.

## 2. Draw
- **Block diagram**: modules as boxes, ports on edges, buses labeled with width (`[31:0]`), clocks/resets drawn once as shared nets.
- **FSM**: states as nodes, reset state marked, edges labeled with the condition (and outputs for Mealy machines).
- Use `flow-diagram-maker` rules: left-to-right data flow, short labels, one accent color.

## 3. Render
Graphviz `dot -Tsvg` for hierarchy (auto layout), Mermaid `stateDiagram-v2` for FSMs. Check every transition in the RTL appears exactly once — list any unreachable or missing transitions you noticed.

## 4. Deliver
SVG + source files, and a short note of anything odd found (unused ports, unreachable states, latches).

Supporting files (0)

  • None — SKILL.md only