EEVblog Electronics Community Forum

Products => Test Equipment => Topic started by: somlioy on November 05, 2013, 10:17:24 pm

Title: Memory depth in a logic analyzer?
Post by: somlioy on November 05, 2013, 10:17:24 pm
I'm considering one of the cheaper zeroplus logic analyzers, but I'm wondering how much memory depth is actually needed for a hobbyist?
Leaning towards the 64kbit or 128kbit versions.

Are those hacks still available?
Title: Re: Memory depth in a logic analyzer?
Post by: Retep on November 05, 2013, 11:52:44 pm
I can't tell how much you need for hobbyist use (whatever that maybe), and I'm not familiar with the ZeroPlus logic analyzer. FWIW my experience (admittedly from 15 years ago, based on a HP 16500) is that there is no such thing as too much memory depth in a logic analyzer.

If you have too little memory depth you spend a lot of time figuring out trigger conditions that are specific enough so you will catch whatever you are looking for. Defining very specific triggering conditions implies that you have to know exactly know what you are looking for (which may not be the case). However if you are too specific so you miss the event. And you may also need to figure out the lowest possible sample rate you can get away with. In the end you spend more time trying to catch the event you are interested in than analyzing the problem.

So I recommend you go for memory as much as you reasonably can afford. 64 or 128 kbit (per channel I assume) doesn't seem that much to me, though it is much more than I had on the HP 16500 at the time.
Title: Re: Memory depth in a logic analyzer?
Post by: abyrvalg on November 06, 2013, 09:54:13 am
Hantek gives 2Gbits of memory for a comparable price :)
Title: Re: Memory depth in a logic analyzer?
Post by: con-f-use on November 06, 2013, 10:01:42 am
128kbit will quickly get annoying even for basic stuff (e.g. debugging IR remotes).
Title: Re: Memory depth in a logic analyzer?
Post by: Mark_O on November 06, 2013, 10:13:27 am
Hantek gives 2Gbits of memory for a comparable price :)

Yes, and it's really annoying the way they "spec" that.  They claim a 2G depth, and it's simply not.  The 2G is the depth x the width... i.e., the samples are all 32-bit wide, and the real depth is 64M samples.  I wish they'd just say that.

