Live data from Hacker News

Show HN: FPGA Ultrasound Imaging on a Raspberry Pi

un0rick.cc

1–10 of 36 posts

Re: Show HN: FPGA Ultrasound Imaging on a Raspberry Pi

#2
The github is a little more descriptive and answers a few more questions: https://github.com/kelu124/un0rick/ (though don't expect all your questions to be answered here either).

I'm curious what the FPGA approach offers above a regular CPU/DSP approach in plain English (quod non intellegunt: technerdese attracts followers, latinnerdese less so). I've been interested in FPGA's since dabbling with them a couple years ago but haven't come across a use case that's tangibly beneficial yet. If this is one, I'd love to contribute, but I'm not so far gleaning that from the docs. Can OP assist here?

Re: Show HN: FPGA Ultrasound Imaging on a Raspberry Pi

#4
post #3

Cool project :) I just got back from shenzhen where I purchased a handheld ultrasound probe with built-in screen about the size of a really chunky smartphone for $1800 with wifi & connection to ios/android

I am very interested in hacking on some ultrasound projects. Do you know if what you have is available for online purchase anywhere?

Re: Show HN: FPGA Ultrasound Imaging on a Raspberry Pi

#5
post #3

Cool project :) I just got back from shenzhen where I purchased a handheld ultrasound probe with built-in screen about the size of a really chunky smartphone for $1800 with wifi & connection to ios/android

I am very interested in hacking on some ultrasound projects. Do you know if what you have is available for online purchase anywhere?

google sonostar, bargain a bit for a good price :)

Re: Show HN: FPGA Ultrasound Imaging on a Raspberry Pi

#6
post #2

The github is a little more descriptive and answers a few more questions: https://github.com/kelu124/un0rick/ (though don't expect all your questions to be answered here either). I'm curious what the FPGA approach offers above a regular CPU/DSP approach in plain English (quod non intellegunt: technerdese attracts followers, latinnerdese less so). I've been interested in FPGA's since dabbling with them a couple years…

Not OP, but FPGAs are good for realtime signal processing, including initial processing needed to filter and downconvert high frequency signals to make them accessible to conventional CPUs.

They are also parallel processing-oriented by nature, so a traditional ultrasound implementation based on an array of sensors is a good fit for an FPGA-based front end.

People tend to use FPGAs for tasks that used to be offloaded to dedicated DSP chips. Besides their processing capabilities, one key reason is that their I/O capabilities can handle just about any data acquisition/interfacing problem. When you need to move a lot of data around in a hurry, there are few solutions better than an FPGA, and certainly no more flexible ones. For mass production, of course, both DSP chips and ASICs tend to be more economical.

Some of the tasks involved in ultrasound could potentially be handled by the PRU units on the BeagleBone Black platform. Not sure if that would work well for this application but could be worth considering.

Re: Show HN: FPGA Ultrasound Imaging on a Raspberry Pi

#7
post #2

The github is a little more descriptive and answers a few more questions: https://github.com/kelu124/un0rick/ (though don't expect all your questions to be answered here either). I'm curious what the FPGA approach offers above a regular CPU/DSP approach in plain English (quod non intellegunt: technerdese attracts followers, latinnerdese less so). I've been interested in FPGA's since dabbling with them a couple years…

Ultrasound processing is actually pretty niche: you have a whole bunch of channels with a very high sample rate (tens of MHz). In the case of medical ultrasound, a typical handheld ultrasound probe can have range from 50 to 150 parallel channels.

Because you need fast, parallel DSP, FPGAs actually really shine for ultrasound. And because production volumes are relatively low, the NRE to jump to an ASIC generally isn't justified. Just about every modern ultrasound machine does signal processing on an FPGA.

Re: Show HN: FPGA Ultrasound Imaging on a Raspberry Pi

#8
post #2

The github is a little more descriptive and answers a few more questions: https://github.com/kelu124/un0rick/ (though don't expect all your questions to be answered here either). I'm curious what the FPGA approach offers above a regular CPU/DSP approach in plain English (quod non intellegunt: technerdese attracts followers, latinnerdese less so). I've been interested in FPGA's since dabbling with them a couple years…

As in all engineering related choices, there are tradeoffs that make the decision between FPGAs and DSPs:

Similarities:

->Both are specialty items, with specialty dev. environments and proprietary libraries.

