Budget logic level analyzer - Page 1
Forum section: electronics / general

author: anvoice
author_rank: Frequent Contributor
timestamp: March 20, 2025, 07:18:32 am
content: Hello, after a long delay I'm starting out on my fpga journey. I have a microphase a7-lite fpga (artix a7) for which I hope to get some documentation from the seller. Currently going through "Digital Design and Computer Architecture Risc-V Edition", which should culminate in the design of a basic RISC-V processor. Eventually hoping to run it on my fpga, but I'll likely need a logic analyzer in order to debug. I found a product called "PX Logic 32" on aliexpress and ebay, it has 32 channels and is reasonably priced, but no reviews whatsoever so not sure that's worth a buy. On the other hand, due to shipping logistics it's very expensive for a seller to ship a return back to China, so it's not exactly in their interest to send something doesn't work properly.Does anyone have recommendations for a good budget ($100-200) analyzer that could fit a beginner's needs? Any tips on which features I could need (channel count, sampling rate), for debugging a soft-core processor?

author: pcprogrammer
author_rank: Super Contributor
timestamp: March 20, 2025, 07:30:22 am
content: You might want to look into the options Xilinx offers for an internal scope/analyzer within your FPGA. The ILA core. I have not used it myself yet.Maybe this video can get you started.

author: anvoice
author_rank: Frequent Contributor
timestamp: March 20, 2025, 07:40:48 am
content: Quote from: pcprogrammer on March 20, 2025, 07:30:22 amThanks, will start on that video! I wasn't even aware they embedded logic analyzers into FPGAs.

author: pcprogrammer
author_rank: Super Contributor
timestamp: March 20, 2025, 08:10:42 am
content: Another thing to think about is simulation. This is very common in FPGA design. I use modelsim, the free version that comes with the Quartus suite. (Intel/Altera) Xilinx will have something similar with their Vivado suite.

author: anvoice
author_rank: Frequent Contributor
timestamp: March 20, 2025, 08:18:15 am
content: Quote from: pcprogrammer on March 20, 2025, 08:10:42 amI thought simulation is an intermediate and essentially necessary step before going to hardware implementation. So I was counting on having to simulate before running on FPGA.

author: pcprogrammer
author_rank: Super Contributor
timestamp: March 20, 2025, 09:38:36 am
content: Quote from: anvoice on March 20, 2025, 08:18:15 amIt is, but for very simple designs going straight to hardware is doable. Simulation helps enormously in testing your logic and can also reveal timing issues when done with low level primitive simulation, but it is not watertight. There can always be unforeseen problems when running on the hardware, and the skill of debugging these kind of things is what counts. Takes experience and knowledge.

author: Gleeson
author_rank: Contributor
timestamp: March 20, 2025, 05:07:44 pm
content: One thing to be aware of when using "built-in" logic analyzers like ChipScope (Xilinx) or SignalTap (Altera) is that they consume block RAM resources which you might otherwise need for you design. Also, the built-in logic analyzer memory depth can be quite shallow compared with standalone logic analyzers depending on how much block RAM you have available. It's not uncommon in my own designs to use both, each has their advantages & disadvantages.

author: asmi
author_rank: Super Contributor
timestamp: March 20, 2025, 06:39:19 pm
content: Quote from: Gleeson on March 20, 2025, 05:07:44 pmThey also affect placement and routing, which can make closing timing harder if your design is already pushing against the limits of performance. But bringing internal signals to I/O pins is usually worse in terms of timing and especially placement. Which is why you simulate, simulate and simulate.

author: anvoice
author_rank: Frequent Contributor
timestamp: March 20, 2025, 07:20:22 pm
content: Quote from: pcprogrammer on March 20, 2025, 09:38:36 amGood to know.Quote from: Gleeson on March 20, 2025, 05:07:44 pmThis brings up the original question again. Please feel free to suggest a standalone device if you have recommendations.Quote from: asmi on March 20, 2025, 06:39:19 pmMy first thought was that ILA core is nice because it can probe internal signals, unlike a standalone scope (unless, as you mentioned, you break out the internal signals). Of course, I'm planning to simulate.

author: BrianHG
author_rank: Super Contributor
timestamp: March 20, 2025, 07:48:40 pm
content: Quote from: anvoice on March 20, 2025, 07:20:22 pmAlways prototype with an FPGA larger than you expect to need or budgeted for your final project....Early on, I used to pick what my project budgeted in the early 2000s. It was an extra waste of time. Shrinking/optimizing your functional design takes much less engineering hours than trying to experiment and test on an FPGA which is only large enough for a refined completely debugged final product.

