News for hackers. Stuff that matters.
Re:Xilinx FPGA Board for Arduino by bb88 on Wednesday September 25, 2019 @12:25AM (#21067591)
Right now, the homebrew electronics industry is buzzing like linux and open source was in 1996. PCB design and manufacturing has been opened up to millions by cost reductions and open source software in the past few years. FPGA development is following suit as well.

One of the big drawbacks of using an Arduino is that it is so limited in the number of modern devices it can access (USB 3, SATA, HDMI In or Out, etc).

To that end I think LiteX maybe the most intriguing thing I've seen this year if it catches on popularity. It's an SoC builder, which would allow for DIY SoC's (including using a RISC V core).

https://github.com/enjoy-digital/litex

I'm not saying it's guaranteed, but it's looking more and more possible that FPGA's using LiteX or similar technology could disrupt the embedded micro controller market particularly for the homebrew market. You can choose the CPU you want to code for with the interfaces you're using.

Also check out the current supported litex FPGA platforms:

https://docs.google.com/spreadsheets/d/1XTHfdYXuvwoYdPXm4M6q...

Re:Xilinx FPGA Board for Arduino by lnsru on Wednesday September 25, 2019 @01:16AM (#21067834)
You are ignoring price point. Small FPGA board from Digilent costs as much as Raspberry Pi 4 4 GB. Development on Raspberry Pi is much more convenient, it is powerful and it already has decent CSI-2, 4K HDMI, Ethernet. Comparable FPGA board goes for hundreds $/€. Because decent CSI-2 with high frame rate and resolution as well as 4K HDMI need decent FPGA with transceivers. Add long hardware development cycles and this gets really boring really fast for most hobbyists.
Re:Xilinx FPGA Board for Arduino by bb88 on Wednesday September 25, 2019 @02:19PM (#21073576)
Is that because the FPGA boards aren't really mass produced like the RPi is? Could you imagine a world where if FPGA's get popular in the electronics market it could change? Could you imagine what might happen if a cheap FPGA platform came in to the market like the RPi did for SBC's?

Again, I'm not saying it's going to happen. But people were making similar arguments about linux in 1996: "Windows just works." And very similar to linux, it dropped the barrier to entry for server programming. Either you had paid through the nose for Unix, or you were coding on NT, and your company was paying through the nose for the server licenses.

Re:Xilinx FPGA Board for Arduino by seabird on Wednesday September 25, 2019 @07:38PM (#21076749)
It's largely because an FPGA is inferior to a microcontroller in many common use cases; they truly are a niche tool. They are nowhere near as flexible as a microcontroller is, and reprogramming them for a different purpose is a huge investment from a development standpoint. When you try to alleviate these issues by pre-canning a microcontroller with configurable peripherals, the resulting FPGA configuration will get trounced by a microcontroller in both performance AND ease-of-use.

Don't get me wrong, I really like FPGAs. I genuinely think they're the coolest tools in embedded engineering, full stop. However, a big part of the allure is how incredibly arcane and niche they are.

Re:Xilinx FPGA Board for Arduino by bb88 on Thursday September 26, 2019 @05:19PM (#21085669)
>> They are nowhere near as flexible as a microcontroller is, and reprogramming them for a different purpose is a huge investment from a development standpoint.

Isn't that the point of LiteX and Migen though? To reduce the barrier to entry in time and budget? Before the RPi came along SBC's were fairly expensive, and the RPi was only able to offer a product at that price because of scale.

And here we have an FPGA based video processing platform for only $350 produced in low-volume. https://hdmi2usb.tv/numato-opsis/

I'm not saying you're wrong, I just don't think your argument is as much of a slam-dunk that you think it is.

Re:Xilinx FPGA Board for Arduino by rowanG077 on Thursday September 26, 2019 @06:00AM (#21079595)
FPGA are WAY more flexible then a microcontroller is. You can literally just use your FPGA as a microcontroller if you want.

Reprogramming them is not a chore at all anymore since you can write stuff for them at a much higher level of abstraction then you can for microcontrollers. Complexity only really starts once you start having issues with timing closure or are forced to implement an DDR SDRAM controller. This all heavily depends on the toolset you are using.

Re:Xilinx FPGA Board for Arduino by skybrian on Wednesday September 25, 2019 @01:36AM (#21067934)
I'm just getting started on electronics for an audio project, but the Arduino setup of compiling code on my regular computer and uploading it over USB to firmware seems pretty nice? Since I'm never going to connect it to the Internet or even a monitor, why does Ethernet or HDMI matter? Let alone 4K HDMI.

It seems like that's more about having a cheap desktop computer than doing electronics? But I already have a desktop computer.

Re:Xilinx FPGA Board for Arduino by seabird on Wednesday September 25, 2019 @02:11AM (#21068137)
If you're going to do serious audio signals processing, you're probably going to very quickly find out that an 8bit Arduino and the Arduino environment are nowhere near powerful enough for your needs. If you really stick with it, you'll upgrade to something significantly more powerful (both hardware and tooling wise). If you start to push the limits of a 32bit microcontroller or DSP, but are still sensitive to price/power consumption/footprint/etc, then you will truly understand what the need for an FPGA is. That's my point; you as an embedded beginner (which is what most of the "maker" market is) are multiple revelations away from even beginning to understand why you would want to use an FPGA, let alone know how to work with one.
Re:Xilinx FPGA Board for Arduino by skybrian on Thursday September 26, 2019 @01:30AM (#21078477)
Oh sure, I don't know why anyone would start with an 8-bit Arduino considering that much faster 32-bit CPU's seem to be about the same price?

Whatever you go with, as a beginner you're going to want a lot of help from pre-written software. The Arduino IDE and Wiring/Arduino standard API is a good example. The mistake I made with my first purchase was not making sure that a good audio library was available for the hardware I picked. (I might consider writing one for fun, but not in C++ since I don't have much experience in that language.) But it looks like Teensy has a nice audio library, and there are other projects that look intriguing like Bela and Axoloti.

I expect (speculating) that a similar rule would apply for an FPGA; it would only be appealing to most beginners if someone more experienced came up with an interesting design that makes use of an FPGA and documented it pretty well, so you're not starting from scratch.

Re:Xilinx FPGA Board for Arduino by claudiawerner on Wednesday September 25, 2019 @03:21PM (#21074312)
I've done three years of an electronic engineering degree with a digital design on FPGAs course and I'm still not entirely sure why one would want to use an FPGA for anything - am I right in guessing that what you write in HDL for an FPGA will be faster than what you write in C? Or do you use the FPGA for testing then export designs into hardware?
Re:Xilinx FPGA Board for Arduino by seabird on Wednesday September 25, 2019 @07:11PM (#21076603)
>faster than what you write in C

It's hard to compare working with an HDL to working with a programming language like C; they are fundamentally different. The short answer to that question is that using an FPGA can lead to massive but situational performance increases. You can't use an FPGA for everything, but when you need it, you need it.

>testing then export designs into hardware

This is another common use case. Some designs can be tested on an FPGA before committing that design for production as an ASIC. There's also the case where you may need to reconfigure the hardware, so you can never truly commit to an ASIC, and continue using the FPGA.

Re:Xilinx FPGA Board for Arduino by alexhutcheson on Wednesday September 25, 2019 @11:17AM (#21071556)
You don't need to do your development on the Raspberry Pi, and I wouldn't recommend doing so. It's pretty easy to develop code on your desktop and push it to your Pi via SSH/SCP/etc. You might also be able to set up a connection to push via USB but that might end up being more complicated anyway.

For many projects, people choose something higher-end than an Arduino because their project requires more compute or memory than the 8-bit microcontroller in the Arduino can provide. Common issues:

- You need to do math with larger numbers (anything > 16 bits is really slow on the Arduino), or need to do lots of math.

- Your working data exceeds the ~2 kB of RAM.

- Your project's binary exceeds the ~32 kB of flash.

With that being said, the Raspberry Pi isn't necessarily the best candidate for every project that exceeds these constraints. The Pi is basically the cheapest possible board that includes a graphics card that can handle HD video, Ethernet, and WiFi. It also has a lot of RAM compared to other single-board computers. It is weaker for "real-time" applications like signal processing - if you need to do that sort of thing you might want to look into buying a BeagleBone Black, which has two "programmable real-time units" (PRUs), which are basically small auxiliary microcontrollers that can be used to handle the real-time work.

There are other cheaper/lower power parts in between the Arduino and the Raspberry Pi/Beaglebone level of complexity, but many of them require complicated tooling and libraries that might be difficult to use if you're not already pretty familiar with embedded development.

Re:Xilinx FPGA Board for Arduino by skybrian on Wednesday September 25, 2019 @07:18PM (#21076643)
Yeah, I meant that more genetically as something that works with the Arduino IDE, certainly not an 8-bit processor. I'm considering a higher-end Teensy or PocketBeagle. Does Raspberry Pi have any particular advantages for audio compared to them?
Re:Xilinx FPGA Board for Arduino by alexhutcheson on Wednesday September 25, 2019 @08:38PM (#21077059)
Not that I know of, unless you plan to use the Raspberry Pi’s HDMI port for audio output.
Re:Xilinx FPGA Board for Arduino by seabird on Wednesday September 25, 2019 @02:04AM (#21068105)
The Arduino is limited in regards to capabilities because it's a heavy ecosystem (usually) running on a wildly anemic device; you're out of your mind if you're expecting HDMI enc/dec, USB host controller, etc. on an 8-bit microcontroller. The usefulness of LiteX is severely mitigated by just using more powerful microcontrollers coupled with purpose-specific parts.
Re:Xilinx FPGA Board for Arduino by bb88 on Wednesday September 25, 2019 @02:06PM (#21073426)
So explain to me why the RPi doesn't have SATA on board directly then, rather than forcing one to use some kludegy USB to SATA interface. Surely there are purpose built parts for it.
Re:Xilinx FPGA Board for Arduino by seabird on Wednesday September 25, 2019 @07:28PM (#21076692)
Because the RPi is a budget SBC where the most common use case is running it off an SD card, and they apparently didn't consider a SATA controller a priority feature. For many users (maybe even a large majority), that assumption was correct.

https://www.ti.com/product/TUSB9261

There's a purpose-specific part from TI that's probably incredibly well supported and easy to source. It instantly adds a little under $7 to the BOM at volume (yikes), and you're not even counting the hundreds of hours of engineering time that would go in to integrating it (double yikes). Trying to do it with an FPGA would be even worse in terms of cost and engineering time.

COTS products don't fulfill every use case, and never will.

Re:Xilinx FPGA Board for Arduino by UncleOxidant on Wednesday September 25, 2019 @12:30AM (#21067613)
Thanks for the heads up. LiteX looks really interesting.