Problem displaying eye plot

29 views
Skip to first unread message

Andrea D`Amore

unread,
Jun 22, 2014, 4:32:12 AM6/22/14
to electr...@googlegroups.com
Hello,
I'm using Electric 9.04 on OS X 10.9.3 and ngspice 26 as engine. I'm able to write spice deck and have Electric probe the raw output file, so far so good, but I'm not able to get an eye plot in the waveform window.

If I run a DC analysis on an inverter sweeping Vin from 0 to 5V with 1mV steps I get a time-based plot with a very wide scale, up to 5ks in this case. A quick inspection to at RawSpiceOut.java confirmed that Electric uses the row number as time variable for analysis that doesn't have a time value. See attached figure 01.

Dragging vin or v-sweep (they are the same in this analysis) produces an empty plot, see attached figure 02.

Panning the plot a bit to the right shows a vertical line close to the 0, see attached figure 03.

This could be the [0, 5] range on a 5k scale but adjusting the horizontal scale to [0, 5] doesn't help at all and the plot is still black. See attached figure 04.

Panning again the plot revelas a much smaller presence of data, vin near vertical 0 and vout near vertical 5V, see attached figure 05.

Zooming near the vout data and displaying just vertex point reveals there are only two points in the dataset. As you can see in figure 06 their distance is 1e-3 so the correct step in vin domain.

Where are the other data points?
What's the correct way to have an eye plot in Electric?
Can someone reproduce the issue?
Can someone provide an example of a working eye plot in Electric?




Regards

-- 
Andrea
figure_01.png
figure_06.png
figure_05.png
figure_03.png
figure_02.png
figure_04.png

Andrea D`Amore

unread,
Jun 23, 2014, 2:51:26 PM6/23/14
to electr...@googlegroups.com
I'm attaching a short example of the file with which I'm having issues.

To reproduce:
  load the jelib
  open the single cell in the lib
  select Tools > Simulation (Spice) > Write Spice Deck…
  in the waveform window drag v(out) into a panel and drag v(in) onto the time axis

I'm curious if someone else can reproduce, this shouldn't be engine-dependent.

-- 
Andrea
inverter_pseudo-NMOS.jelib

Jack Jost

unread,
Jun 24, 2014, 4:35:09 AM6/24/14
to electr...@googlegroups.com
I can confirm that the data points of the transient simulation are not visible if DC simulation is preceding TRAN (electric only, command line spice using the same .spi file is fine).
Disabling DC simulation or putting DC and TRAN in two separate files allows me to plot both datasets (maybe x/y axis range is not reset properly when switching between DC and TRAN plot?).

- J

Andrea D`Amore

unread,
Jun 24, 2014, 12:40:48 PM6/24/14
to electr...@googlegroups.com
On Tuesday, June 24, 2014 10:35:09 AM UTC+2, Jack Jost wrote:
I can confirm that the data points of the transient simulation are not visible if DC simulation is preceding TRAN (electric only, command line spice using the same .spi file is fine).

I don't have that issue, I can simulate and display both DC and TRAN analysis within the same SPICE snippet in Electric. See the attached screenshot and notice the two time scales, the TRAN data are in picoseconds as expected, what's wrong is the "time" domain for a static characteristic.

Disabling DC simulation or putting DC and TRAN in two separate files allows me to plot both datasets (maybe x/y axis range is not reset properly when switching between DC and TRAN plot?).

I'm not sure how you switch between DC and TRAN plot. I unlock the panels so each one has its own x-axis, I clear the existing signals in a panel, add those I want and then zoom to content with Windows > Fill Window.

For those willing to try with ngspice add the following lines before the .save command in the SPICE code block:
  .control
  set filetype=ascii
  .endc

so the output is forced to ASCII even if you don't have a ~/.spiceinit file with that directive.

-- 
Andrea
Screenshot 2014-06-24 18.33.43.png

Jack Jost

unread,
Jun 25, 2014, 4:29:26 AM6/25/14
to electr...@googlegroups.com
If you can plot transient datasets, then it comes down to generate the eye plot dataset in your spice code. As far I know several approaches are possible:

 * Performing a Monte-Carlo simulation as described in section 22.5 of the ngspice-26 manual. Use uniform/gaussian or similar noise sources for all uncertain timing and voltage parameters so that the parameter distribution statistics match your assumptions inside the eye repetition window.
 * Using one long transient simulation and cut the "eye window" segments using nutmeg formula evaluation when specifying the save or plot command.
 * Generating multiple plots with delayed/varied voltage source (as described for HSPICE in the tutorial in http://gram.eng.uci.edu/faculty/green/public/courses/270c/homework/eye_generation.pdf; the same approach should work with slightly modified syntax in generic SPICE simulators).

Hope this helps,
- J

Andrea D`Amore

