¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: SPICE parameter sequence issue (workaround)


 

Hello Tony,

I guess the best way of doing it within the framework of generic SPICE commands is to create an include file that simply remaps the parameter arguments.

Example this works:

STEP1: REMAP
*-------------------------------REMAP of PARAMETER ORDER SNIPPET----
.SUBCKT LT1086-5_KICAD GND IN OUT
X1 GND OUT IN LT1086-5
.ENDS
*-------------------------------------------------------------------

STEP2: Use remapping reference name within the schematic capture name.

STEP3: Include remapping file as a .include command within the schematics going forward. Example .include "myRemaps.cir".

I am wondering if we should somehow create a universal master "FixupFile" to include that all Kicad users constantly refine.

One thing that caught my attention with LTSPICE is that you can have a file for library included in your netlist. This file does not have to be stored locally it can exist on a HTTP server. LTSPICE will automatically fetch it for the simulation. So its possible to have this fixup file on the Kicad website for everyone. This would then allow everyone to get the most updated fix-ups.

I like SPICE sequence order attribute. It should not take the team long to impliment this generic feature. I just looked at the PSpice netlister code for Kicad I think I can add the necessary attribute/hack. Possibly for now just pull the correct parameter sequence from one of the generic part property attributes that each user is free to add.

--- In kicad-users@..., "Tony Casey" <tony@...> wrote:



--- In kicad-users@..., "Charles" <cmcdowell_home@> wrote:


I am having trouble with simulating a 5V regulator using LTSPICE. The problem is LTSPICE and KICAD SPICE netlister don't always agree how the sub-circuit calling parameters should be sequentially listed.

To my surprise LTSPICE requires the calling parameters to have the correct sequential order, not just correct names! Seems flawed I know.

Anyone have a workaround other than tweaking the netlist manually? I would like the ability to force parameter sequence in KICAD possibly through component properties.
Hello Charles,

There is no flaw in LTspice - all SPICE3-compatible programs treat only the netlist order as important; the pin names are irrelevant to a SPICE parser.

The problem is not a new one, and applies to many EDA suites, and is why often there are two sets of schematic symbols provided: one geared intended for PCB netlisting with focus on pin numbers and the other for simulation.

The neatest solution would be for KiCAD schematic symbols to have a separate SPICENETLISTORDER attribute that the netlister used instead, when generating a SPICE netlist.

Regards,
Tony

Join [email protected] to automatically receive all group messages.