I'm trying to figure out how analog data coming from a device with more
than one probe should be arranged. I wasn't able to find any
documentation on this. Since this isn't written in stone (yet!) I want
to bring up for some chatter.

I can imagine two way to organize the data:
i) Interleaved (P1[0],P2[0],P3[0],P1[1],P2[1],P3[1], etc) --- Array of
structures like
ii) Sequential (P1[0],P1[1],P1[2],...,P2[0],P2[1], etc) --- Structure of
arrays like

Hantek-DSO seems to use the interleaved approach.

I think that from a technical point of view, working with a sequential
arrangement is easier. Why?
Memory access is much more linear. It's very easy to get data out of the
array

source = &analog->data[probe_num * num_samples];
memcpy ( probe_data, source, num_samples*sizeof(float) );

Whereas with the interleaved arrangement it takes a more complicated
double for loop. either the read is linear, or the writes are linear,
but not both.

Personally, I think the advantages of method (ii) are worth a second
look. I'd like to know what your thoughts are.

Alex

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to