author: mwb1100
author_rank: Frequent Contributor
timestamp: March 20, 2025, 08:07:28 pm
content: I'm surprised theDSLogic from DreamSourcehasn't been mentioned. I might be misunderstanding something.There are knockoffs on eBay, AliExpress and the like. If you go that route a few things to be aware of:- the lowest priced knockoffs are DSLogic Basic clones which don't have on-board memory. DreamSource no longer sells these, but the DSView software still supports them. There are hacks available online to add on-board memory to a DSLogic Basic - they require skillful soldering.- some or all of the newest DSLogics from DreamSource have moved from a Spartan FPGA to a Pango FPGA. I don't know whether any knockoffs have followed suit. AFAIK Sigrok doesn't support the Pango variant yet; I have no idea if that is being worked by anyone. Of course the DSView software supports devices with either FPGA- DreamSource's DSView software for the devices is a controversial software that is a fork of or stolen from (opinions vary) sigrok- the knockoffs generally come with standard flying wire leads while DreamSource's units come with leads that have a shielded design to better support higher signaling speeds. A very few knockoff vendors have the shielded leads, but you have to shop carefully for them. You can also buy sets of shielded leads from DreamSource.I have had good experience with my knockoff DSLogic, but my uses have been pretty modest: UARTs, I2C, and SPI.

author: anvoice
author_rank: Frequent Contributor
timestamp: March 20, 2025, 08:19:43 pm
content: Quote from: BrianHG on March 20, 2025, 07:48:40 pmYes, that seems to be the prevalent advice. I have a XC7A100T FPGA chip, so probably enough for some growth room. Of course, assuming I can get it working (MIcrophase A7-lite has scant readily-available documentation).Quote from: mwb1100 on March 20, 2025, 08:07:28 pmThanks, I did see the DSLogic family on Aliexpress. The reason I wondered about the PX Logic (probably a knockoff of DSLogic) is that on paper it seems like a better deal. Any thoughts on thePX Logic device? Worried about what design compromises they made to get the price down that low.

author: mwb1100
author_rank: Frequent Contributor
timestamp: March 20, 2025, 08:30:59 pm
content: I had not heard of the PXLogic until I read your post. It turns out thatthey have a githuband claim it's "based on sigrok".Unfortunately that repository isn't a fork of sigrok - by that I mean there's no commit history prior to Aug 2024. So it would take some analysis to determine how closely it's based on sigrok. They also have a link to DreamSourceLab in the readme. I suppose that's an indication that it might be a DSLogic clone?If you (or anyone) gets a PXLogic, I'm sure many here on eevblog would appreciate a review, teardown, etc.

author: anvoice
author_rank: Frequent Contributor
timestamp: March 20, 2025, 08:34:20 pm
content: Quote from: mwb1100 on March 20, 2025, 08:30:59 pmIt looks identical to a DSLogic U3Pro32 except for the logo as far as I can tell. Most likely a clone. If I do decide to get it, I'll definitely come back with a review.

author: mwb1100
author_rank: Frequent Contributor
timestamp: March 20, 2025, 09:06:38 pm
content: Just in case it's of interest to anyone, here's an image of the PCB for the pxlogic I grabbed from AliEpress:

author: hamster_nz
author_rank: Super Contributor
timestamp: March 20, 2025, 09:21:35 pm
content: You might find this of interest: "If you want to try it, you can use nothing more than a Pico and a jumper wire as long as you don’t need the level conversion. " - so fine for connection to an FPGA dev board:https://hackaday.com/2022/07/07/pico-makes-capable-logic-analyzer/A enhanced design with level shifters and so on...https://hackaday.com/2024/12/12/pico-logic-analyzer-gets-new-version/

author: pcprogrammer
author_rank: Super Contributor
timestamp: March 21, 2025, 07:11:38 am
content: The image of the PX logic board looks promising. It looks like it does have memory on board and level shifters for the signals. Can't make out the marking on the bigger WCH chip. I assume that is the USB 3 interface chip. The specifications state 512MB (4Gbits) of memory and 250MSa/s for 32 channels. Not bad if true.The link the OP provided comes up with a 404 on my system, but here is a link that is available at least in France:https://www.aliexpress.com/item/1005008635311208.htmlAt 132 euro not a bad deal.

