Opinion: Live Life Like an FPGA.

Guest post by Bennett Greenberg, Princeton University

Me programming some FPGA boards as an undergraduate research assistant (Rutgers University, New Jersey, USA)
Me programming some FPGA boards as an undergraduate research assistant (Rutgers University, New Jersey, USA)

The CMS Experiment at the Large Hadron Collider (LHC) is pushing the limits of human knowledge. Building, running, and maintaining a detector that searches for never-before-seen physics comes with some immense challenges, and to overcome them, the collaboration has put to use some of the most advanced technology the world has seen. One prominent example of this cutting-edge technology is the field-programmable gate array, or FPGA. I was introduced to FPGAs upon joining the CMS collaboration, and I've had the great privilege of working with these brilliant devices for several years since then. In that time, I've come to appreciate their extreme utility, and their importance both in the CMS experiment and in the broader scientific and engineering communities. But I've also come to appreciate the profound life lessons that we can learn by studying their properties.

In technical terms, an FPGA is a reconfigurable custom integrated circuit. Put another way, it's a device used for computations that can be reprogrammed by its user an unlimited number of times, and operates 'in parallel', meaning many different computations are done all at the same time instead of one-by-one like in a computer. Instead of the computer's famous Central Processing Unit (CPU), where commands are executed one after another ('in series'), an FPGA instead has an array of millions of 'logic blocks' (kind of like simple processors) distributed all throughout its chip for performing computations, allowing it to continuously perform millions of operations in parallel. Kind of like workers in an assembly line, each logic block will continuously do the same task over and over again during operation of the device. But (keeping with the simile), the factory manager (the FPGA's programmer) might at any time decide to pause operation and assign each worker (logic block) a totally new task, changing entirely what the assembly line (FPGA) produces, even though the factory (FPGA) is still using the same basic tools and materials.

A picture I took of (a very small) part of the L1 trigger electronics in the CMS cavern.
A picture I took of (a very small) part of the L1 trigger electronics in the CMS cavern.

So why use FPGAs at all? Why can't CMS just use good old computers instead of this cutting-edge, difficult-to-understand technology? The answer is that the tasks we have to accomplish at CMS are too difficult for computers. The LHC produces a proton-proton collision every 25 nanoseconds while it's running - that is, 40 million collisions every second. And each of those collisions results in a spray of particles distributed all around the 21-meter long, 15-meter wide and high cylindrical detector. Any of those 40 million collisions, at any location in the detector, might have the data that could totally alter our understanding of the universe, so we need to be able to read out all of the data from the detector before the next collision starts just 25 billionths of a second later. A computer would have no chance of accomplishing this because it can only do one operation at a time. But an FPGA can run millions of operations at once, making it ideal for this type of large-scale data acquisition task. 

And there's another problem that FPGAs can help CMS with, too. With so much data, even CMS with its world-class computing resources distributed all across the world, doesn't have nearly enough memory to store the data from every collision that happens at the detector. And most collisions are totally mundane anyway, producing only particles that we already know about and are very well-studied. So CMS has a 'trigger', which is a very complicated system that quickly decides whether or not to keep each event and store it in memory, or to discard it (the vast majority will be discarded). That decision is a very complicated one, involving hundreds of algorithms. CMS separates the trigger into two different layers: a 'Level 1 Trigger', which filters out about 99% of collision events, and the 'High Level Trigger', which further filters out about 99% of the remaining events (meaning only about .01% of all collision events end up getting saved). Because the Level 1 Trigger needs to operate so quickly, with a time budget of only a few microseconds (.000001 seconds) per event, computers are much too slow. But the ability of FPGAs to perform millions of operations in parallel makes them ideally suited for this first layer of filtering. And, in my personal opinion, it also makes them ideal as a model for living a good and happy life.

Below I discuss some of the most important characteristics of an FPGA, and why they are also important for life in general. 

An FPGA...

Me in front of the CMS detector
Me in front of the CMS detector

0. Is reprogrammable.                   

The FP in FPGA, standing for "field-programmable", means that if the device isn't doing what we want it to, we can simply rewrite the program, load the new program onto the device, and reprogram it, changing how it operates entirely. It's certainly not easy to write the new program; there is often much debate and discussion about what the device should do, and then, even once all is decided, actually implementing the changes into code that works and is not too resource-intensive is another great challenge. But thanks to the hard work of scientists and engineers, the FPGA can always be reprogrammed to do something slightly, or totally, different.

Likewise, life is never immutable. If you're not happy with how your life is going, it's never too late to reprogram yourself. It may not be easy to write that new program, and it may not be a quick fix, but it is always possible if you're willing to put in the time and effort.

1. Operates based on logic.                   

At its most basic level, an FPGA is really just an interconnected collection of millions of 'logic gates'--circuits that take in some electrical inputs, perform some basic logic operations, and spit out the outputs. These circuits can be connected in complicated ways, which is what allows the FPGA to perform such complicated operations. But its operation is entirely based on rules of logic.

In a similar way, it's important to base your life choices on logic. Some things might seem like a good idea in your heart, but it's always a good idea to think them through logically before acting on impulse.

2. Operates in parallel (but with finite resources).               

Another hallmark of an FPGA is that it operates in parallel--it can do many different computations all at the same time. Of course, there are limits to how much can be done at once--the FPGA has a finite number of resources, and the more the device is asked to do, the more of these resources are used up. So an FPGA can do many different things at once, but not so many that it runs out of resources.

You may also feel like you have many different things going on all at once in your life, and if you're like me, you might find yourself constantly running out of time to complete them. Like an FPGA, you have finite resources preventing you from doing everything you'd like to at the same time. But you can prioritize the things that are most important to you, and do those things in parallel. There's no need to devote all of your resources to one aspect of life, but you always must be careful not to try to do more than your finite resources will allow. Just like an FPGA, you should operate in parallel, but while keeping your limits in mind.

3. Is extremely valuable.

FPGAs can be very expensive, going for tens of thousands of dollars each. For that reason, they must always be handled with care. When they need to be moved, they must be handled gently and carefully. We must also be careful not to let them overheat, or get wet or dirty. We even 'ground' ourselves before touching them to make sure we're not introducing static electricity to the board, which could interfere with the electronics.                   

You should remember that your life is also extremely valuable--even more so than all of the FPGAs in CMS combined! As you move through life, make sure to always take care of yourself, physically and mentally--and always demand that you're treated kindly by the people that interact with you.

4. Is very fast.

The main reason FPGAs are used in CMS, and most other applications, is for their speed. They run extremely quickly. So, too, will your life. At times it might be difficult to believe, but eventually, we all look back on our lives and wonder how time flew by so fast. Make sure to cherish all the time that you do have in this beautiful universe, because execution of the program that is your life will go very quickly, just like an FPGA.

The views expressed in CMS blogs are personal views of the author and do not necessarily represent official views of the CMS collaboration.