Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to tell KiCad to generate netlist in spice format

Status
Not open for further replies.

Pushpkant

Member level 1
Joined
May 17, 2014
Messages
39
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Location
India
Activity points
451
I am new to eeschema and I want to generate netlist which is recognized by ngspice.

When I generate netlist from KiCad, kicad is always shows net number starting from 1. But ngspice needs a net 0 to simulate.

I have tried to add zero from SPICE library but it is the same.

KiCad I am using is 4.0.7

There is one comment in netlist as

* To reorder the component spice node sequence add [Spice_Node_Sequence] user FIELD and define sequence: 2,1,0

I don't know what does it means. But It indicates that node name cane be changed in somewhere in KiCad. I am attaching a netlist of simple Resistor network which is generated by KiCad.

*****************************************************************************************************************

* /home/pushpkant/ki/network1/network1.cir

* EESchema Netlist Version 1.1 (Spice format) creation date: Fri Feb 16 19:05:05 2018

* To exclude a component from the Spice Netlist add [Spice_Netlist_Enabled] user FIELD set to: N
* To reorder the component spice node sequence add [Spice_Node_Sequence] user FIELD and define sequence: 2,1,0

* Sheet Name: /
R3 3 4 10
R1 1 4 10
R2 3 1 100
R4 2 3 100
R5 2 4 10
V1 1 4 DC 5V

.end

********************************************************************************************************************

Here the lowest node is number one, but ngspice need node to be start from 0.
How to tell KiCad to start node number from zero, where zero from SPICE library is connected ?
 

I use the Linux version 4.07 so I can't help if it's different to the other OS versions.

From the schematic, click on the "NET" icon and it should present several options, select "Spice" then try it with "Default format" checked and unchecked to see if that works. If it doesn't, you should be able to enter the ngspice command line in the "Simulator Command" field then click "Run Simulator". I haven't tried it but it's worth a go.

Brian.
 

Hello Brian,

Thank for reply.
I am using Linux 4.13 version.
I have tried all the options available in the spice tab of netlist generator. Nothing is happening.
I have also put the simulator name there but still didn't and clicked the run simulator but the simulator is somehow is not running.
The eechema always generate the netlist with node starting with 1 but not with zero.

Pushpkant
 

I can't really help you then but there are examples on the Internet if you search for "Kicad Spice".
Node 0 is usually the ground, is it possible you have not correctly labeled it on the schematic and the net list is just assuming there isn't one?

Brian.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top