npx skills add https://github.com/diodeinc/pcb --skill reference-design在 Zener 中创建生产质量参考设计的工作流程。参考设计将 IC 与其推荐的应用电路(去耦、偏置、上拉电阻、晶振等)封装为一个可复用的模块。
component-search 技能)。在适用时优先选择已验证的注册表模块/组件;仅当需要新的本地组件包时,才将 Web 组件导入工作区。datasheet-reader 技能,然后提取数据手册检查表中列出的信息。.zen 文件,每完成一个主要部分后进行构建。参见设计结构。pcb build reference/<NAME> 必须通过。然后运行 pcb fmt reference/<NAME>。在编写任何代码之前,从扫描的数据手册 Markdown 中提取以下信息:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
Spi、I2c、Uart、Rgmii 等)在编写新的参考设计之前,请从注册表缓存中阅读已验证的示例以学习模式。使用以下命令查找它们:
pcb search -m registry:modules "<similar function>" -f json
然后通过相关的包文档检查缓存的源代码,或直接从 ~/.pcb/cache/ 读取 .zen 文件。
需要观察的关键模式:
dnp= 驱动的部件、计算值)如果现有示例与 idiomatic-zener 冲突,请在新工作中遵循 idiomatic-zener。特别是,不要对组件使用条件实例化。
使用 MPN 前缀加上 x 后缀。例如:DP83867ISRGZR → DP83867x。
reference/<PREFIX>x/
├── <PREFIX>x.zen # 主设计文件
├── pcb.toml # 空的或包含非自动依赖项
└── README.md # 使用指南
使用 pcb new package reference/<PREFIX>x 搭建脚手架。
按以下顺序组织文件:
_ 为前缀dnp= 而非条件实例化参考设计特定约定:
_ 前缀:_RBIAS = Net("RBIAS")"0402"),使用 passives_size 变量每完成一个主要部分后进行构建 — 不要写完整个文件再构建。这有助于及早发现错误:
pcb build reference/<PREFIX>x
常见错误:
pcb build 接受目录,而非 .zen 文件完成后格式化:pcb fmt reference/<PREFIX>x。
| 用途 | 典型值 | 备注 |
|---|---|---|
| 去耦(数字) | 每个电源引脚 1µF | 尽可能靠近引脚放置 |
| 去耦(模拟) | 100nF C0G + 10µF | C0G 用于低 ESR |
| 去耦(大容量) | 10µF–47µF | 靠近电源输入,X5R/X7R |
| I2C 上拉电阻 | 2.2kΩ–4.7kΩ | 连接到 VDD,值取决于总线速度和电容 |
| MDIO 上拉电阻 | 2.2kΩ | 连接到 VDDIO |
| SPI 上拉电阻(CS) | 10kΩ | 在复位时保持 CS 无效 |
| 复位 RC 滤波器 | 10kΩ 上拉电阻 + 100nF | ~1ms 时间常数 |
| 偏置电阻 | 根据数据手册(1% 容差) | 始终使用数据手册的精确值 |
| LED 限流电阻 | 330Ω | 在 3.3V 下约 10mA,根据目标电流调整 |
| 晶振负载电容 | 根据晶振规格 | C0G 电介质,值来自晶振数据手册公式 |
如有疑问,请严格遵循数据手册的推荐值。没有理由时不要优化无源器件。
# <NAME> 参考设计
对 IC 及本参考设计提供内容的简要描述。
## 特性
- **IC**: MPN(封装)
- 关键电气规格(电压范围、电流、频率等)
- **接口**: 暴露了哪些总线/连接
- **保护**: 如果相关,包括 ESD、过流、热特性
## 接口
| 名称 | 类型 | 描述 |
|------|------|-------------|
| VIN | Power | 输入电源(范围) |
| VOUT | Power | 稳压输出 |
| GND | Ground | 公共地 |
| SPI | Spi | 控制接口 |
## 用法
```python
MyRef = Module("github.com/diodeinc/registry/reference/<NAME>/<NAME>.zen")
MyRef(
name="U1",
VIN=vin_3v3,
VOUT=vout_1v8,
GND=gnd,
SPI=spi_bus,
)
记录关键设计决策、权衡以及任何不明显的方面:
每周安装量
82
代码仓库
[diodeinc/pcb](https://github.com/diodeinc/pcb "diodeinc/pcb")
GitHub Stars
198
首次出现
6 天前
安全审计
[Gen Agent Trust HubPass](/diodeinc/pcb/reference-design/security/agent-trust-hub)[SocketPass](/diodeinc/pcb/reference-design/security/socket)[SnykWarn](/diodeinc/pcb/reference-design/security/snyk)
安装于
claude-code82
opencode4
gemini-cli4
github-copilot4
codex4
kimi-cli4
Workflow for creating production-quality reference designs in Zener. A reference design wraps an IC with its recommended application circuit — decoupling, biasing, pull-ups, crystals, etc. — as a reusable module.
component-search skill if needed). Prefer validated registry modules/components when they fit; import a web component into the workspace only when you need a new local component package.datasheet-reader skill, then extract the information listed in Datasheet Checklist..zen file section by section, build after every major section. See Design Structure.pcb build reference/<NAME> must pass. Then pcb fmt reference/<NAME>.Extract these from the scanned datasheet markdown before writing any code:
Spi, I2c, Uart, Rgmii, etc.)Before writing a new reference design, read validated examples from the registry cache to learn patterns. Find them with:
pcb search -m registry:modules "<similar function>" -f json
Then inspect the cached source with the relevant package docs or read the .zen file directly from ~/.pcb/cache/.
Key patterns to observe:
dnp=-driven parts, computed values)If an existing example conflicts with idiomatic-zener, follow idiomatic-zener for new work. In particular, do not use conditional instantiation for components.
Use the MPN prefix plus x suffix. Example: DP83867ISRGZR → DP83867x.
reference/<PREFIX>x/
├── <PREFIX>x.zen # Main design file
├── pcb.toml # Empty or with non-auto dependencies
└── README.md # Usage guide
Scaffold with pcb new package reference/<PREFIX>x.
Organize the file in this order:
_dnp= rather than conditional instantiationReference-design-specific conventions:
_ prefix: _RBIAS = Net("RBIAS")passives_size variable when all passives share a package size (e.g. "0402")Build after every major section — don't write the entire file and then build. This catches errors early:
pcb build reference/<PREFIX>x
Common errors:
pcb build takes the directory, not the .zen fileFormat when done: pcb fmt reference/<PREFIX>x.
| Purpose | Typical Value | Notes |
|---|---|---|
| Decoupling (digital) | 1µF per power pin | Place closest to pin |
| Decoupling (analog) | 100nF C0G + 10µF | C0G for low ESR |
| Decoupling (bulk) | 10µF–47µF | Near power input, X5R/X7R |
| I2C pull-ups | 2.2kΩ–4.7kΩ | To VDD, value depends on bus speed and capacitance |
| MDIO pull-up | 2.2kΩ | To VDDIO |
| SPI pull-up (CS) | 10kΩ | Keep CS deasserted at reset |
| Reset RC filter | 10kΩ pull-up + 100nF | ~1ms time constant |
| Bias resistor | Per datasheet (1% tolerance) | Always use exact datasheet value |
| LED current limit | 330Ω | ~10mA at 3.3V, adjust for target current |
When in doubt, follow the datasheet's recommended values exactly. Don't optimize passives without reason.
# <NAME> Reference Design
Brief description of the IC and what this reference design provides.
## Features
- **IC**: MPN (package)
- Key electrical specs (voltage range, current, frequency, etc.)
- **Interfaces**: What buses/connections are exposed
- **Protection**: ESD, overcurrent, thermal features if relevant
## Interfaces
| Name | Type | Description |
|------|------|-------------|
| VIN | Power | Input supply (range) |
| VOUT | Power | Regulated output |
| GND | Ground | Common ground |
| SPI | Spi | Control interface |
## Usage
\```python
MyRef = Module("github.com/diodeinc/registry/reference/<NAME>/<NAME>.zen")
MyRef(
name="U1",
VIN=vin_3v3,
VOUT=vout_1v8,
GND=gnd,
SPI=spi_bus,
)
\```
## Design Notes
Document key design decisions, tradeoffs, and anything non-obvious:
- Why specific passive values were chosen
- Strap pin configurations and what they select
- Thermal considerations
- Layout-sensitive connections
## References
- [Datasheet](url)
Weekly Installs
82
Repository
GitHub Stars
198
First Seen
6 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
claude-code82
opencode4
gemini-cli4
github-copilot4
codex4
kimi-cli4
前端设计技能指南:避免AI垃圾美学,打造独特生产级界面
46,600 周安装
| Crystal load caps | Per crystal spec | C0G dielectric, value from crystal datasheet formula |