← Back to team overview

kicad-developers team mailing list archive

Re: Spice netlist with netnumbers

 

Hello Oscad team,

> We wanted netlist with netnumbers to simulate the circuit using Ngspice.
> Ngspice is not able to recognize the netlist with netnames.

I don't believe that is the case.  Ngspice allows arbitrary
identifiers for node names.  For example, this subckt runs fine
under the current ngspice release:

    *********************************************
    * transmission line model with skin loss

    .subckt skinline in 0 out 0 z0=50 length=1 rdc=1 lint=1n
    * hybrid sections at each end
    x1 in x1in x1out x1eqout x1eqin thyb
    x2 out x2in x2out x2eqout x2eqin thyb

    * equalization circuits
    x3 x1eqout x1eqin 0 skin6 length={length} rdc={rdc} lint={lint}
    x4 x2eqout x2eqin 0 skin6 length={length} rdc={rdc} lint={lint}

    * ballistic delay modelling
    t1 x1out 0 x2in 0 td={length*lint/z0} Z0={z0}
    t2 x2out 0 x1in 0 td={length*lint/z0} Z0={z0}
    .ends skinline
    *********************************************

Notice the use of names like "x1equout" and "x2in" to make it easy to
post process the nodes without using a graphical system. 

I expect that the Oscad backend has some kind of historical limitation
to use integers for net names.  This is not a limitation with Ngspice. 

I suggest that kicad use the node names that the user gives them.
Any unnamed nets can be arbitrarily assigned sequential names
like "node99" or just "99".  Please do not override the explicit
names given in the schematic.

If the Oscad tools do not currently accept arbitrary ASCII strings for
node names, this should be fixed with a high priority.  If the Oscad
internal bookkeeping requires integers for node numbers, then what is
needed is a simple symbol table to convert each incoming identifier to
an internal node number. 

It will be very awkward if the end user cannot use symbolic node
names.  This would break just about every modern tool flow that I know
of. 

kind regards,
--
Rick Walker




Follow ups

References