DSPRelated.com
Forums

DSP for design verification

Started by iblackford 5 years ago2 replieslatest reply 5 years ago162 views

I'm sorry if this has been answered before, I did do some preliminary searching already. 

I'm looking to automate some design verification steps, and I'm curious if I can use a DSP algorithm on some waveforms in order to determine design margin. 

I'd like to start with something low-speed and simple, I2C. I *think* I can convolve the I2C signal with something in order to get some metrics from it (rise time, fall time, etc)

Is this possible? If so, what things would I look into to begin my journey? I'd like to process the signal in python. My DSP experience is limited to what I learned in university, so please be patient. :)

Thanks, Ivan


[ - ]
Reply by bholzmayerAugust 14, 2019

Hi Ivan,

maybe it's not what you expect or what is in your interest, but if I'd be interested in rise/fall times or level uncertainties, I'd not try to solve such issues in the digital realm.

My approach would be to use an oscilloscope. Most of these instruments have the capability to sample signals with long or infinite persistence.

Combined with the right trigger, a sort of eye diagram would provide your metrics.
(Maybe you could use python to retrieve the information from the oscilloscope via USB or ethernet link, and further evaluate the measurement results).

--

To answer your question if such measurements are possible only in "software",
it's necessary that you provide information on how you intend to measure the signal.

I2C has low clock speed (starting with 100kbit/s), but if it comes to rise/fall times, you must be aware that you talk about narrower edges in the frequency area of more than 1 MHz. Only if you are able to sample the I2C stream with a higher data rate, you could tell something about these values.
So how do you sample (or measure) the I2C-signals? With which resolution (amplitude,time)? Can you trigger the measurements (means synchronize to the start pulse)?

I'm sure, if you can provide more information about your analog / hardware scenario, there's somebody who can give you some ideas.

My proposal is: find a good oscilloscope and learn about things like sample rate issues, signal integrity, precision and reliability of its results.

If an oscilloscope seems to be not affordable, think of one of the low budget oscilloscope frontends for a PC.

If you want to do the first steps with software only, start with the following:


* extend your python with scipy and matplotlib.

* code a i2c-generator randomizing the rise/fall-timings

* code a receiver for the generated signal and
evaluate it (scipy provides enough functionality for the statistics, matplotlib will provide what you need for neat graphics)

* if this works, you might somehow make a similar receiver for the real data; and you can evaluate the real data with the same process.

Have fun ;-))

Bernhard



[ - ]
Reply by iblackfordAugust 14, 2019

I think there is some misunderstanding. I do intend to use a scope for this, that is how I will get the waveform data. 

I'm looking to ultimately create a script where I can load in a waveform, and the result will be a plotted output showing my timing margins for rise, fall, setup, hold, etc. 

I'm not sure if DSP is even a tool to use for this, I just thought it would be an interesting place to start. I understand I'll have to massage the data before and after DSP. 

Thanks, Ivan