->Both are designed to do fast processing of highly parallel data (DSPs are known as VLIW processors, at least in all of the architectures I'm familiar with).

->Both require knowledgeable specialists to really get a whole lot of benefit from

Differences:

->DSPs were at a point in time much cheaper to build into a product, and sibling comment's mention of the BeagleBone's onboard resources reminds me that they were a big part of TI's business once upon a time. Relatedly, they are often included in SoCs because they're built using the same process node at the fab as the main ARM core. I'm not a silicon expert, so I'll defer to someone else for confirmation of this, but my general understanding is that FPGAs have been built on different transistor designs and such to optimize the LUTs and their routing, causing them to be uneconomical to include in SoCs. Given that both Altera and Xilinx offer such things now, I'm not sure how current that statement is, but there is some amount of engineering tradeoff in the silicon layout itself.

->DSPs are still a processor, with a fixed layout, pipeline depth, etc. that all causes them to be optimal for certain sizes/shapes of data. If your application doesn't meet that, you might be better off with an FPGA.

->On the other hand, an FPGA is more easily scaled to weird data sizes... Do you have a 6 bit super high speed ADC? You very likely want to use an FPGA.

->FPGAs are pretty much the go-to choice when dealing with really high speed sampling. I'm not sure exactly where the line is drawn, but I've worked on a couple of medical imaging devices during internships that both used FPGAs to acquire the data, do some gentle massaging and packaging before offloading it to something else to do real image analysis, image processing, computer vision, etc. ->A sub point to that, the resources on an FPGA that do that signal acquisition are pre-built blocks designed by the FPGA manufacturer and built in regular silicon, so they can acquire data at gigabit sampling rates. You can then apply place-and-route modifications to make sure that all processing of that data gets done on the LUT fabric as close to the signal acquisition point as possible to optimize timing, for example. This is the main area that FPGAs shine in.

->FPGAs have another interesting split: if you need to do complex verification of logic design, you might test on an FPGA and then build an ASIC. If, on the other hand, you're only going to produce, say, 10 MRI machines a year at north of $10 million each, it might not be worth building a custom ASIC, so you just stick an ultra high end FPGA in as a daughter board to the rest of your design. (Read this as "cost plays a major factor in picking FPGA vs. DSP")

Final closing thoughts:

The other major consideration between the two is who you can hire and what they know. A major portion of wireless devices (wifi routers, femtocells, etc.) uses a DSP to do the heavy lifting on the signal processing after the analog front end, so those companies have a lot of built in history, available example code, training for new engineers and an expectation that older engineers from a competitor will be used to that same technology. Medical device manufacturers, oscilloscope manufacturers, etc. have the opposite expectation since they've been using FPGAs for years. Once you're used to paying a particular license fee to Xilinx for the IP Cores you just dropped into your design, you're unlikely to be able to sell your boss on getting a bunch of custom code written by TI to make their DSP work as well, so you'll be using what the tech stack already calls for.

(edit: formatting)

Re: Show HN: FPGA Ultrasound Imaging on a Raspberry Pi

#9
post #7
post #2

The github is a little more descriptive and answers a few more questions: https://github.com/kelu124/un0rick/ (though don't expect all your questions to be answered here either). I'm curious what the FPGA approach offers above a regular CPU/DSP approach in plain English (quod non intellegunt: technerdese attracts followers, latinnerdese less so). I've been interested in FPGA's since dabbling with them a couple years…

Ultrasound processing is actually pretty niche: you have a whole bunch of channels with a very high sample rate (tens of MHz). In the case of medical ultrasound, a typical handheld ultrasound probe can have range from 50 to 150 parallel channels. Because you need fast, parallel DSP, FPGAs actually really shine for ultrasound. And because production volumes are relatively low, the NRE to jump to an ASIC generally isn'…

Today a graphic chip is also good to compute ultrasound images. I suspect that you can even do it on a CPU. I'm not sure if it is that practical to process in a FPGA if you want to compute non-potato image quality: you would need to handle tons of data by the FPGA, so either use a gigantic one (with a ridiculous price) or somehow page the data (but that's quite complex to do then...) -- this seems way more difficult than simply addressing the GiB that are avail in any modern CPU/GPU.

Re: Show HN: FPGA Ultrasound Imaging on a Raspberry Pi

#10
An amazing portable US is soon coming from Butterfly Network. The transducer plus DSP is on a very large integrated circuit, and it can do breathtaking stuff for a device of this size and cost, like real time Doppler US (show blood flow in the image).

https://www.butterflynetwork.com

Post reply on HN