Since there is no option to trade off width for depth (e.g., 16-bit wide x 128M samples, and so forth) the 2G depth claim is just  :bullshit:
Title: Re: Memory depth in a logic analyzer?
Post by: somlioy on November 06, 2013, 07:53:24 pm
Well, I was mainly thinking of cars (can-bus), i2c, spi and possible some rs485 if it dosent require much hardware.
Title: Re: Memory depth in a logic analyzer?
Post by: Mark_O on November 06, 2013, 09:11:31 pm
Well, I was mainly thinking of cars (can-bus), i2c, spi and possible some rs485 if it dosent require much hardware.
In that case, mojo-chan's suggestion would be an excellent option.  An 8-channel USB analyzer that has unlimited memory can run at 24 MSa/s (or a bit more, on a couple devices that run narrower than 8-channels).  That speed is adequate for everything you listed, as long as you don't try to do SPI much beyond 5 MBit/sec (I've squeaked out 8 MBit/sec, in a pinch, and they claim 12 is doable).

I'd recommend USBee  SX (http://www.usbee.com/sx.html) for this, mainly because it has the best protocol analysis software.  (Best decoders, customizable, filtering, searching, excellent navigation.)  There are also others that do essentially the same thing, hardware-wise (e.g. Saleae Logic8 (http://www.saleae.com/logic/)), but the software isn't nearly as good.  These are under $200 solutions.  And I believe both offer "try it, and if you don't like it, return it" options.
Title: Re: Memory depth in a logic analyzer?
Post by: leafi on November 07, 2013, 04:34:53 am
I personally have a Salaea Logic 16 and I love the thing. Yes it is more expensive than other products but I love that they have so many built in decoders and it uses the PC hard drive for storage which allows for almost unlimited capture (All be it at lower capture rates).  I personally have used mine to debug 1 wire and JTAG. It is also great that you can save the entire capture data and send it to some other computer and use the software to debug or monitor your transactions. The software is free to use so you do not need the hardware attached to the computer to review the data captures. The only real weakness is the USB 2.0 bandwidth. I they will come out with a USB 3.0 device which can capture more channels at higher frequency.
Title: Re: Memory depth in a logic analyzer?
Post by: Mark_O on November 07, 2013, 04:54:27 am
I personally have a Salaea Logic 16 and I love the thing. Yes it is more expensive than other products but I love that they have so many built in decoders and it uses the PC hard drive for storage which allows for almost unlimited capture (All be it at lower capture rates).  I personally have used mine to debug 1 wire and JTAG. It is also great that you can save the entire capture data and send it to some other computer and use the software to debug or monitor your transactions. The software is free to use so you do not need the hardware attached to the computer to review the data captures. The only real weakness is the USB 2.0 bandwidth...

All the good things you had to say about the Saleae Logic are true.  It also has the smoothest scrolling of any such software, which is quite impressive.  However,

> The only real weakness is the USB 2.0 bandwidth.

is a statement I'd have to take issue with.  The bandwidth limitation IS a weakness, if and when your signal exceeds what it can handle.  But it's not the ONLY weakness.  Far worse (IMO), is the fact that the software provides no tools for dealing with a large sample acquisition.  Zoom in & out, scroll, and JumpToNextEdge.  That's it!  :(  And it's been that way for years.

No Searching, no Markers, no Filtering, or anything else to aid in navigation.  Nada.  That's where USBee beats it hands-down, in effective usability (with all those capabilities, and more).  USBee also provides an EventList view, with relative or absolute time stamps, that the Logic8/16 lacks, and synchronizes the two views. 

So while Saleae does a great job with what it DOES do, there's so much it DOESN'T do that kills it, for me.  YMMV.
Title: Re: Memory depth in a logic analyzer?
Post by: casper.bang on November 07, 2013, 09:34:22 am
I like the Salea Logic mostly because of it's hardware quality build and software in the same league, with support of all major platforms - other vendors could learn from this (my opinion).
Title: Re: Memory depth in a logic analyzer?
Post by: olsenn on November 07, 2013, 02:32:41 pm
Saleae is the Apple of logic analyzers
Title: Re: Memory depth in a logic analyzer?
Post by: casper.bang on November 07, 2013, 03:23:28 pm
Saleae is the Apple of logic analyzers
Ehhh... except when did Apple do software for Windows and Linux? #AnalogyFailure
Title: Re: Memory depth in a logic analyzer?
Post by: gmb42 on November 08, 2013, 12:48:25 pm
The horror story that is itunes.  And quicktime. :-BROKE
Title: Re: Memory depth in a logic analyzer?
Post by: sprocket on November 08, 2013, 02:26:25 pm
Well a prober Logic analyzer will be on my shopping list pretty soon, and I have come across this one
http://www.digilentinc.com/Products/Detail.cfm?Prod=ANALOG-DISCOVERY (http://www.digilentinc.com/Products/Detail.cfm?Prod=ANALOG-DISCOVERY)

alot of tools in a small handy size. And for me it's a big selling point that it can do a lot of other stuff that I dont use very often so I cant really justify buying a standalone bench equibment. for an exsample it has a 2 channel waveform generator, pattern generator and a spectrum analyzer.

Yea the bandwith is not impressive compared to stand-alone bench equibment, but I dont do HF og VHF stuff any ways.. so for low freq. stuff and easy PWM test switcher for LEDs and SMPS circuits it will serve my needs very very well I think.
Title: Re: Memory depth in a logic analyzer?
Post by: Maxlor on November 08, 2013, 05:54:09 pm
I like the Saleae devices. Mostly because it works on non-Windows platforms, and the unlimited sample depth means I don't have to figure out complex triggers.

As for the software limitations that come with it: don't forget that you can export the captured data into a CSV file, then continue filtering/decoding/massaging using external tools.

I would consider anything under 1M sample depth per channel inadequate for a logic analyzer (unless it can do clever tricks like record only changes.) I've found that often, there's a pause in the communication you're recording, which ends up burning through a lot of samples (one example: you wake up some I2C sensor and tell it to do a measurement, which might take a second, wait for the interrupt, read the measurement, then tell it to go back to sleep.) If you're limited then it makes recording the events you're interested in very challenging.
Title: Re: Memory depth in a logic analyzer?
Post by: abyrvalg on November 09, 2013, 03:25:34 pm
Hantek gives 2Gbits of memory for a comparable price :)

