SimulationSPICE circuit simulationFreeNewv1.0.0
SPICE 前置检查与蒙特卡洛
网表分析指令唯一性、单位后缀与 MHz 归一、DC 点数校核;agauss 蒙特卡洛采样与良率统计(确定性种子);附编辑器内 ngspice 桥接流程。
Installs: 0Rating: –Updated:
Claude CodeCursorCodexGemini CLI+2
Badges only claim the demo-run passed on that host; cross-host installation is handled by the adapter layer.
Preview gallery
Preflight this SPICE netlist and run 200 Monte Carlo trials: report directive issues, sampling stats and yield.
Content matches the files inside the package; extracted by the publish pipeline.
LCEDA 仿真与布线桥接
离线可执行部分:SPICE 网表预检 + 蒙特卡洛容差统计。编辑器绑定部分 (ngspice WASM 调用、jspcb 自动布线)见 references/procedures.md。
运行
node scripts/demo.mjs --out-dir <dir> [--input <json>]
stdout 即 edaskills.report.v1 报告;产物 sim-preflight.json、
mc-stats.csv。
输入
{
"netlists": [{ "name": "rc.cir", "text": "* rc\nV1 in 0 5\n..." }],
"monteCarlo": [{ "name": "R1", "nom": 10000, "tol": 0.01,
"n": 200, "seed": 42, "lo": 9700, "hi": 10300 }]
}
规则(与源扩展核对)
- 分析指令
.tran/.ac/.dc必须恰好一条;缺失/多条 = error;仅.op= warning。 - SPICE 后缀 t/g/k/m/u/n/p/f,
meg=1e6(m≠meg);尾随字母忽略 (10uF → 10µ)。 .ac … NMHz归一为NMeg(ngspice 不认 MHz)。- DC 点数 = floor((stop−start)/step + 1e-9) + 1;step≤0 = error。
- 缺
.end= warning。 - 蒙特卡洛:agauss(nom, nomtol, 3) 语义 = nom + (nomtol/3)·z; seed 限 1…2147483646(越界钳制并 warning);n<30 warning; 统计 mean/σ(总体)/median/yield(lo…hi 命中率)。 离线 PRNG 为 mulberry32+Box-Muller,与 ngspice 内部实现不同, 数值分布等价、逐点序列不等价(PROVENANCE 已注明)。
导出函数
parseSpiceValue findAnalysisDirectives checkNetlist
monteCarlo stats
Dependencies
No dependencies
This skill works standalone.
Demo run
Passed with warnings0 errors · 1 warnings
node v24.19.0 · 2026/11/19
- [info] AC_MHZ_NORMALIZED (rf-ac.cir): rf-ac.cir: .ac MHz rewritten to Meg for ngspice
- [info] DC_POINTS (bias-dc.cir): bias-dc.cir: DC sweep has 11 points
- [warning] NO_END (bias-dc.cir): bias-dc.cir: missing .end statement
FAQ
Ratings & reviews
Not rated0 ratings
5 star
0
4 star
0
3 star
0
2 star
0
1 star
0
Sign in to rate this skill.
Sign inVersions
- v1.0.0Latest45.4 KB
首发种子版本。
Related skills
No related skills
Skills with the same output type and use case will appear here.