FPGARelated.com
Fundamentals

Thinking in Hardware

Everything happens at once: the hardware mindset

If you come from a software background, this is the single biggest shift you need to make. In software, instructions run one after another: line 1, then line 2, then line 3. In hardware, everything runs at the same time.

There is no "first" or "next." Every circuit you describe exists physically and operates on every clock cycle, simultaneously. Let's see what that looks like.

Software Thinking vs Hardware Thinking

Click the clock button to step through cycles. Watch how software executes one line at a time while hardware computes everything on every tick:

Cycle: 0

The Parallel Mindset

In software, you write:

a = input1 + input2
b = input3 * input4
c = a - b
d = c & 0xFF

The CPU executes these one at a time. Line 3 waits for lines 1 and 2 to finish. Line 4 waits for line 3.

In hardware, you describe:

wire a = input1 + input2;
wire b = input3 * input4;
wire c = a - b;
wire d = c & 8'hFF;

These aren't instructions. They're physical circuits that all exist at the same time. The adder, the multiplier, the subtractor, and the AND mask are all separate pieces of hardware running simultaneously. As soon as the inputs change, all outputs update (after propagation delay).

The order doesn't matter. You could rearrange these four lines in any order and the hardware would be identical. That's the fundamental difference: software describes a sequence of steps, while hardware describes a structure of connections.

This takes practice to internalize. When you write HDL code, you're not telling a processor what to do step by step. You're specifying what circuits to build. Every "line" becomes real hardware that runs in parallel with every other line.

Key Insight: In hardware, you don't describe what happens first, second, third. You describe what exists. Every circuit operates simultaneously, on every clock cycle. The order of your HDL code doesn't determine execution order. It all runs at once.
Try it: Click "Clock" repeatedly and count how many cycles the software side needs to finish all four computations. Now look at the hardware side. How many cycles did it need? That difference is why FPGAs are so fast for parallel workloads.

Why This Matters for FPGA Design

This parallel mindset affects everything in FPGA development:

  • No loops in the traditional sense. To process 100 items, you build 100 copies of the circuit
  • No call stack - there are no functions being called; everything is wired together
  • No variables in the software sense. Instead you have signals carried on wires and values stored in registers
  • Timing matters - signals take real physical time to propagate through gates and wires

Software engineers who successfully make this mental shift become excellent FPGA designers, because they bring strong systematic thinking to a domain that rewards careful, structured design.

Frequently Asked Questions

How is FPGA programming different from software programming?

In software, instructions execute one after another (sequentially). In FPGA design, you describe hardware circuits that all operate simultaneously (in parallel). You are not writing instructions for a processor; you are designing physical circuits that exist and run at the same time.

What does parallel processing mean in FPGAs?

In an FPGA, every circuit you create runs at the same time. If you design 100 adders, all 100 compute their results on every clock cycle. This is true parallelism, not time-sharing like multi-threaded software. It is what gives FPGAs their speed advantage for certain workloads.

Quick Check

Test your understanding of the key concepts from this lesson.