6.5.10 · D1Advanced & Emerging Architectures

Foundations — FPGA-based acceleration

2,078 words9 min readBack to topic

Before you can read the parent note comfortably, you need to earn every symbol it throws at you. This page takes each one from zero: what it means in plain words, the picture it draws, and why the topic can't do without it.


0 · The two words behind everything: gate and clock

Picture two light-switches wired so the bulb glows only if you flip both: that is an AND gate. Every digital chip — CPU, GPU, FPGA — is millions of gates wired together.

Figure — FPGA-based acceleration

Look at the square wave above. The gap between two rising edges is (measured in seconds). If nanoseconds, the chip ticks million times a second — that's what " MHz" means.

Why the topic needs : every speed claim in the parent note multiplies a count of cycles by to get real time in seconds. is the bridge between "how many ticks" and "how many microseconds".

Recall Why is a smaller

a faster clock? Smaller gap between ticks ::: more ticks per second ::: higher frequency .


1 · The building blocks: LUT, flip-flop, BRAM, DSP

The parent note names four hardware pieces. Here is each one as a picture.

Figure — FPGA-based acceleration

The figure shows a 2-input LUT storing the truth table of an AND gate. The four input combinations 00, 01, 10, 11 are the four addresses; the stored column 0,0,0,1 is the function. Change the stored column and the same LUT becomes an OR, a XOR — any function of 2 inputs.

Picture a camera that takes exactly one photo per tick and shows that photo until the next tick. Flip-flops are how the assembly line (pipeline) holds each stage's partial result until the next tick moves it along.

Picture a notepad on your desk (BRAM) versus a filing cabinet down the hall (DRAM). Keeping data on the notepad is why the topic later says "raise arithmetic intensity" — see §5.

Recall A 6-input LUT stores how many bits?

::: bits.


2 · Sum notation — reading the FIR formula

The parent note's worked example uses . Let's earn every piece.

For :

  • = the input sample at time-step (square brackets mean "the -th item in a stream").
  • = the sample one step earlier; = steps earlier.
  • = a fixed weight (a "tap coefficient"). = how many taps.

Why the topic needs : it compresses " multiply-adds" into one symbol so the note can talk about doing all of them in the same cycle instead of one after another.

Recall In

, how many terms are added? From to inclusive ::: exactly terms.


3 · The pipeline symbols: , ,

These four letters drive every speed formula in the topic.

Figure — FPGA-based acceleration

The figure shows a 3-stage pipeline () as a grid: columns are cycles (time), rows are stages. Watch item 1 (yellow) enter stage 1, move to stage 2 next tick, stage 3 the tick after — it exits after ticks. But item 2 (green) is right behind it, so after the pipe fills, a finished result drops out every tick.

Why the topic needs these: the parent note's speedup is built entirely from , , and the cancelled . You cannot read that formula without knowing what each letter pictures.

Recall Why does throughput ≠ latency?

Latency = time for the first result ( cycles) ::: throughput = rate of results after fill (1 per cycle); for large the rate dominates.


4 · Powers, logs, and (limit arrow)

Two mathematical tools sneak into the topic. Here's why each, and not another.

For : pair into 4, then 2, then 1 → 3 levels, and indeed . Why this tool: it counts pipeline levels in the FIR adder tree — you need a log, not a multiply, because each level halves the count.

Applied to speedup: . Divide top and bottom by : . As the term , leaving . Why this tool: it makes precise the claim "an -stage pipeline approaches an speedup" without hand-waving.

Recall

Halve 16→8→4→2→1, four steps ::: .


5 · The Roofline symbols: , ,

Recall When are you memory-bound?

When ::: so is capped by ; adding compute units won't help, you must raise .


The prerequisite map

Clock and period T

Pipeline count S plus M minus 1

Logic gate

LUT stores 2 to the k bits

Building blocks FPGA

Flip flop 1 bit memory

BRAM on chip memory

Roofline P B I

DSP slice multiplier

Sum notation for FIR

FIR filter example

Log base 2 adder depth

Speedup and limit arrow

FPGA based acceleration

Read top to bottom: the clock and flip-flops feed the pipeline maths; gates and LUTs feed the building blocks; BRAM feeds the roofline; sums and logs feed the FIR example — all four streams pour into the topic.


Equipment checklist

Test yourself — you're ready for the parent note when each of these is instant.

I can convert into a frequency in MHz
.
I can say how many bits a -input LUT stores and why
bits, one per possible input combination — the full truth table.
I can expand by hand
.
I know what , , and each mean in the pipeline formula
= stages, = data items, = clock period; time .
I can explain why as
divide by ; the fill term , leaving .
I can compute and say what it counts
; the number of adder-tree levels to sum 8 numbers pairwise.
I can state the roofline bound and its units
; has units ops/s.
I can explain the difference between latency and throughput
latency = time to first result ( cycles); throughput = results per cycle (1 after fill).