tcad-script-gen

Generate scripts for TCAD (Sentaurus & SILVACO) using the TypeScript package '@tongleen/tcad-script-gen'.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "tcad-script-gen" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-0c08644b666ccedbddaf0ea48467e7819f4e152938b8377a5d022918c18ccac9. Verify the upstream source and version against https://skillhub.cn/skills/user_d652ff93/tcad-script-gen before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Generate scripts for TCAD (Sentaurus & SILVACO) using the TypeScript package '@tongleen/tcad-script-gen'.

0 Downloads

Introduction source: third_party · user_d652ff93 · 0.1.1 Reference

SkillPi interpretation

Tasks
Generate script for TCAD(Sentaurus&SILVACO) using TypeScript package '@tongleen/tcad-script-gen
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: tcad-script-gen
description: Generate script for TCAD(Sentaurus&SILVACO) using TypeScript package '@tongleen/tcad-script-gen'

@tongleen/tcad-script-gen 使用指南

本文档指导如何使用 @tongleen/tcad-script-gen 库为 Sentaurus TCAD 生成 SDE 和 SDevice 脚本。

概述

@tongleen/tcad-script-gen 是一个 TypeScript DSL 生成库,提供用于构建 Sentaurus TCAD 仿真脚本的声明式 API。 它分为多个独立的功能模块,目前已经实现 SDE(结构定义编辑器)和 SDevice(器件仿真)的代码生成。

各个模块功能无交叉,使用时确保只使用其中一个功能模块。

使用模式

每个模块通过工厂函数创建,并维护一个内部的命令数组 (string[])。 您通过调用工厂返回的 API 方法,将命令逐步推入数组,最后通过 save() 或 run() 输出或执行脚本。

import { useSde, useSdevice, position } from "@tongleen/tcad-script-gen";

// 创建 SDE 上下文,指定材料名和掺杂剂类型(泛型)
const sde = useSde<"Silicon" | "Oxide", "As" | "B" | "P">();
// 现在可以使用 sde.draw, sde.contact, sde.dop, sde.mesh 等方法

// 创建 SDevice 上下文
const sdevice = useSdevice<"Silicon" | "Oxide", "As" | "B" | "P">();
// 使用 sdevice.file, sdevice.electrode, sdevice.physics, sdevice.math, sdevice.plot, sdevice.solve

重要:泛型参数 M 和 D 分别代表材料和掺杂剂的名称字面量,用于类型安全。您可以在使用时传入具体的字符串联合类型。

库提供了两个主要入口函数:

useSde() 用于生成 SDE(结构编辑器) 脚本,包含几何绘制、接触定义、掺杂、网格划分。

useSdevice() 用于生成 SDevice(器件模拟器) 脚本,包含文件设置、电极、物理模型、数学求解器、绘图与求解命令。

每个入口函数返回一个对象,其方法负责向内部命令缓冲区追加表达式。

所有方法均不返回当前实例,而是通过修改内部的命令列表来实现流式操作(类似一个上下文对象)。

最终通过 .save(filename) 保存为脚本文件,或通过 .runAndExit() 直接在本地执行 sde / sdevice 命令(依赖 Bun 运行时环境,库未提供 Node 适配)。

除非需要仿真结束后进行其他工作,直接调用 .runAndExit() 是最佳实践

模块参考

详细 API 文档请参阅以下文件:

  • SDE 模块 (sde.md) – 几何绘制、掺杂、接触、网格生成。
  • SDevice 模块 (sdevice.md) – 文件设置、电极、物理模型、数学控制、输出绘图、求解设置。

如果用户目录存在该库,则可读取对应内容来进行确认。注意不要读取太多导致过多资源消耗。

最佳实践

使用泛型指定材料和掺杂剂名称 – 这能确保您在调用 API 时传入正确的字符串,避免拼写错误。

逐步构建,最后保存或运行 – 所有 API 调用都在累积命令,完成所有配置后再调用 save() 或 run()。

合理设置坐标系和重叠行为 – 在 SDE 中,调用 sde.draw.setCoordMode('y_down')(常见于 TCAD 工艺仿真)和 setOverlapBehavior('replace') 来避免意外布尔运算。

为 profile 和 mesh 使用唯一名称 – 名称在 SDE 上下文中必须全局唯一,建议使用描述性前缀。

使用 .runAndExit() 方法直接执行 – 该库支持通过 Bun.spawn 直接调用 sde 或 sdevice 可执行文件,方便快速测试。

未实现模块

以下模块计划在后续版本中实现,目前尚不可用:

sprocess – 工艺仿真

svisual – 可视化

atlas – Atlas 器件仿真

athena – Athena 工艺仿真

这些模块的 API 设计尚未定型,当前请勿尝试导入或调用。

Current listing version

0.1.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 面向半导体仿真工程师,解决 TCAD 脚本生成的高频刚需任务
  • 显著提升 Sentaurus 和 SILVACO 脚本编写效率
  • 提供专业领域的声明式 API,降低脚本编写复杂度
Trigger Precision95/100

Highlights

  • 触发词精准完整,明确描述 Skill 功能和适用场景
  • 边界清晰,覆盖多种使用变体
  • description 位置正确,内容完整无截断
Structure and Standards90/100

Highlights

  • 文档结构清晰,包含概述、使用模式、模块参考、最佳实践等完整章节
  • 提供详细的代码示例和使用说明
  • frontmatter 完整,单文件长度合理
Execution Reliability88/100

Highlights

  • 工具来源明确,参数说明清晰
  • 覆盖主要异常处理和使用建议
  • 不可逆操作有明确说明和最佳实践指导
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Save or modify files

    Confirm the output directory and whether existing files will be replaced. Back up important files and prefer a new output directory.

    Mentioned in main document · lines 46

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.