Yes, and it's really annoying the way they "spec" that.  They claim a 2G depth, and it's simply not.  The 2G is the depth x the width... i.e., the samples are all 32-bit wide, and the real depth is 64M samples.  I wish they'd just say that.

Since there is no option to trade off width for depth (e.g., 16-bit wide x 128M samples, and so forth) the 2G depth claim is just  :bullshit:

Anyway, 64M/channel is 1024x more than topicstarter's ZeroPlus 64K.
Despite of dirt cheap DDR SDRAM availability most popular LAs still utilize tens years old technologies like small expensive SRAMs, or are too lazy to add external storage at all and use even smaller FPGA's builtin RAMs, but their prices are quite "modern".
Title: Re: Memory depth in a logic analyzer?
Post by: Mark_O on November 09, 2013, 07:22:44 pm
Anyway, 64M/channel is 1024x more than topicstarter's ZeroPlus 64K.
Despite of dirt cheap DDR SDRAM availability most popular LAs still utilize tens years old technologies like small expensive SRAMs, or are too lazy to add external storage at all and use even smaller FPGA's builtin RAMs, but their prices are quite "modern".

I agree.  And if Hantek's software and support didn't suck so badly, I'd have less trouble recommending them.  But the hardware seems capable, and the 64M sample depth is quite impressive.  Other than possibly the time it takes to pull it over into the PC (which I'm unfamiliar with).

The other thing Hantek does right (with their hardware) that many of the alternatives fall short on, is allow you to deal with voltages in a much wider range, and set the thresholds far more flexibly.  Some products have NO threshold flexibility at all.  E.g., "1" is anything >= 2.0V.  And that's all you get.
Title: Re: Memory depth in a logic analyzer?
Post by: abyrvalg on November 09, 2013, 11:52:09 pm
Mark_O, sure, their software is far from being perfect, some features are nice (like complex triggers, measurements, bus grouping), while others are poor (limited navigation, just 3 protocol decoders, no binary export), but I can tolerate it for the ability to sample 64MB/ch @400MSPS  :-+

Waiting for "USB 3.0 Saleae", the Cypress FX3 is in production long time already, but nobody had released anything interesting yet.
Title: Re: Memory depth in a logic analyzer?
Post by: casper.bang on November 11, 2013, 10:31:46 am
Yep you want memory. I have the analog devices discovery which has a LA 16k memory and you really have to mess around with the trigger. The thing I don't uderstand is it's a USB 2.0 device transfering at HS 480Mbps so why don't they just use the PC'S memory for storage? I have 8GB ram if the LA could utilize that, it would be perfect.

480Mbits = 60Mbytes / second, but that is the raw transfer speed and does not include any overhead. Once you add in all the protocol stuff for bulk transfers 24MHz (or 24Mbytes/sec) is actually pretty close to the limit.

