semvec/pypi-packages huggingface dataset:
rtlviz 0.6.3
MCP Server for AI-powered RTL diagram generation from Verilog source
Requires Python: >=3.10
Keywords: ai, block-diagram, diagram, graphviz, hdl, mcp, rtl, verilog

# RTLViz

Generate interactive block diagrams from Verilog source files.

![Python](https://img.shields.io/badge/python-3.10+-blue.svg)
![License](https://img.shields.io/badge/license-MIT-blue.svg)

## Installation

### Step 1: Install Package
```bash
pip install rtlviz
```

### Step 2: Setup IDE
Spins up the MCP server config for all popular IDEs.
```bash
rtlviz setup
```

### Step 3: Manual IDE Setup (if Step 2 fails)

If the automatic setup doesn't work, you can manually configure your IDE's MCP settings (e.g., `claude_desktop_config.json`).

**Command:** `rtlviz-server` works if installed in PATH. Otherwise use `python -m rtlviz`.

**JSON Config:**
```json
{
  "mcpServers": {
    "rtlviz": {
      "command": "python",
      "args": ["-m", "rtlviz"]
    }
  }
}
```

## Usage

### AI Agent 

After setup, ask your AI assistant (Role: Software Engineer):

> "Use rtlviz MCP to generate a diagram for the Verilog files in `<path to code>`"

The diagram will automatically open in your browser.

**Recommended Models:**
For best results, use state-of-the-art reasoning models:
- **Claude:** Opus 4.5 , Sonnet 4.5
- **Google:** Gemini 3
- **OpenAI:** GPT-5.2

## Example Output

![RISC-V CPU Block Diagram](https://gist.githubusercontent.com/naveenvenk17/fbe1048bd00090735808eec366f88eca/raw/riscv_example.png)

## Features

- **Automatic Parsing** - Extractions modules and connections from Verilog
- **Pipeline Detection** - Identifies CPU stages (IF, ID, EX, MEM, WB)
- **Beautiful Diagrams** - Orthogonal routing with semantic clustering
- **Interactive** - Pan, zoom, and export to SVG
- **Auto-Open** - Instantly opens generated diagrams in browser

## Requirements

- Python 3.10+
- Internet connection (for Viz.js rendering)

## Authors

- Naveen Venkat (naveenvenkat1711@gmail.com)
- Hari Ayyappane (hari.ayyaps@gamil.com)

## License

MIT License
kago-utils 0.1.4
Mahjong Library for Python
Requires Python: >=3.12

# kago-utils
Python用の麻雀ライブラリ。

Mahjong library for Python.

## インストール
```sh
pip install kago-utils
```

## 使い方
### 牌姿の定義
```python
from kago_utils.hai_group import HaiGroup

# from_codeの0は赤5を意味します。天鳳の牌理ツールと同じ仕様です。
tehai1 = HaiGroup.from_code("123m406p789s11122z")
tehai2 = HaiGroup.from_list34([0, 1, 2, 12, 13, 14, 24, 25, 26, 27, 27, 27, 28, 28])
tehai3 = HaiGroup.from_counter34([
    1, 1, 1, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 1, 1, 1, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 1, 1, 1,
    3, 2, 0, 0, 0, 0, 0
])

print(tehai1 == tehai2 == tehai3)  # True
```

`from_list136`と`from_counter136`も同様に使えます。

### 向聴数の計算
```python
from kago_utils.hai_group import HaiGroup
from kago_utils.shanten import calculate_shanten

# 手牌
tehai = HaiGroup.from_code("123m456p789s11122z")

# 向聴数
shanten = calculate_shanten(tehai)
print(shanten)  # -1
```


## 謝辞
- `tests/data/shanten/p_hon_10000.txt`
- `tests/data/shanten/p_koku_10000.txt`
- `tests/data/shanten/p_normal_10000.txt`
- `tests/data/shanten/p_tin_10000.txt`

は、[あらの一人麻雀研究所](https://mahjong.ara.black/etc/shanten/shanten9.htm) からお借りしました。

その他、一部のテストデータは天鳳の牌譜から作成しました。

## Benchmark
https://zurukumo.github.io/kago-utils/dev/bench/