November 2

What’s Inside an FPGA? – FPGA Hardware Resources

If we were to open up an FPGA and peek inside, what would we discover?

In our previous video, we discussed the fundamental concept of FPGAs.

In this video, we're going to dive deeper into this topic and discuss the FPGA hardware resources.

We're also going to clear up some common misconceptions that FPGA users might have.

More...

But before we jump into that, let's quickly recap what we covered in our last video...

What We Covered In the Previous Video

In the previous part, we learned that we can implement any logic function using something called a Look-Up Table or LUT.

Actually, FPGAs are made up of thousands to millions of these LUTs, and they allow us to create more complex circuits.

To implement larger circuits, we break them down into smaller functions, each of which can be implemented using a single LUT.

Now, we need to connect these LUTs to build the main circuit.

To achieve this, there are already many wires in place that can be programmed to connect the LUTs properly, and this process of connecting them is known as Routing.

By programming the LUTs and the switches associated with the wires, we can construct any large circuit we desire.

This process of programming the LUTs and configuring the interconnections is referred to as Configuration.

What's interesting is that you can reconfigure an FPGA multiple times.

For example, you might want to experiment with different circuits, test different designs, or even make changes if you're not satisfied with the results.

Now, let's take a closer look at the hardware resources inside an FPGA.

FPGA Hardware Resources

If we could remove the outer cover of an FPGA and take a peek inside, we'd probably see something like the schematic I've prepared for you:

FPGA hardware resources

A schematic view of FPGA hardware resources.

Let's explore the other resources inside FPGAs, aside from the two main ones we talked about earlier.

I'll introduce these resources one by one and provide a brief explanation for each of them.

The primary components you'll find in FPGAs are Logic Blocks, which are essentially the same as LUTs.

Then, there are Switch Matrices, which are made up of wires and switches.

We discussed these two resources in the previous video.

Moving on, we have I/O Blocks, which are circuits located behind each of the FPGA's pins.

After that, we have memory blocks and digital multipliers.

Finally, we have clock resources.

Now, let me give you a brief explanation of each of these components:

Logic Blocks

Logic Blocks, or as they are sometimes called, Logic Cells, are fundamental components within an FPGA. Imagine them as tiny circuits inside the FPGA.

LUT structure

Simplified structure of a Look-Up Table.

These Logic Blocks play a critical role in FPGA architecture, and they are essentially the same as Look-Up Tables.

Within Logic Blocks, there's another element called flip-flop. These flip-flops are handy for creating synchronous circuits.

Synchronous circuits are those where changes happen in sync with an external signal called a clock.

To make sure that the changes in LUTs synchronize perfectly with the clock and get sent to the rest of the circuit, we use flip-flops at the output of the LUTs.

So, these flip-flops in Logic Blocks help us design synchronous circuits.

But if we don't need that synchronization, we can directly use the output of Look-Up Tables in the rest of the circuit.

You can choose between these options using the multiplexers available in Logic Blocks.

Interconnections

Now, let's move on to the next resource we discussed in the previous video: Switch Matrices.

Think of these as networks of wires that you can program. With these wires, you can connect various digital resources, including those LUTs we mentioned earlier.

I/O Blocks

The next resource to consider is I/O Blocks. These are circuits behind each of the FPGA's pins. And guess what? These circuits are programmable too!

With I/O Blocks, you have the power to decide whether each FPGA pin should act as an input, an output, or both (aka bidirectional).

Also, you can specify various I/O standards for these pins using these circuits.

For instance, you can define the current drive strength for output pins or set voltage levels for input and output pins.

This capability allows for diverse connections between FPGA and various peripherals.

Memory Blocks

Another super useful resource in FPGAs is memory blocks.

If you're familiar with digital design, you'll know that you often need some memory units in your designs.

Sometimes, you perform calculations and want to store the results for later use.

Other times, you might sample a signal and need to hold it before sending it elsewhere.

In these situations, having hardware-based memory blocks already built into FPGAs is a lifesaver.

Without these pre-designed memory blocks, you'd have to use Look-Up Tables to store data.

But that's not ideal for two reasons: first, LUTs are precious resources primarily used for implementing functions, so using them for memory storage would be wasteful.

Second, hardware memory blocks can boost the speed of your design, making it more efficient.

Multipliers

Now, let's explore "Multipliers," another crucial digital asset within FPGAs.

Multiplication is a fundamental operation in digital designs, especially when you're dealing with tasks like digital signal processing.

If FPGAs didn't come with pre-designed multipliers, you'd be forced to use Look-Up Tables, just like you did for memory blocks, to implement multiplications.

But here's the catch: Look-up tables are often in high demand for implementing various functions, so using them for multiplication would not be efficient.

To solve this problem and achieve faster multiplication, FPGAs typically include a set of pre-built hardware-based multipliers that you can utilize in your designs.

Clock Resources

Now, let's talk about "clock resources." Clock management is a critical aspect, particularly when you're working on synchronous circuit designs.

An FPGA is essentially a large circuit, and it needs to distribute the clock signal simultaneously to different parts of itself.

However, the paths that the clock signal takes can have varying lengths, leading to different delays in reaching different sections of the circuit.

In synchronous systems, the goal is to make sure the clock reaches all parts of the system at the same time.

To achieve this, FPGAs provide mechanisms to synchronize the clock across the system.

One of these mechanisms is using the frequency synthesis resource.

Typically, when you're working with an FPGA-equipped board, it includes an oscillator that generates a fixed and specific clock frequency.

This clock is then supplied to one of the FPGA pins. For example, your board might have an oscillator generating a 50 MHz clock, which can be used in your synchronous designs.

However, in some cases, you may need a different clock frequency for your current design, say, 128 MHz.

To accommodate this, you have to change the existing frequency. Fortunately, FPGAs offer hardware resources designed for this purpose.

These specialized hardware resources are called DCM (Digital Clock Manager) in older Xilinx FPGAs and MMCM (Mixed-Mode Clock Manager) in newer ones.

FPGA DCM

DCMs and MMCMs are used for clock frequency adjustment.

With these DCMs or MMCMs, you have the power to adjust the clock frequency to meet your specific design needs.

Now, let's delve a bit deeper into the misconceptions I mentioned earlier...

Misconceptions Commonly Held by FPGA Users

While we'll explore this topic in more detail in upcoming videos when we discuss hardware description languages and digital implementation, let's touch on it briefly based on what we've covered so far.

You've probably written code for microcontrollers before, or if not, you might have done some programming on your computer using languages like C, Basic, Pascal, or another language.

When you work with a microcontroller or computer, you're essentially interacting with a CPU (Central Processing Unit) - a pre-built piece of hardware that understands and executes a specific set of instructions.

To use a CPU, you write code that gives it these instructions to perform specific tasks.

Now, let's contrast that with FPGAs.

When you work with FPGAs, you don't have a pre-defined CPU, and you don't have any specific, pre-designed hardware resources ready to use.

What you do have is an extensive array of hardware resources, but they don't initially perform any particular functions.

For instance, imagine you want to add two registers together in an FPGA.

In the FPGA world, adding two registers together isn't a simple matter of writing code like you would for a CPU.

Instead, you need to design and implement the hardware for this addition.

First, you have to create a hardware adder. Then, you must connect the two registers that you want to add to this adder.

But here's the thing: registers themselves don't exist as standalone entities in an FPGA. You have to design them from scratch as well.

So, when you're working with FPGAs, you're essentially designing hardware, not writing software.

Terms like "programming for an FPGA" or "software design for an FPGA" are not quite accurate in this context.

Now, when we dive deeper into hardware description languages in future videos, you'll see that even terms like "instructions" don't quite fit because instructions are specific to CPUs.

Instead, you'll use hardware description statements that allow you to describe how digital circuits behave.

We'll delve into these concepts more thoroughly in upcoming videos.

Did you find the tutorial "What’s Inside an FPGA? – FPGA Hardware Resources" helpful?

If you have any questions about this post, please feel free to ask in the comments section below. And if you enjoyed the content, don't forget to share it with your friends!

About the author 

Ahmad Saghafi

Hi, I’m Ahmad, founder of FPGATEK and creator of the FPGA Design Blueprint training. With over 15 years of hands-on experience and a wealth of knowledge from successfully implementing numerous industrial projects, I am thrilled to share my insights and expertise with you on this website.

Enjoyed this article?


You may also like:

Leave a Comment

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Get Started With FPGA In 20 Minutes

>