Field-programmable gate arrays
maddog's Doghouse

Take some advice from Linus Torvalds and learn how to program an FPGA.
I was at LinuxCon in Beijing, China, this year, and Linus Torvalds was being interviewed onstage. During the interview, Linus said that if he were starting over in FOSS today, he might not create a kernel but instead, learn how to program a field-programmable gate array (FPGA). I found this interesting.
What is an FPGA? Traditional central processing units (CPUs) and graphics processing units (GPUs) are made of fixed circuits designed by computer engineers that form an "instruction set." This instruction set tells the hardware to do certain things when an instruction (designated by a program) is executed. All of this is controlled by a clock that acts like a drum keeping a beat and makes sure that everything works in harmony.
However, another way of building a computational unit is to build specialized circuitry that always processes data in a particular way – like "hard coding" the circuitry. Once the circuitry is set, there is only one thing that circuitry can do. Because the circuitry does not necessarily have to follow a "drumbeat," it can often solve that particular problem 10, 20, or even 100 times faster than a traditional CPU or GPU.
Of course, most of us do not want to buy a computer for every single problem we want to solve, so the programmer is able to change the program on the FPGA to solve different problems. One moment, the FPGA might be compressing an image; the next moment it might be encrypting (or decrypting) a stream of data. If you combine one (or more) FPGAs in a system along with a CPU and GPU, the FPGAs can offload a lot of processing from the main processing units, allowing them to do more varied tasks while the FPGA does the computation it was programmed to do.
Programming an FPGA does not follow the same procedural logic that programming a CPU or GPU normally does. Special languages and tool chains are used to build the program, and it does take some study to learn how to use them. Also, in the past, FPGAs were very expensive (and large), so not too many people learned how to program them. Now they are inexpensive and getting more inexpensive by the day. Some companies are now building FPGA functionality into their Systems on a Chip (SoCs).
FPGAs are not just about speed of computation; they can be used to reduce the cost of energy, as well. If your main CPU has to run for a long time to solve a problem, it may use a lot of electrical power. But if the FPGA can do the calculation quickly, then the main CPU might be able to go into "standby" mode and use less electrical power.
The Mars Rover was designed a long time ago, and although it does have regular CPUs on board, they are relatively slow and consume a lot of power. On the other hand, the Rover has a significant number of FPGAs on board that do the "heavy lifting," which allows it to reduce its overall use of electricity by turning the FPGAs off when they are not in use.
People are often confused by the term "real time." To me real time means that the computation occurs as the data comes in. If you are not doing the data processing in real time, then the data has to stop or be buffered until the processing element can "catch up." In most data processing, this causes a backlog that may never be overcome. FPGAs can be used to keep this data flowing, so you never have to stop the data flow.
FPGAs can have another useful function, particularly in embedded systems. Many GPUs have proprietary, binary-only firmware that can prevent new versions of the kernel from working unless the firmware is updated. I call these "binary blobs." I was lamenting to Professor Marcelo Zuffo of the University of Sao Paulo that many 3D functions (particularly "simple" ones) could be done by an FPGA and therefore eliminate the need for proprietary GPU binary blobs. Three months later, two graduate students had programmed an FPGA to run all of the OpenGL test suites. By using an FPGA for simple 3D and 2D graphics processing, embedded systems do not suffer when companies drop support for their GPUs (or the operating system that is using the GPUs).
One last idea on GPUs is using them for crypto-currency mining. While your main CPU is running the system, your FPGA can be taking care of the mining process.
Therefore, I recommend finding an inexpensive FPGA and learning to program it. Don't let Linus have all the fun!
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Direct Download
Read full article as PDF:
Price $2.95
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
News
-
An All-Snap Version of Ubuntu is In The Works
Along with the standard deb version of the open-source operating system, Canonical will release an-all snap version.
-
Mageia 9 Beta 2 Ready for Testing
The latest beta of the popular Mageia distribution now includes the latest kernel and plenty of updated applications.
-
KDE Plasma 6 Looks to Bring Basic HDR Support
The KWin piece of KDE Plasma now has HDR support and color management geared for the 6.0 release.
-
Bodhi Linux 7.0 Beta Ready for Testing
The latest iteration of the Bohdi Linux distribution is now available for those who want to experience what's in store and for testing purposes.
-
Changes Coming to Ubuntu PPA Usage
The way you manage Personal Package Archives will be changing with the release of Ubuntu 23.10.
-
AlmaLinux 9.2 Now Available for Download
AlmaLinux has been released and provides a free alternative to upstream Red Hat Enterprise Linux.
-
An Immutable Version of Fedora Is Under Consideration
For anyone who's a fan of using immutable versions of Linux, the Fedora team is currently considering adding a new spin called Fedora Onyx.
-
New Release of Br OS Includes ChatGPT Integration
Br OS 23.04 is now available and is geared specifically toward web content creation.
-
Command-Line Only Peropesis 2.1 Available Now
The latest iteration of Peropesis has been released with plenty of updates and introduces new software development tools.
-
TUXEDO Computers Announces InfinityBook Pro 14
With the new generation of their popular InfinityBook Pro 14, TUXEDO upgrades its ultra-mobile, powerful business laptop with some impressive specs.