# sky130_klayout_pdk **Repository Path**: deanyou/sky130_klayout_pdk ## Basic Information - **Project Name**: sky130_klayout_pdk - **Description**: Skywater 130nm Technology PDK for KLayout / KLayout 版 Skywater 130nm 工艺套件 增加一些常用 macro - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: kind-greider - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-08 - **Last Updated**: 2025-12-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Skywater 130nm Technology PDK for KLayout / KLayout 版 Skywater 130nm 工艺套件
This package contains the Skywater 130nm PDK for KLayout. 本套件提供适用于 KLayout 的 Skywater 130nm 工艺设计套件(PDK),便于在开源版图平台上直接调用流程文件、DRC/LVS 脚本与器件生成器。 ## Contents * `sky130.lyt` : technology and connections description `sky130.lyt`:技术与互连描述文件 * `sky130.lyp` : layers color and shape description `sky130.lyp`:层次颜色、形状定义 * `sky130.map` : layer mapping of def/lef shapes `sky130.map`:DEF/LEF 层映射 * DRC : DRC deck, located at [mpw_precheck](https://github.com/efabless/mpw_precheck/blob/main/checks/tech-files/sky130A_mr.drc) DRC:位于 mpw_precheck 仓库中的 `sky130A_mr.drc` * LVS : LVS script, located at `lvs/lvs_sky130.lylvs` LVS:对应 `lvs/lvs_sky130.lylvs` 脚本 * PCells : devices generators PCells:器件参数化生成器集合 ## Usage ### Installation You have three options for installing this package: 安装可选择以下三种方式: 1. Option: Use KLayout's Salt package manager In Klayout select `Tools` → `Manage Packages`. Inside the Salt package manager under "Install New Packages" search for "Efabless_sky130", click the checkmark and apply. 方式一:通过 KLayout Salt 包管理器,在 `Tools → Manage Packages` 中搜索 “Efabless_sky130”,勾选并安装。 2. Option: Clone this repository From inside the repository run this command to start KLayout in edit mode: ```console KLAYOUT_PATH=. klayout -e ``` 方式二:克隆本仓库后,在仓库目录下运行上面命令,以编辑模式启动 KLayout(`KLAYOUT_PATH` 指向当前目录)。 3. Option: Install the complete sky130 PDK via [open_pdks](https://github.com/RTimothyEdwards/open_pdks) or [volare](https://github.com/efabless/volare) Set the `$PDK_ROOT` and `$PDK` environment variables to point to your PDK installation. Run this command to start KLayout in edit mode: ```console KLAYOUT_PATH=$PDK_ROOT/$PDK/libs.tech/klayout klayout -e ``` 方式三:通过 open_pdks 或 volare 安装完整的 sky130 PDK,设置 `$PDK_ROOT` 与 `$PDK` 后,使用上述命令启动 KLayout。 > [!NOTE] > If the package was not installed via Salt, `KLAYOUT_PATH` must point to the location of the package. > > **提示**:若未通过 Salt 安装,请确保 `KLAYOUT_PATH` 指向套件所在路径。 ### FCQFN packaging DRC / FCQFN 封装 DRC - **English** The `sky130A_mr.drc` deck now includes an FCQFN packaging rule set that can run independently of the BEOL checks. You can enable it in two ways: 1. `Tools → Efabless sky130 → Run DRC (Custom)` and tick the `fcqfn` checkbox (BEOL may stay off). 2. Use the dedicated macro `Tools → Efabless sky130 → Run DRC (FCQFN)` which pre-sets `$feol=false`, `$beol=true`, and `$fcqfn=true`. The rules cover the package layers defined in `tech/sky130/sky130.map` lines 57–66 (POR/CBD/CP/COV/RDL/PI1/PI2/PIN/UBM_CU/BALL) and mirror the earlier Calibre `fcqfn_check.drc`. - **中文** `sky130A_mr.drc` 现在内建一组可单独执行的 FCQFN 封装 DRC 规则,不再依赖 BEOL 开关。启用方式: 1. 透过 `Tools → Efabless sky130 → Run DRC (Custom)` 对话框勾选 `fcqfn`,即使关闭 BEOL 也能运行。 2. 直接使用 `Tools → Efabless sky130 → Run DRC (FCQFN)` 宏,预设 `$feol=false`、`$beol=true`、`$fcqfn=true`。 这些规则针对 `tech/sky130/sky130.map` 第 57–66 行所定义的封装层(POR/CBD/CP/COV/RDL/PI1/PI2/PIN/UBM_CU/BALL),与之前的 Calibre `fcqfn_check.drc` 在几何约束上保持一致。 ### GDS Flatten Tool / GDS 展平工具 - **English** The PDK includes a GDS flatten tool that automatically flattens hierarchical GDS layouts and cleans up unused cells. To use it: 1. Open a GDS file in KLayout. 2. Run `Tools → Efabless sky130 → Flatten GDS Layout`. 3. Review the layout structure analysis in the confirmation dialog (cell count, hierarchy depth, empty cells, etc.). 4. Configure options: prune unused cells, delete empty cells, verify after flattening. 5. Execute the flatten operation and save the result using `File → Save As`. The tool provides detailed statistics, warnings for complex layouts, and a summary of the flattening operation. - **中文** PDK 内建一个 GDS 展平工具,可自动展平层级化 GDS 版图并清理未使用的 cells。使用方法: 1. 在 KLayout 中打开 GDS 文件。 2. 运行 `Tools → Efabless sky130 → Flatten GDS Layout`。 3. 在确认对话框中查看版图结构分析(cell 数量、层级深度、空 cells 等)。 4. 配置选项:删除未使用的子 cells(prune)、删除空 cells、展平后验证。 5. 执行展平操作,并使用 `File → Save As` 保存结果。 该工具提供详细的统计信息、复杂版图的警告提示,以及展平操作的摘要报告。 ### PCells If you would like to use the PCells, you need to install `gdsfactory` in your system-wide Python package installation. This can be as simple as running the following: 若要启用 PCells,需在系统级 Python 环境中安装 `gdsfactory`,示例命令如下: ```console pip install --upgrade gdsfactory ``` > [!IMPORTANT] > If you are using a Linux distribution that discourages the installation of system-wide Python packages through pip, you need to pass `--break-system-packages`. > > **重要**:若系统限制 pip 安装全局包,请加上 `--break-system-packages` 参数。 ## Acknowledgement The XSection and D25 setup are gratefully borrowed from: [sky130A_el](https://github.com/klayoutmatthias/sky130A_el). XSection 与 D25 配置引用自 [sky130A_el](https://github.com/klayoutmatthias/sky130A_el),在此表示感谢。 ## Align Tool / 对齐工具 - **English** The Sky130 KLayout PDK ships with an interactive Align Tool for precise placement of shapes: - Activate via `Plugins → Align Tool (A)` (or toolbar icon, if enabled). - First click chooses the **source** edge or point (the object to move). - Second click chooses the **target** edge or point (the reference). - The tool computes a translation and moves the source geometry so that source and target features align. Spacing and direction features: - The dock widget on the right lets you define multiple spacing presets (in microns). - Select one preset by radio button; the chosen value is applied automatically on the **second click**. - Spacing is converted to DBU and applied along a single movement axis so that the final gap equals the selected spacing. - Auto mode infers the axis from the two selections: - Left/right vertical edges → move in **X** only. - Top/bottom horizontal edges → move in **Y** only. - If the two selected edges are not parallel, the tool skips the move and shows an informational message. - **中文** Sky130 KLayout PDK 内置一个交互式对齐工具,用于精确摆放图形: - 通过 `Plugins → Align Tool (A)`(或工具栏图标)启用。 - 第一次点击选择**第一条边/点**,即要移动的对象。 - 第二次点击选择**第二条边/点**,作为对齐参考。 - 工具会计算平移量,将源图形移动到与目标特征对齐的位置。 间距与方向特性: - 右侧 dock 面板可以配置多个对齐间距预设(单位为微米)。 - 通过单选按钮选中一个预设,第二次点击时会自动使用该间距,无需额外“Apply”按钮。 - 间距会转换为 DBU,并沿单一坐标轴施加,使最终两条边之间的间隙等于所选间距。 - 自动模式会根据两次选择自动判断移动方向: - 若选择的是左右两条竖直边,则仅沿 **X 方向** 移动。 - 若选择的是上下两条水平边,则仅沿 **Y 方向** 移动。 - 若两条选中的边不平行,则本次对齐将被**跳过**,并弹出提示窗口,保持当前版图不被误移动。 ## License If not otherwise noted [The Apache License, version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt).