From: Jim Thompson on
I have a string of data (from an IBIS file), voltage-versus-time, a
100ns string, at 100ps intervals... 1000 data points :-(

I'd like to make this into a PWL source, but reduce data points based
on areas that stay at essentially a constant slope for awhile.

I can do this by hand, _tediously_ :-(

Anyone know of some kind of algorithm that automates, or at least
eases the pain?

Thanks!

...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
From: krw on
On Wed, 28 Apr 2010 17:03:06 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon(a)On-My-Web-Site.com> wrote:

>I have a string of data (from an IBIS file), voltage-versus-time, a
>100ns string, at 100ps intervals... 1000 data points :-(
>
>I'd like to make this into a PWL source, but reduce data points based
>on areas that stay at essentially a constant slope for awhile.
>
>I can do this by hand, _tediously_ :-(
>
>Anyone know of some kind of algorithm that automates, or at least
>eases the pain?

It's not automatic, by any means, but I generally use spreadsheets for this
sort of work. I'd do something like copy the value to a column based on a
filter (>x% of above or below value, for instance), then use sorts (on the
value, then again on time to restore time order) to get the spaces (zeros)
out.
Then again to do the necessary formatting.
From: miso on
On Apr 28, 5:03 pm, Jim Thompson <To-Email-Use-The-Envelope-I...(a)On-My-
Web-Site.com> wrote:
> I have a string of data (from an IBIS file), voltage-versus-time, a
> 100ns string, at 100ps intervals... 1000 data points :-(
>
> I'd like to make this into a PWL source, but reduce data points based
> on areas that stay at essentially a constant slope for awhile.
>
> I can do this by hand, _tediously_ :-(
>
> Anyone know of some kind of algorithm that automates, or at least
> eases the pain?
>
> Thanks!
>
>                                         ...Jim Thompson
> --
> | James E.Thompson, CTO                            |    mens     |
> | Analog Innovations, Inc.                         |     et      |
> | Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
> | Phoenix, Arizona  85048    Skype: Contacts Only  |             |
> | Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
> | E-mail Icon athttp://www.analog-innovations.com|    1962     |
>
> I love to cook with wine.     Sometimes I even put it in the food.

I'm pretty sure I've done PWL input greater than 1000 points in spice.
I would just take the raw data and write a simple C or Perl program
and convert the raw data to the spice PWL format. I've done this with
SOX data. It is way less than a page of code.

Otherwise, you need to fit the curve fit the data to do reduction, and
it really is way too much work.
From: mpm on
On Apr 28, 7:03 pm, Jim Thompson <To-Email-Use-The-Envelope-I...(a)On-My-
Web-Site.com> wrote:
> I have a string of data (from an IBIS file), voltage-versus-time, a
> 100ns string, at 100ps intervals... 1000 data points :-(
>
> I'd like to make this into a PWL source, but reduce data points based
> on areas that stay at essentially a constant slope for awhile.
>
> I can do this by hand, _tediously_ :-(
>
> Anyone know of some kind of algorithm that automates, or at least
> eases the pain?
>
> Thanks!
>
>                                         ...Jim Thompson
> --
> | James E.Thompson, CTO                            |    mens     |
> | Analog Innovations, Inc.                         |     et      |
> | Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
> | Phoenix, Arizona  85048    Skype: Contacts Only  |             |
> | Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
> | E-mail Icon athttp://www.analog-innovations.com|    1962     |
>
> I love to cook with wine.     Sometimes I even put it in the food.

My suggestion -
Microsoft Excel running a VBA script.
You can stack the time and values in formatted strings and output as
*.txt.
Do inline testing on the slope before committing the write (per
record).
When done, close the file. Then cut & paste into Spice.

I suppose you could also do this with an Excel keystroke macro, but
the VB editor is the way to go.
Google "Mr. Excel" if you get stuck on any of the VBA syntax, etc...
The beauty is once you have it, you can re-use it forever.
From: Martin Brown on
Jim Thompson wrote:
> I have a string of data (from an IBIS file), voltage-versus-time, a
> 100ns string, at 100ps intervals... 1000 data points :-(
>
> I'd like to make this into a PWL source, but reduce data points based
> on areas that stay at essentially a constant slope for awhile.
>
> I can do this by hand, _tediously_ :-(
>
> Anyone know of some kind of algorithm that automates, or at least
> eases the pain?

Excel is very good for mocking up test data and simple processing of raw
data into a more convenient form. You can program macros in a dialect of
basic VBA to do fairly complex algorithms.

It is reasonably catholic about accepting CSV files and then you may
need to adjust your output format to match PWL expectations.

PS If you want to saty sane use XL2003 the macro recorder works in that
and eralier versions. XL2007 is still hopelessly broken.

Regards,
Martin Brown