Hello all,
I’m trying to import the Spice model for an FQP27P06 MOSFET, but it fails to load due to the phrase: “…FQP27P06.lib:8:51: expected”. I’ve attached a screenshot and also the model file. Might “8:51” refer to a line number in the file containing the error, or possibly an error code?
It refers to line 8 character 51. The kicad parser has trouble with the formula there. I think you can fix that by factoring out the formula and replacing the curly braces. I had to do something like that before so kicad would swallow the model:
Please double check what I calculated there, this is very rough. If you don’t care about the temperature, you can also set that to a fixed temperature and just calculate the values for VTO and KP and BV. Maybe someone who understands more about the model can give you some more insides. I believe this might be entirely a KiCad problem and not have anything to do with ngspice. KiCad parses the model on its side when assigning a model. Maybe I will try tomorrow if ngspice would handle this model without modification, but it is getting kind of late here …
Nested curly braces are rejected by KiCad/Eeschema. ngspice should have no problems with these. Some time ago I have made an update to ngspice to replace the inner curly braces by round brackets (automatically during parsing the model file).
I checked this with ngspice earlier and ngspice handles the model gracefully (if pspice compatibility is set with set ngbehavior=ltps ). I am kind of wondering why KiCad needs to parse the spice model to the extend that it does.