Token导航 LogoToken导航TokenDH.com
效率需要联网clawhub未标认证来源可访问clear审计通过

verilog-designverilog 设计

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

8,677

周安装

351

GitHub Stars

公开资料未说明

下载量

2,724
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:verilog-design(verilog 设计)
来源仓库:https://github.com/billchen1020/verilog-design
安装命令:
openclaw skills install verilog-design
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install verilog-design

简介

用于辅助 Verilog/SystemVerilog 模块的设计、实现和验证。

  • 适用于规范驱动开发和自动仿真工作流程的效率场景。
  • 通过自检测试平台和回滚机制确保设计稳定性。verilog-design 属于效率类 Skill,可作为该场景下的辅助能力补充。
  • 安装前建议确认权限范围和是否会触发命令执行。
  • 可能涉及硬件描述语言工具链,需评估维护状态后再使用。

SKILL.md

name
Verilog Design Flow
description
Design, implement, and verify Verilog/SystemVerilog modules with spec-driven development, self-checking testbenches, and automated simulation workflows. Supports Synopsys VCS, Cadence Xrun, Icarus Verilog simulators, and slang static syntax checker. Use when the user needs to write Verilog modules, design digital circuits, create counters/FSMs/interfaces, simulate and verify designs, or analyze VCD waveforms.

Core Rules

Phase 1: Understand Requirements

  1. Ask clarifying questions if the design spec is incomplete
  2. Identify: clock/reset strategy, interface signals, functionality, timing constraints
  3. Confirm the target: synthesis (FPGA/ASIC) or simulation only

Phase 2: Write Design Spec

  1. Create a markdown spec document with:

- Module name and purpose - Port list (direction, width, description) - Functional description - Timing diagram (if applicable) - Test scenarios checklist

  1. Store spec in memory or as a file for reference

Phase 3: Implement Verilog

  1. One-always-one-signal coding style: Each signal should be assigned in exactly one always block

- Separate sequential (posedge clk) and combinational (@*) logic - Declare intermediate signals for complex logic - Avoid mixing blocking (=) and non-blocking (<=) assignments in the same always block

  1. Follow synthesizable coding guidelines:

- Use always @(posedge clk) for sequential logic - Use assign or always @(*) for combinational logic - Avoid latches (ensure all branches assign in combinational blocks) - Explicit reset strategy (sync/async)

  1. Include header comments with author, date, and revision (see Version Tracking below)
  2. Use descriptive signal names, avoid single-letter variables

Phase 3b: Static Syntax Check with Slang

Before simulation, run static syntax checking using slang:

# Check Verilog/SystemVerilog syntax
slang <module_name>.v

# Or for SystemVerilog files
slang <module_name>.sv

What slang checks:

  • Syntax errors and parsing issues
  • Type mismatches
  • Undefined references
  • Port connection errors
  • SystemVerilog compliance

If slang reports errors:

  1. Fix all syntax errors before proceeding to simulation
  2. Pay attention to warnings about potential issues
  3. Re-run slang until "Build succeeded: 0 errors"

Phase 3c: Design Review Checklist

Before simulation, verify:

  • [ ] Slang syntax check passes (0 errors)
  • [ ] All sequential signals have explicit reset values
  • [ ] No combinational logic loops (synthesis will error)
  • [ ] No unintentional latches (all if/case branches assign in combinational blocks)
  • [ ] State machines have default case branch
  • [ ] Clock domain crossing signals are properly synchronized
  • [ ] Vector widths match between assignment source and destination
  • [ ] Array indices are within declared bounds
  • [ ] No blocking assignments (=) in sequential always blocks
  • [ ] No non-blocking assignments (<=) in combinational always blocks
  • [ ] timescale directive present in all source files

Phase 4: Write Testbench

  1. Create self-checking testbench using:

