본문으로 건너뛰기
cccskills
무료GitHub에 공개

sim

Circuit simulation and pre-fabrication validation. Trigger on: "simulate", "run simulation", "spice", "check stability", "ripple analysis", "phase margin", "power supply simulation", "AC analysis", "transient analysis". Includes automated SPICE simulation via ngspice, RF chain analysis (scikit-rf), power/clock analysis (PyLTSpice), and PCB EM (openEMS FDTD). Run before ordering to validate performance before spending on prototypes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Auto-Detection

Before running simulations, discover existing projects in the current directory:

python -m circuit_weaver discover --json

If projects are found, select the target project automatically (most recently modified, or ask the user if multiple exist). Use the project's design.yaml and any existing SPICE models in spice_models/ directory.


Quick Start (Automated)

Run automated simulations on any Circuit Weaver design:

# Run all simulations (power, signal, thermal)
python -m circuit_weaver simulate design.yaml -o ./sims

# Run only power supply simulations
python -m circuit_weaver simulate design.yaml -o ./sims --type power

# Fetch SPICE models first, then simulate
python -m circuit_weaver fetch-spice design.yaml
python -m circuit_weaver simulate design.yaml -o ./sims --model-dir ./spice_models

# JSON output for programmatic use
python -m circuit_weaver simulate design.yaml -o ./sims --json

The simulator auto-detects power regulators, filters, and op-amps from the design spec and generates appropriate SPICE netlists + analysis cards.


Three-Layer Stack (Advanced / Manual)

Layer 1 -- RF Chain (scikit-rf)

Cascades S2P files (filters, LNAs, mixers, PCB traces) to compute end-to-end insertion loss, return loss, and noise figure across the signal chain.

import skrf as rf

bpf   = rf.Network("sims/rf/filters/bpf_2450.s2p")
lna   = rf.Network("sims/rf/lna/lna.s2p")
trace = rf.Network("sims/rf/traces/microstrip_50ohm_5mm.s2p")

chain = bpf ** lna ** trace
print(f"IL @ 2.45 GHz: {-chain.s21.db[freq_idx]:.1f} dB")
print(f"NF: {chain.nf(T=290)[freq_idx]:.2f} dB")

S2P sources (priority order):

  1. Vendor-measured data (request from manufacturer -- best)
  2. Datasheet typical curves extracted with WebPlotDigitizer
  3. Synthetic models (document clearly -- mark as unvalidated)

Simulation targets (fill in per project):

Signal pathTargetResult
RX insertion loss< X dBTBD
TX insertion loss< Y dBTBD
Noise figure< Z dBTBD

Layer 2 -- Power / Clock (LTspice / PyLTSpice)

Transient and AC analysis of power supply circuits and clock distribution. Validates regulator stability, output ripple, PDN impedance, and load response.

from PyLTSpice import LTspice

lt = LTspice("sims/power/buck_3v3.asc")
lt.run()
vout = lt.get_trace("V(vout)")
ripple_mv = (vout.max() - vout.min()) * 1000
print(f"Output ripple: {ripple_mv:.1f} mV")

Subcircuits to simulate (fill in per project):

SubcircuitAnalysis typeKey metric
Buck converterTransient + ACRipple < X mV, phase margin > 45 deg
LDOTransientDropout headroom, PSRR
Crystal oscillatorTransientStartup time, frequency accuracy
PDN impedanceACZ < X mohm at operating frequency

SPICE model sources:

  • Manufacturer SPICE models (from product page -- preferred)
  • IBIS models for digital ICs (use ibis2spice if needed)
  • LTspice built-in library for generic models

Layer 3 -- PCB EM (openEMS FDTD)

Full-wave electromagnetic simulation for antenna performance, via transitions, edge coupling, and shielding effectiveness. Most expensive -- run selectively.

Run Layer 3 for:

  • On-board antennas (patch, meandered monopole, chip antenna matching)
  • Via transitions on high-speed interfaces (> 5 Gbps)
  • Near-field coupling characterization between modules
  • Shielding can effectiveness

Skip Layer 3 for:

  • Standard passive components
  • Well-characterized reference designs validated by manufacturer
# openEMS requires platform binary + Python bindings
# See: https://openems.de/start/
python3 sims/em/antenna/run_sim.py

Directory Structure

sims/
  rf/         -- scikit-rf scripts + S2P files
  power/      -- LTspice .asc schematics + PyLTSpice runner scripts
  em/         -- openEMS geometry definitions + run scripts
  results/    -- output plots and summary JSONs (add to .gitignore if large)

Pre-Fab Simulation Checklist

  • Layer 1: All RF paths passing insertion loss targets
  • Layer 1: Noise figure budget within sensitivity requirement
  • Layer 2: All regulators stable (phase margin > 45 deg)
  • Layer 2: Output ripple < specification on all rails
  • Layer 2: PDN impedance < target at operating frequency
  • Layer 3: Antenna efficiency > target (if on-board antenna)
  • Layer 3: Via transitions characterized for high-speed interfaces

Requirements

pip install scikit-rf PyLTSpice
# openEMS: see https://openems.de/start/ for platform-specific install

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

autoroute

무료

Route non-critical nets on a real KiCad PCB or Specctra DSN through Circuit Weaver's fail-closed Freerouting integration. Use after placement and net-class setup when the user requests autorouting, a validated SES session, routing diagnostics, or post-route cleanup. Keep critical power, RF, clock, crystal, switching, and differential nets manual.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

mattpainter701/kicad_automations212026년 10월 20일 업데이트

bom

무료

Manage an electronics bill of materials across distributors and fabricators: part selection, stock, pricing, alternates, ordering, KiCad properties, and BOM/CPL export. Use for distributor-neutral sourcing, cost comparison, order preparation, or requests such as "what parts do I need" and "export for JLCPCB". Do not take over schematic analysis or a complete new-design workflow unless the requested task is specifically its sourcing/manufacturing stage.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

mattpainter701/kicad_automations212026년 10월 20일 업데이트

bom

무료

BOM management, sourcing, pricing, export, and fabrication preparation. Load the canonical Circuit Weaver skill from `skills/bom/SKILL.md`.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

mattpainter701/kicad_automations212026년 10월 20일 업데이트

Create, import, analyze, resume, or revise an end-to-end Circuit Weaver electronic design from requirements through validated functional KiCad schematics, placement review, and a truthful manufacturing handoff. Use for new designs and for existing KiCad/PCB/Gerber projects that need durable state. Use kicad for one-off file inspection, bom for standalone sourcing, and design-wizard only when the user explicitly requests the slower questionnaire.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

mattpainter701/kicad_automations212026년 10월 20일 업데이트

Create, import, analyze, or resume an end-to-end Circuit Weaver electronic design with durable project state. Load the canonical workflow from skills/circuit-weaver/SKILL.md. Use kicad for one-off file inspection, bom for sourcing, and design-wizard only when explicitly requested.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

mattpainter701/kicad_automations212026년 10월 20일 업데이트

Use only for an explicitly requested step-by-step Circuit Weaver questionnaire. Load the canonical workflow from skills/design-wizard/SKILL.md; use circuit-weaver for ordinary automatic new-design requests.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

mattpainter701/kicad_automations212026년 10월 20일 업데이트

mattpainter701의 스킬 모두 보기

이 스킬의 문제 신고