It must be trivial to add some rudimentary run-length with Huffman encoding to achieve much higher transfer in practice.
Title: Re: Memory depth in a logic analyzer?
Post by: abyrvalg on November 11, 2013, 11:24:24 am
There are lots of cheap USB flash sticks achieving 40MB/s read speed in USB 2.0 mode. Cypress FX2 itself (chip used in saleaes) achieves 52MB/s in ideal conditions (always ready, "screamer fw" sample from Cypress). So 24MB/s is far from the limits. There were limits on the other end of wire - slow USB hosts, but they are in the past.
And with USB 3.0 200+MB/s speeds are possible (example: Kingston HyperX USB 3.0 flash stick achieving 220MB/s) - that can be really interesting, but no such instruments yet.
Title: Re: Memory depth in a logic analyzer?
Post by: Mark_O on November 11, 2013, 03:22:05 pm
480Mbits = 60Mbytes / second, but that is the raw transfer speed and does not include any overhead. Once you add in all the protocol stuff for bulk transfers 24MHz (or 24Mbytes/sec) is actually pretty close to the limit.

Yes I know that is what both the USBEE-SX and Beagle I2C/SPI Protocol Analyzer spec a max sample rate of upto 24Mbps. Thats good enough for me I would rather have the deep memory.

I agree that most of the time a 24 MSa/s rate is adequate, and an unlimited buffer memory is a huge win.

But the point I think that abyrvalg was trying to make is that the Hantek (had to go look it up) 4032L can do 400M Sa/s, combined with a local buffer of 64M (!) samples... at 32 channels width.  All for <$200.  That's 256MB of buffer RAM, and these days, why not? 

So it's certainly a very decent option, as long as the software doesn't suck so bad as to be unusable.  I've considered picking one of these up myself, and if I had a need for those speeds, I probably would. 