unread,
Jun 25, 2014, 8:09:51 AM6/25/14
to electr...@googlegroups.com
On Wednesday, June 25, 2014 10:29:26 AM UTC+2, Jack Jost wrote:
If you can plot transient datasets, then it comes down to generate the eye plot dataset in your spice code.

I don't think that's needed, what I'm doing with the DC analysis is exactly the "elegant approach" of the PDF you linked.

The point is I already have the datasets: I have signals A and B, they have the same amount of points and I want to plot B with respect to A, that is with A on x-axis and B on y-axis.

The manual says:
"""
Eye plots 

The horizontal axis does not have to represent time. Any signal can be used in the horizontal axis, simply by dragging that signal onto the horizontal ruler. To restore the horizontal axis to show time, right-click on it and choose "Make the X axis show Time". 
"""
so achieving my goal should be straightforward but I get an odd display instead (only two points out of five thousands in my example).

My question is why this is happening and how should I fix it.


Going through a custom v-source sounds like a workaround here, I want to plot a static characteristic and Electric seems to be able to do so. I'd rather figure why it's behaving in a broken way with my library. 


-- 
Andrea

Jack Jost

unread,
Jun 25, 2014, 8:30:44 AM6/25/14
to electr...@googlegroups.com
For me the axis scale goes out-of-range as soon I either try loading both tran and dc plot, or drag one of the vectors onto the time axis: the scale printed there can be as low as 1e-9 or as high as 1e+3 if the vector is in the 0..5V range.

- J

Andrea D`Amore

unread,
Jun 25, 2014, 9:03:29 AM6/25/14
to electr...@googlegroups.com
On Wednesday, June 25, 2014 2:30:44 PM UTC+2, Jack Jost wrote:
For me the axis scale goes out-of-range as soon I either try loading both tran and dc plot, or drag one of the vectors onto the time axis: the scale printed there can be as low as 1e-9 or as high as 1e+3 if the vector is in the 0..5V range.

It sounds like you're keeping your panels locked in time, use "Toggle Horizontal Panel Lock" or the lock icon in toolbar to unlock them and then use Fill Window or set plot range manually by double clicking on vertical axis.
If you check my second message in this thread there's a single screenshot attached showing two panels with two panels with very different time scales, one is in picoseconds and the other in seconds.

Anyway for the sake of my issue the transient analysis is irrelevant, my issue is with display v(out) vs. v(in) from the DC analysis, you could as well wipe out the .tran from the spice snippet. 

Jack Jost

unread,
Jun 25, 2014, 9:15:15 AM6/25/14
to electr...@googlegroups.com
Same result: as soon the voltage vector is dragged onto the time axis, the axis scale jumps to the 1e+3 range. Sometimes it looks as if the actual plot output is squeezed into a few pixels on the left hand side. I absolutely agree with you that this looks like a bug...
- J


--
You received this message because you are subscribed to a topic in the Google Groups "Electric VLSI Editor" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/electricvlsi/sE3VdDlH5jQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to electricvlsi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steven Rubin

unread,
Jun 25, 2014, 2:01:13 PM6/25/14
to electr...@googlegroups.com
I have looked at this issue. There are definitely bugs in the waveform viewer, which I believe I have fixed. But there are also issues with your data.

You claim that Electric is using the row number instead of a proper value for v(in). But when I look at the .RAW file, I see that the v(in) and v(sweep) values are exactly the same as the row numbers (divided by 1000). They both run from 0 to 5 over the 5000 data points. So doing an Eye plot is no different than simply plotting v(out).

But there were also bugs in Electric that prevented zooming, panning, and displaying of all data points. These bugs are fixed in the source code repository, and will be part of the release of version 9.05 which will be happening in the next week.

   -Steven Rubin
--
You received this message because you are subscribed to the Google Groups "Electric VLSI Editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to electricvlsi...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Content-Type: image/png; name=figure_01.png
Content-Disposition: attachment; filename=figure_01.png
X-Attachment-Id: 506b28fd-ec88-4f75-9fad-271464d9e32c
Content-ID: <506b28fd-ec88-4f75-9fad-271464d9e32c>

Content-Type: image/png; name=figure_06.png
Content-Disposition: attachment; filename=figure_06.png
X-Attachment-Id: ea58947e-2c10-41ba-83e9-35d81ed05e0c
Content-ID: <ea58947e-2c10-41ba-83e9-35d81ed05e0c>

Content-Type: image/png; name=figure_05.png
Content-Disposition: attachment; filename=figure_05.png
X-Attachment-Id: 084f7c6c-aba0-4f1b-a464-e52126605ad7
Content-ID: <084f7c6c-aba0-4f1b-a464-e52126605ad7>

Content-Type: image/png; name=figure_03.png
Content-Disposition: attachment; filename=figure_03.png
X-Attachment-Id: 0f01057b-c64d-4235-8ea6-d96164d600c6
Content-ID: <0f01057b-c64d-4235-8ea6-d96164d600c6>

Content-Type: image/png; name=figure_02.png
Content-Disposition: attachment; filename=figure_02.png
X-Attachment-Id: 30cf93b5-8739-4bb2-8aba-8f4c948d3755
Content-ID: <30cf93b5-8739-4bb2-8aba-8f4c948d3755>

Content-Type: image/png; name=figure_04.png
Content-Disposition: attachment; filename=figure_04.png
X-Attachment-Id: 26a1056a-924d-4fd9-8eb9-e61ff3c696f4
Content-ID: <26a1056a-924d-4fd9-8eb9-e61ff3c696f4>

Andrea D`Amore

unread,
Jun 25, 2014, 2:33:40 PM6/25/14
to electr...@googlegroups.com
On Wednesday, June 25, 2014 8:01:13 PM UTC+2, Steven Rubin wrote:
I have looked at this issue. There are definitely bugs in the waveform viewer, which I believe I have fixed.

Well*.

But there are also issues with your data.
You claim that Electric is using the row number instead of a proper value for v(in). But when I look at the .RAW file, I see that the v(in) and v(sweep) values are exactly the same as the row numbers (divided by 1000). They both run from 0 to 5 over the 5000 data points.

I don't see the issue, that's how ngspice prints out the DC analysis data: since I'm sweeping v(in), v(sweep) and v(in) share the same values.

I kept v(in) as well when using .save since v(in) is a clearer label than v(sweep).
 
 
So doing an Eye plot is no different than simply plotting v(out).

The only difference is that the scale would go up to 5 rather than 5k, and the domain wouldn't be time as it happens when just printing v(out).

But there were also bugs in Electric that prevented zooming, panning, and displaying of all data points. These bugs are fixed in the source code repository, and will be part of the release of version 9.05 which will be happening in the next week

That's great news.
I didn't see any reference of the project at java.net on either staticfreesoft.com and savannah, or I would have filed the issue [1] myself there and saved you some time.


Thanks a lot.


*pun intended


-- 
Andrea
Reply all
Reply to author
Forward
0 new messages