author: pcprogrammer
author_rank: Super Contributor
timestamp: March 21, 2025, 07:19:07 am
content: Quote from: anvoice on March 20, 2025, 08:19:43 pmIt depends on how complex your design is going to be, but the XC7A100T is quite big. 5 times more logic cells than the Gowin FPGA on the Tang Nano 20K, which comes with a risk-v configuration on delivery. Have not checked that design on how much logic it uses, but for what I read about risk-v is that it does not use that much logic for the core itself.So I don't think you will run out of FPGA space soon.

author: anvoice
author_rank: Frequent Contributor
timestamp: March 22, 2025, 12:19:33 am
content: Quote from: hamster_nz on March 20, 2025, 09:21:35 pmThat certainly looks interesting. I do wonder just how capable it is compared to a commercial unit: I don't currently have enough experience to judge this effectively.Quote from: pcprogrammer on March 21, 2025, 07:11:38 amIt's quite a bit cheaper for me actually (about $90 before taxes). I suppose the link works only in the US.Quote from: pcprogrammer on March 21, 2025, 07:19:07 amHopefully, growth room was one of the things I had in mind when getting this board.

author: betocool
author_rank: Regular Contributor
timestamp: March 22, 2025, 02:01:23 am
content: I'm not sure this fits into your budget, but I find the Analog Discovery 2 or 3 (the 2 may be discontinued) ok for the price. It also comes with a scope and the software allows for tons of options. The one big caveat is that even in logic mode it can't store long streams of data, which is unfortunate.The flagship in my experience for PC based logic analysers is the Saleae Logic, but that is another price point altogether.Cheers,Alberto

author: anvoice
author_rank: Frequent Contributor
timestamp: March 22, 2025, 08:24:38 am
content: Quote from: betocool on March 22, 2025, 02:01:23 amThanks for the suggestion. A little too expensive to justify for my use case.Yes, the price of the Saleae really bites.

author: zapta
author_rank: Super Contributor
timestamp: March 23, 2025, 03:36:26 pm
content: You can run your emulated Risc V as slow as you want to even an oscilloscope and a bunch of LEDS may be sufficient for hardware validation, while most of the debugging is done in a simulator.Just make sure to have a clean synchronous design with no corner cutting.

author: Gleeson
author_rank: Contributor
timestamp: March 23, 2025, 09:56:23 pm
content: I just want to note that debugging in a simulator is great as far as it goes, but doesn't help when you want to debug some interface to a connected device (memory or some other peripheral) for which you have no HDL testbench.

author: anvoice
author_rank: Frequent Contributor
timestamp: March 24, 2025, 12:04:50 am
content: Quote from: zapta on March 23, 2025, 03:36:26 pmInteresting, though I don't know how far my 2 channel scope will get me.Quote from: Gleeson on March 23, 2025, 09:56:23 pmGood point. I'll probably try out the PX Logic and report back on how it goes. It'll take a while to get here though.

author: alinja
author_rank: Newbie
timestamp: March 26, 2025, 03:06:24 pm
content: The vendor debugging tools of course do this without any hardware as long as you have a compatible USB connection to the board.But if you need to debug physical signals, you can use another cheap fpga board (such as tang nano etc) and connect some of the pins to its debug core.

author: pcprogrammer
author_rank: Super Contributor
timestamp: March 26, 2025, 03:10:13 pm
content: Quote from: alinja on March 26, 2025, 03:06:24 pmThe Raspberry PI Pico is way cheaper than any FPGA board, and as others wrote in this thread it can do reasonable high speed sampling.

author: Alaska99
author_rank: Newbie
timestamp: September 24, 2025, 02:32:15 am
content: Quote from: anvoice on March 24, 2025, 12:04:50 amAnvoice, do you finally purchased PXLogic? I just received mine and search a way to use it with PulseView but the software don't detect it...

author: anvoice
author_rank: Frequent Contributor
timestamp: September 24, 2025, 08:27:46 pm
content: Indeed, though I won't be of help for a while: as luck would have it, I'm leaving on a 40 day trip, so I can't help troubleshoot. I did not test mine yet (very bad practice but was busy).

author: mwb1100
author_rank: Frequent Contributor
timestamp: September 24, 2025, 08:56:35 pm
content: Quote from: Alaska99 on September 24, 2025, 02:32:15 amDid you try the pxview software?https://github.com/PXLogic/PXViewIt looks like the INSTALL file has some build instructions. According to what I see on github comments and pull requests you are likely to run into some problems building - hopefully only minor ones.Unfortunately, the support website (https://www.marrychip.com/) reports "建立数据库连接时出错" (Google translated: "Error establishing a database connection"). There has been activity on the github as recently as September 5, so maybe an issue opened on github might get the main website fixed?(note: I don't have a PXLogic - I'm merely following this thread)