[I work mostly with embedded systems, and the fastest signal I've needed to look at (so far) was a 50 MHz SPI bus.  Most of the time, signals are much, much less than that, and my USBee SX will handle the job.  But in that one case, I have an instrument that will sample digital signals at up to 2 GSa, with a few Meg (8, maybe) samples, so I was OK.  I may even have clocked it in State mode, to get a better time window.]
Title: Re: Memory depth in a logic analyzer?
Post by: Mark_O on November 11, 2013, 03:37:39 pm
480Mbits = 60Mbytes / second, but that is the raw transfer speed and does not include any overhead. Once you add in all the protocol stuff for bulk transfers 24MHz (or 24Mbytes/sec) is actually pretty close to the limit.

It must be trivial to add some rudimentary run-length with Huffman encoding to achieve much higher transfer in practice.

That's an interesting conjecture.  Unfortunately though, incorrect.  :)  The problem being that while HE can effectively reduce the data size (and thus increases the effective rate) on average, it's the peaks you have to worry about.  And HE can actually make those larger (high entropy increases the coding size).  The whole idea of these cheap acquisition devices is low cost, and they don't have much internal buffer memory (or processing power, either).  They're basically clocking in and out at full speed, at the same time.

What you're suggesting would require much larger buffers for matching the I/O streams, and would still be prone to breaking down if the data stream under test had too much variation for too long a time.  Definitely not trivial.
Title: Re: Memory depth in a logic analyzer?
Post by: Mark_O on November 11, 2013, 03:47:03 pm
There are lots of cheap USB flash sticks achieving 40MB/s read speed in USB 2.0 mode. Cypress FX2 itself (chip used in saleaes) achieves 52MB/s in ideal conditions (always ready, "screamer fw" sample from Cypress). So 24MB/s is far from the limits. There were limits on the other end of wire - slow USB hosts, but they are in the past.

Thanks for those examples!  I was unaware of those capabilities.  I think the fastest I've seen USB2 run in real life was about 32 MB/sec.

One point to keep in mind though is that those speeds are only possible if you had quite a bit more buffer RAM available on the acquisition device, to smooth out the transfer rate variations.  These things typically have about 2K or 4K, max.

The second point, and reason for larger buffer requirements, is that PCs are not so good at dealing with instantaneous real-time demands.  Certain types of latencies and contentions could break the data stream, and in fact, already do on many systems.  Even with just the current, relatively modest,  24 MB/sec rates.
Title: Re: Memory depth in a logic analyzer?
Post by: Rasz on November 11, 2013, 03:53:49 pm

480Mbits = 60Mbytes / second, but that is the raw transfer speed and does not include any overhead. Once you add in all the protocol stuff for bulk transfers 24MHz (or 24Mbytes/sec) is actually pretty close to the limit.

No, FX2 realistically can pump out ~40MB/s
Title: Re: Memory depth in a logic analyzer?
Post by: abyrvalg on November 11, 2013, 05:09:48 pm
mojo-chan, no, in Saleae case 24MHz is sample rate, not input bandwidth. They use FX2 in "GPIF master" 8-bit mode (this simplifies interfacing to the ADC, no glue logic needed) and 24MB/s is the maximum possible throughput in this mode (GPIF state machine runs at 48MHz producing one active ADC read edge per 2 cycles, 2nd cycle is wasted for inactive edge).
Edit: ADC exists in oscilloscope models only (some USBees) of course, but for LA models operation mode is the same.
Edit: saleae specs: http://www.saleae.com/logic/specs (http://www.saleae.com/logic/specs)
hackaday's review: http://hackaday.com/2009/03/06/tools-saleae-logic-logic-analyzer/, (http://hackaday.com/2009/03/06/tools-saleae-logic-logic-analyzer/,) scroll to "can capture signals up to 12MHz"
Title: Re: Memory depth in a logic analyzer?
Post by: backflipper on November 11, 2013, 09:59:52 pm
Well a prober Logic analyzer will be on my shopping list pretty soon, and I have come across this one
http://www.digilentinc.com/Products/Detail.cfm?Prod=ANALOG-DISCOVERY (http://www.digilentinc.com/Products/Detail.cfm?Prod=ANALOG-DISCOVERY)

I would be interested in a review of this if you do buy it.
Title: Re: Memory depth in a logic analyzer?
Post by: Rigby on November 12, 2013, 07:58:46 pm
I have used the Logic on a 16MHz clock signal with success. It really isn't clear what they mean by 24MHz.

If you read the Overview paragraph of the Logic16 page (http://www.saleae.com/logic16), you can get an idea of what they mean.

I'm pretty sure they're speaking in terms of samples per second.  In the case of the Logic, that's 24MHz on each of 8 channels.  They don't say such, but I would assume that the sample rate would double if you were only sampling 4 channels, as is described on the Logic16.
Title: Re: Memory depth in a logic analyzer?
Post by: Mark_O on November 12, 2013, 09:29:36 pm
I'm pretty sure they're speaking in terms of samples per second.  In the case of the Logic, that's 24MHz on each of 8 channels.  They don't say such, but I would assume that the sample rate would double if you were only sampling 4 channels, as is described on the Logic16.

I would assume precisely the opposite.  :) 

Since they explicitly describe how narrowing the channel increases the sampling rate in the Logic16, but say no such thing on the similar Tech Specs page for the Logic8, I'd think that 24 MHz was the max rate, regardless of the number of "active" channels.  In fact, I see no evidence that all 8 channels are not always "active", even if just acquiring null data.  It's the simplest hardware implementation, and I doubt the base Logic unit can do anything else.
Title: Re: Memory depth in a logic analyzer?
Post by: abyrvalg on November 12, 2013, 10:30:45 pm
Mark_O, you are 100% right. Logic16 has an FPGA that combines narrow bits into bytes, but Logic8 is bare Cypress FX2 - no combining.

Logic16 PCB: http://sigrok.org/wiki/File:Saleae_Logic16_PCB_top.jpg (http://sigrok.org/wiki/File:Saleae_Logic16_PCB_top.jpg)
Logic8 PCB: http://sigrok.org/wiki/File:Saleae_logic_pcb_front.jpg (http://sigrok.org/wiki/File:Saleae_logic_pcb_front.jpg)