netgen icon indicating copy to clipboard operation
netgen copied to clipboard

Documentation for Comparing SPICE Netlists

Open thejackal360 opened this issue 3 years ago • 1 comments

From my understanding, netgen is supposed to be able to diff two SPICE netlists. The documentation is a bit unclear on how to do this.

For instance, netlist 0 is...

V1 1 0 1 R1 1 0 1

Netlist 1 is...

V1 1 0 1 R1 1 0 1 R2 1 0 1

I'm trying to get netgen to tell me, "Sorry, these are different netlists." Then when I remove "R2 1 0 1" from netlist 1, it should tell me that they're the same. It seems like this should be one command line call, no?

thejackal360 avatar Jan 10 '22 19:01 thejackal360

Assuming that you name one of the netlists a.spice and the other b.spice, then netgen -batch lvs a.spice b.spice should work. Be aware: Netgen will treat the two resistors in the second netlist as two resistances in parallel, and so it will come to the conclusion that the circuits match topologically, but that they differ by property value (one resistor is 1 ohm, and the two resistors in parallel are 0.5 ohm). To prohibit that would require a setup file that tells netgen that resistors should not be combined in parallel, but it's doable.

RTimothyEdwards avatar Jan 11 '22 03:01 RTimothyEdwards