.include keyword in LVS reference SPICE netlist

Hi all,
I want to use SPICE netlist with ".include" keyword as LVS reference schematics.
At present, Klayout do not support reading such netlist, right?
Then, I use simple pre script to modify SPICE netlist by replace (insert)
contents of the file at ".include" position.

Can anyone show the script to realize such procedure in Klayout LVS script?.
Should I may request as enhancement of input SPICE format ?


*Original LVS schematics *
X1 in out VDD VSS INV1
.include "/aaa/bbb/standardcell.cir"
.END


/aaa/bbb/standardcell.cir -> Library netlist for all standard cell sub circuit.


.SUBCKT INV1 in out VDD VSS
Mp out in VDD VDD pch L=1u W=1u
Mn out in VSS VSS nch L=1u W=1u
.ENDS INV1
.SUBCKT INV2 in out VDD VSS
Mp out in VDD VDD pch L=1u W=2u
Mn out in VSS VSS nch L=1u W=2u
.ENDS INV2


Thanks,
haru_f

Comments

  • I know some schematic tools offer options of hierarchical or flat netlist (which would go through and evaluate all of the include-chain). Is this an option for your circuit source?

    I haven't found how to get the flat netlist out of simulators like ngspice, if it's fed a hierarchical one. "Way back when" in FORTRAN based SPICEs there were intermediate files (in my funky backwater foundry, with its in-house SPICE2G6 variant, there was a "M6" file that had everything flat -and- boiled down to floating point numbers, nothing left to text variables).

    Now to my limited understanding, the verification tools are working on hierarchical form which ought to include traversal of .include statements (I'd think). But where that all sits, today, we'd have to wait for the maestro to say.

  • Hi,

    No, ".include" is supported. See for example "testdata/algo/nreader8.cir" from the sources.

    So maybe there is another reason for this to fail?

    Matthias

  • Hi Matthias,

    I apologize for my misunderstanding.
    I could confirm that Klayout LVS support ".include" keyword in
    reference net list.

    I don't know exactly but I may have misunderstood Klayout LVS does not support ".include" due to the following typo for the first trial.
    As .include "./subckt.cir" (placed in the current path.)
    to .include "/subckt.cir" by mistook.

    Thanks,
    haru_f

Sign In or Register to comment.