- Clock generator (typical: always #5 clk = ~clk; for 10ns period) - Reset stimulus - Input stimulus generation - Expected output generation/comparison - $display() or $monitor() for pass/fail reporting - $finish() after all tests complete

  1. Save as <module_name>_tb.v

Phase 5: Simulate with EDA Tools

The skill automatically detects and uses available simulators in priority order:

  1. Synopsys VCS (if vcs command available)
  2. Cadence Xrun (if xrun command available)
  3. Icarus Verilog (fallback)

Simulator Detection Logic

# Priority order: VCS → Xrun → Icarus
which vcs && use_vcs
which xrun && use_xrun
fallback to iverilog

Synopsys VCS (Verilog)

vcs -full64 -debug_acc+all -l sim.log -R <module_name>.v <module_name>_tb.v

Synopsys VCS (SystemVerilog)

vcs -full64 -debug_acc+all -sverilog -l sim.log -R <module_name>.sv <module_name>_tb.sv

Cadence Xrun (Verilog)

xrun -64bit -access rwc -l sim.log <module_name>.v <module_name>_tb.v

Cadence Xrun (SystemVerilog)

xrun -64bit -access rwc -sv -l sim.log -R <module_name>.sv <module_name>_tb.sv

Icarus Verilog (Fallback)

iverilog -o <module_name>.vvp <module_name>.v <module_name>_tb.v
vvp <module_name>.vvp

VCD Waveform Output

⚠️ Important: Always use VCD format for waveform dumping to ensure compatibility:

initial begin
    $dumpfile("<module_name>.vcd");
    $dumpvars(0, <module_name>_tb);
end
  • VCS and Xrun support VCD via $dumpfile()/$dumpvars()
  • FSDB format (for Verdi) is NOT supported by the VCD analysis scripts
  • Keep testbench VCD-compatible for cross-simulator portability

Phase 6: Debug & Iterate

  1. If assertions fail or outputs incorrect:

- Review waveforms with gtkwave OR - Use Python VCD analysis script: python3 <skill_dir>/scripts/check_vcd.py <module>.vcd - See references/vcd-analysis.md for detailed API

  1. Fix RTL bugs, update testbench if needed
  2. Re-simulate until all tests pass
  3. Update spec with any design changes

Testbench Template

`timescale 1ns/1ps

module <module>_tb;
    // Parameters
    parameter CLK_PERIOD = 10;
    
    // Signals
    reg clk;
    reg rst_n;
    // ... add inputs/outputs
    
    // Instantiate DUT
    <module> dut (
        .clk(clk),
        .rst_n(rst_n),
        // ... ports
    );
    
    // Clock generation
    initial begin
        clk = 0;
        forever #(CLK_PERIOD/2) clk = ~clk;
    end
    
    // VCD dump
    initial begin
        $dumpfile("<module>.vcd");
        $dumpvars(0, <module>_tb);
    end
    
    // Test stimulus
    initial begin
        // Initialize
        rst_n = 0;
        // ... init inputs
        
        // Release reset
        #(CLK_PERIOD * 2);
        rst_n = 1;
        
        // Apply test vectors
        // ... stimulus code
        
        // Check results
        // ... self-checking assertions
        
        #(CLK_PERIOD * 10);
        $finish();
    end
    
    // Monitor
    initial begin
        $monitor("Time=%0t: signals=...", $time);
    end
endmodule

VCD Analysis

For automated waveform checking, use Python VCD parsing. Reference: references/vcd-analysis.md

Data Storage

  • Design specs: Store in memory/verilog_specs/<module_name>_spec.md
  • Verilog files: Create in workspace as <module_name>.v
  • Testbenches: Create as <module_name>_tb.v
  • Simulation outputs: Generate .vvp (Icarus), sim.log, and .vcd files

Simulator Auto-Detection Script

Use the provided helper script to automatically select and run the best available simulator:

# The script checks for VCS → Xrun → Icarus in order
bash <skill_dir>/scripts/simulate.sh <module_name>

Example workflow:

# 1. Detect simulator and run
bash scripts/simulate.sh counter

# 2. Check simulation log
cat sim.log

# 3. Analyze VCD waveforms
python3 scripts/check_vcd.py counter.vcd

External Tools

ToolCommandPurpose
Synopsys VCSvcs -full64 -debug_acc+all -l sim.log -R file.vCompile & Simulate Verilog
Synopsys VCS (SV)vcs -full64 -debug_acc+all -sverilog -l sim.log -R file.svCompile & Simulate SystemVerilog
Cadence Xrunxrun -64bit -access rwc -l sim.log file.vCompile & Simulate Verilog
Cadence Xrun (SV)xrun -64bit -access rwc -sv -l sim.log -R file.svCompile & Simulate SystemVerilog
Icarus Verilogiverilog -o out.vvp file.vCompile Verilog (fallback)
VVPvvp out.vvpRun simulation
GTKWavegtkwave dump.vcdView waveforms (optional)

Common Pitfalls

IssueFix
Multiple driversEnsure one-always-one-signal: each signal assigned in exactly one always block
Latch inferenceEnsure all if/case branches assign in combinational always
Missing resetInclude explicit reset in sequential always blocks
Race conditionsUse non-blocking <= in sequential logic only
Simulation mismatchCheck timescale and delays
VCD not generatedEnsure $dumpfile() called before $dumpvars()

Debugging Guide

Simulation Hangs / Freezes

SymptomCauseSolution
No output, simulation stuckCombinational loopCheck for circular logic in combinational always blocks
Infinite loop warningZero-delay feedbackAdd delay elements or check async feedback paths
Division by zeroRuntime calculation errorCheck divisor is never zero
Array out of boundsInvalid indexVerify index range before array access

Output Shows 'X' (Unknown)

SymptomCauseSolution
Specific signal is XUninitialized registerAdd explicit reset value
Wide bus partially XMixed width assignmentCheck vector width consistency
After reset releaseReset deassertion timingEnsure reset held long enough
Random X propagationX propagation from inputTrace back to source of X

Timing Issues

SymptomCauseSolution
Output one cycle lateBlocking vs non-blockingUse <= in sequential always blocks
Glitches on outputCombinational logic hazardAdd register stage or use synchronous output
Setup/hold violations (ASIC)Clock/data skewCheck synthesis timing reports

Synthesis Errors

ErrorCauseSolution
"Not synthesizable"Unsupported Verilog constructReplace with synthesizable equivalent
"Multiple drivers"Signal assigned in multiple alwaysMerge logic or use intermediate signals
"Latch inferred"Incomplete if/case in combinationalAdd default assignment or use else
"Undriven signal"Output declared but not assignedConnect to logic or tie to constant

Version Tracking

File Header Template

Every Verilog file should include:

/**
 * Module: <module_name>
 * Description: <brief description>
 * Author: <name>
 * Date: <YYYY-MM-DD>
 * Version: <major>.<minor>.<patch>
 * 
 * Changelog:
 *   v1.0.0 - <date> - Initial release
 *   v1.1.0 - <date> - <description of changes>
 *   v2.0.0 - <date> - <breaking changes>
 * 
 * Parameters:
 *   - PARAM1: <description> (default: <value>)
 *   - PARAM2: <description> (default: <value>)
 * 
 * Ports:
 *   - clk: <description>
 *   - rst_n: <description>
 *   ...
 */

Version Numbering

  • Major: Breaking changes (interface change, removed features)
  • Minor: New features, backward compatible
  • Patch: Bug fixes, no functional change

Git Workflow (Recommended)

# Before starting new feature
git checkout -b feature/new-functionality

# After completing and testing
git add <files>
git commit -m "feat: add <feature> to <module>"
git checkout main
git merge feature/new-functionality

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

85.73%
按下载量换算2,335

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills