generate_spice_netlist
Generate PSpice or ngspice compatible netlists from predefined templates or custom DSL, and save them to a specified path for circuit simulation.
Instructions
基于模板 (rc_lowpass / rc_highpass / rlc_bandpass / voltage_divider / diode_rectifier / rc_step_response) 或直接 DSL 生成 PSpice / ngspice 兼容的电路网表,并保存到指定路径。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| template | No | 模板名称,可选: rc_lowpass, rc_highpass, rlc_bandpass, voltage_divider, diode_rectifier, rc_step_response | |
| save_path | No | 保存路径,默认 ./ai_netlist.cir。 | |
| custom_dsl | No | 如果提供,优先使用此自定义 DSL 文本(类 SPICE 语法)。 | |
| parameters | No | 模板参数 (vin, freq, rval, cval, lval, r1, r2, rload, step, tstop)。 |