Dangerous Prototypes

Other projects => Open Bench Logic Sniffer => Topic started by: sdixon on May 03, 2010, 07:54:01 pm

Title: Signal sampling issues
Post by: sdixon on May 03, 2010, 07:54:01 pm
I've been trying out my OLS on some simple test cases to learn the software and hardware setup.  I' seeing some sort of strange results which vary with sample speed and sample buffer size. 
For example, I am generating a test signal with a simple Adruino program.  The signal is going low for 20uS every 320uS (and is stable according to a Tek DSO I have access to at the moment).  If I set the sample buffer size to 16K and try different sampling speeds (with no triggering) I get some weird results:
Sampling rate          Measured Period      Duration of low pulse
1kHz                                       322                         20                  exactly correct
10kHz                                     409                        20.8
20kHz                                     205                        10.3
50kHz                                       82                        16.8
100kHz                                     40                        15.2

Much of the time, the trace at 50kHz and 100kHz shows just a continuous high signal.  Given the total sample period at 50kHz, there should be at least one pulse caught but instead it is either zero or multiple with the wrong period between them.  Similarly at 100kHz.  So something strange is going on with the sampling which I don't understand.
I've tried different input pins (buffered and unbuffered) and changed the number of channel groups I'm collecting, turned noise filter off and on and still get similar behavior.  I've also gotten strange behavior when using triggering modes but I'll save that for another post.  Has anyone else seen similar things?
Ian suggests that this might be due to problems with the FPGA code.  Since I've no experience with FGPA coding, perhaps someone here has some ideas about what is going on?
Title: Re: Signal sampling issues
Post by: jack.gassett on May 04, 2010, 06:44:28 am
@sdixon

Are you using the bitstream that shipped with the OLS or are you flashing a bitstream that has a deeper sample buffer size from http://gadgetforge.gadgetfactory.net/gf ... r_1.03.zip (http://gadgetforge.gadgetfactory.net/gf/download/frsrelease/123/338/OpenBench_LogicSniffer_1.03.zip) ?

The bitstream that ships with the OLS only has a 4k sample buffer size for 32 channels. So if you are setting the java client for 16K then it is requesting the same 4K sample 4 times. If you want to sample 16k then you need to first download the package above and load the 16k8bit_inside or 16k8bit_outside bitstream. This will give you 8 channels that are 16k deep.

We are working on an update to get all the available sample depths in one bitstream that will make things much easier. The original Sump client was written for a 256K sample depth so you can select less depth than you have but not more. Hopefully we can have an update in the next week or so. It's probably not clear that this is how it works right now, the intention was to integrate a way to manage the different bitstreams into the Java client. But then I thought of a way to just get everything into one bitstream and have been heading in that direction instead.

Sorry for the inconvenience but we wanted to start out with stable bitstreams before we started making more drastic changes.

Jack.
Title: Re: Signal sampling issues
Post by: sdixon on May 04, 2010, 09:28:48 am
I'm using the bitstream as shipped from Seeed.  I didn't realize the sample limitations in the current setup.  Perhaps there is some documentation for OLS that I missed somewhere?  I was just going by the Java client, since I didn't have any other information to hand.
If 32 channels at 4K samples is the only thing available as shipped from Seeed, then things make a lot more sense.  It sounds from your response that this is a temporary limitation and I'll look forward to new bitstreams that will bring larger samples.
Thanks,
Scott
Title: Re: Signal sampling issues
Post by: jack.gassett on May 04, 2010, 05:10:35 pm
@sdixon

Once again, I'm very sorry for the confusion. I looked back over the User Guide and it talks about the six different bitstreams for different memory configurations but it doesn't clearly let someone know what they need to do.
http://dangerousprototypes.com/2010/02/ ... nalyzer-2/ (http://dangerousprototypes.com/2010/02/25/prototype-open-logic-sniffer-logic-analyzer-2/)

It is possible to use the OLS with 8 channels that are 16k deep right now. To do so follow these steps:

You can also watch this thread to follow the progress of the updates:
http://dangerousprototypes.com/forum/in ... opic=483.0 (http://dangerousprototypes.com/forum/index.php?topic=483.0)


Jack.
Title: Re: Signal sampling issues
Post by: sdixon on May 04, 2010, 07:43:55 pm
Hi, Jack-
Thanks for the clarification.  I wasn't trying to be critical and in any case, the problem is partly mine since I missed the appropriate instructions and charged ahead assuming that the options in the SUMP client just worked.  I did get 16k8bit_inside loaded and all of the measurements I listed in the first post in this thread now work fine with a 16k sample size. 
I did have a little problem with the batch file to load the bitstream.  At least on my version of Windows XP, 'choice' is not a recognized command.  I got around it by just editing the batch file and putting in the appropriate com port in the pump_loader line.
I'm not a Windows guy so there may be some obvious way to fix this so that choice works but for now I've got things working.
The OLS is really a nice piece of work.  Thanks for the help.
Scott
Title: Re: Signal sampling issues
Post by: jack.gassett on May 04, 2010, 10:12:02 pm
Scott,

Thanks for the heads up on "choice" not being available. I never got around to testing on multiple platforms with that script. I will either include it or find an alternative.

Thanks!
Jack.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01062058400session_write_close ( )...(null):0
20.01092189976ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01092190752Database_MySQL->query( ).../DatabaseHandler.php:119
40.05522329464Database_MySQL->error( ).../Db-mysql.class.php:273