kicad-developers team mailing list archive
Mailing list archive
Spice Netlist Modification
Thu, 25 May 2006 00:58:33 -0000
DomainKeys? See http://antispam.yahoo.com/domainkeys
I am a new user of Kicad and so far I have been very impressed. Good
job to Jean-Pierre for a nice package.
After trying the Spice netlist option, I was left wishing there were
some more options in building the spice line for each component. As
it stands now, the spice line is basically REFDES <nodes> VALUE.
This has some limitations when you want to add more to the spice
line and not change the VALUE displayed in the schematic.
For example, if I had a transistor that had a VALUE of 2N2222, the
spice line would display as follows: Q1 1 2 3 2N2222. This would be
fine if my model name was the same as the VALUE. If the model name
was something like QMOD_2N2222, this wouldn't work.
Another example would be the case of adding a model to a passive
component like a resistor. To do this in Spice you need to add the
model name after the resistance value. A 10K resistor would display
as follows: R1 1 2 10K. To add the model it would need to be: R1 1 2
Although I am not a software coder, I made an attempt to fix this
using some of the additional fields available for the components. My
suggestion is to add a couple of Spice value fields that the user
can populate and they will only display in the spice netlist. I set
up FIELD7 to be used to completely replace the VALUE in the spice
netlist. I used FIELD8 to add additonal text after the VALUE on the
same line. If both fields are empty, the netlist will default to the
I made changes to NETFORM.CPP which I will rename as NETFORM_A.CPP
and post in the files section. The function I modified is called
WriteNetListPspice. If anyone else thinks this is a good idea maybe
it could be added to the program. Since I am not very good with
software, maybe someone could clean this up and make it better.