<@U01SBMJT5BP> Do you support python interface for...
# xyce
a
@User Do you support python interface for sweeps and results in numpy?
e
There is a python interface you can use to call Xyce. It is basically just the Xyce “C” interface, with a python wrapper. You can see some stuff about it in the Xyce source tree under Xyce/utils/XyceCInterface.
I should mention, I’m not sure it is developed enough to do sweeps conveniently.
But if it isn’t we should work on that …
a
Just to give you some hint what we do
We automate Analog design
e
There is also a much newer python interface for plugging models written in python into Xyce. That is a separate effort that we call the “PythonModelInterface”
Got it.
a
One the steps that we do, is to run massive DC simulation to characterize the transistors at different sizes and voltages
We do that by DC sweep and parameter sweep
e
If you want to do sweeps over lots of parameters, you might find the “DATA” specification useful.
a
Thanks for the insight
I’ll give it a try.
e
That allows you to specify a table of values. Each row of the table is a different sweep point.
Also, you can “nest” sweeps via .STEP and .DC
a
Oh
Nice
The first one is nicer
e
If using DATA, then you can change multiple things at once. Each column is for a different parameters (or DC value, potentially).
It mimics the Hspice DATA statement.
a
Could I pass this DATA as a csv file?
e
Currently I don’t think it can take a csv file for input. But we might be able to add that.
V1 1 0 PAT (5 0 0n 1n 2n 5n b1010 R=0)
R1 1 0 1
.STEP data=test
.DATA test
+ V1:VHI V1:VLO V1:TD   V1:TR  V1:TF  V1:TSAMPLE
+    5      1    0       1ns    2ns    5ns
+    6      2    5ns     2ns    1ns   10ns
.ENDDATA
.TRAN 0 50n
.OPTIONS OUTPUT INITIAL_INTERVAL=0.5n
.PRINT TRAN V(1)
.END
That is a simple example from our test suite. .STEP is the command that tells Xyce to execute a sweep around whatever the analysis is. It refers to a table named “test”.
a
@Eric Keiter thanks for sharing this..
The problem is that we sweep about 1Million iterations. I don't think it's easy to write that down in the spice netlist like this.
1 Million iterations in a single run.
e
Ah. That is a lot 🙂
how many different parameters?
a
Ngspice do them in about 4h for a single transistor on 4 cores machine i9.
Compiled with openmpi
And all proper switches to make it use the right SSE and other good processor features.
W, L , Ldiff, Vgs, Vds, Vbs, NF, Temp, Corners
And we measure
gm, Vth, Cgs, Cgd, Cgg, Cdd, ro, Vdsat
I'll try to reproduce that setup in Xyce and keep you posted.
👍 1