Verilog Design Skill logo

Verilog Design Skill

Community
Zhujian-Liang
verilog-design-skill

Verilog/FPGA 代码编写、审查、纠错与分析的专项技能。在需要编写、检查、纠错、分析、优化 Verilog 代码时使用,涵盖编码风格规范、时序打拍与流水线技巧、资源优化(避免除法、移位替代乘法、DSP/BRAM 映射)、复位策略、常见错误防范、像素级判定与区域级聚合模式等。触发场景:(1) 编写新的 Verilog 模块,(2) 审查或纠错已有 Verilog 代码,(3) 优化 FPGA 资源或时序,(4) 设计图像处理流水线,(5) 任何涉及 .v/.sv 文件的工作。

Overview

PublisherZhujian-Liang
Repositoryverilog-design-skill
Skill nameverilog-design-skill
Stars
28
Forks
1
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Zhujian-Liang on GitHub. Read the source before you install it.

Installation

Install the Verilog Design Skill AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Zhujian-Liang/verilog-design-skill/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Zhujian-Liang/verilog-design-skill.git \
  .claude/skills/verilog-design-skill
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Verilog Design Skill in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Verilog Design Skill on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Verilog Design Skill is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Verilog/FPGA 设计规范与实战指南

核心铁律

编写/审查 Verilog 代码时,以下规则不可违反:

  1. 赋值不混用:时序逻辑 <=,组合逻辑 =,同一 always 块严禁混用
  2. 组合逻辑无负反馈:assign b = m + b 会导致仿真死循环,改为时序逻辑
  3. BRAM 数组不加复位:加复位 → 无法推断 BRAM → 用数千寄存器替代
  4. DSP 内用同步复位:异步复位 → 寄存器无法吸收进 DSP → 额外 65+32 LUT
  5. 除法必须替代:FPGA 中 /N 用移位、定点缩放或离散档比较替代

工作流程

编写新模块

  1. 定义端口(clk, rst_n → pre 输入 → post 输出)
  2. 参数化阈值和常量
  3. 规划流水线级数与每级运算复杂度
  4. 同步信号用移位寄存器对齐 LATENCY 周期
  5. 应用核心铁律检查

审查/纠错已有代码

按以下清单逐项检查:

检查项风险等级
赋值混用 =/<=致命
组合逻辑缺少敏感量表致命
组合负反馈致命
BRAM 加复位严重
DSP 异步复位严重
除法运算严重
异步复位释放不同步严重
复位类型混合(同一 DSP/BRAM)中等
省略 begin/end低
同步信号未与数据对齐中等

优化资源/时序

  • 长组合路径 → 拆为多级流水线
  • /N → *(K) >> shift 或离散档比较
  • *2^n → << n
  • *2k±1 → (data << n) ± data
  • 比较平方替代开方:sqrt(a) >= t → a >= t*t
  • 数据路径省复位,控制路径保留复位

除法替代速查

原始运算替代方案Verilog 代码
/256取高位字节result[15:8]
/2^n右移data >> n
/3乘85右移8(data * 85) >> 8
/N定点缩放(data * K) >> S,K/S ≈ 1/N
a/b >= t离散档if (a * 1000 >= b * t1000)
sqrt(a) >= t比较平方a >= t * t

流水线模板

verilog
// 信号对齐(与数据流水线同步)
reg [LATENCY-1:0] vsync_d, hsync_d, de_d;
always @(posedge clk) begin
    vsync_d <= {vsync_d[LATENCY-2:0], pre_vsync};
    hsync_d <= {hsync_d[LATENCY-2:0], pre_hsync};
    de_d    <= {de_d[LATENCY-2:0],    pre_de};
end
assign post_vsync = vsync_d[LATENCY-1];

// 边沿检测
wire pos_flag = sig_r  & ~sig_r2;
wire neg_flag = ~sig_r &  sig_r2;

详细参考

需要深入某个方面时,查阅以下参考文件:

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Verilog Design Skill AI skill do?

Verilog/FPGA 代码编写、审查、纠错与分析的专项技能。在需要编写、检查、纠错、分析、优化 Verilog 代码时使用,涵盖编码风格规范、时序打拍与流水线技巧、资源优化(避免除法、移位替代乘法、DSP/BRAM 映射)、复位策略、常见错误防范、像素级判定与区域级聚合模式等。触发场景:(1) 编写新的 Verilog 模块,(2) 审查或纠错已有 Verilog 代码,(3) 优化 FPGA 资源或时序,(4) 设计图像处理流水线,(5) 任何涉及 .v/.sv 文件的工作。

Why use Verilog Design Skill on TypingMind?

Because you install it once and use it with any model. Verilog Design Skill is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Verilog Design Skill in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Zhujian-Liang/verilog-design-skill/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Verilog Design Skill?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Verilog Design Skill?

As many as you like. As long as a model supports skills, you can use Verilog Design Skill with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Verilog Design Skill AI skill free?

Yes. It is published on GitHub by Zhujian-Liang under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