6.5.10 · D1 · HinglishAdvanced & Emerging Architectures

FoundationsFPGA-based acceleration

2,288 words10 min read↑ Read in English

6.5.10 · D1 · Hardware › Advanced & Emerging Architectures › FPGA-based acceleration

Parent note ko comfortably padhne se pehle, tumhe har woh symbol earn karna hoga jo woh tumhare saamne fekta hai. Yeh page har ek ko zero se leta hai: plain words mein kya matlab hai, kaunsi picture banti hai, aur topic ko uski zaroorat kyun hai.


0 · Sab ke peeche do words: gate aur clock

Do light-switches ka picture lo jo is tarah wired hain ki bulb sirf tab jale jab tum dono flip karo: yahi AND gate hai. Har digital chip — CPU, GPU, FPGA — millions of gates ko wire karke bana hai.

Figure — FPGA-based acceleration

Upar wali square wave dekho. Do rising edges ke beech ka gap hai (seconds mein measure hota hai). Agar nanoseconds hai, toh chip million times per second tick karta hai — iska matlab hai " MHz".

Topic ko ki zaroorat kyun hai: parent note mein har speed claim cycles ki count ko se multiply karta hai real time seconds mein paane ke liye. woh bridge hai "kitne ticks" aur "kitne microseconds" ke beech.

Recall Chhota

faster clock kyun hota hai? Ticks ke beech chhota gap ::: har second zyada ticks ::: higher frequency .


1 · Building blocks: LUT, flip-flop, BRAM, DSP

Parent note mein char hardware pieces ka naam hai. Yahan har ek picture ke saath hai.

Figure — FPGA-based acceleration

Figure mein ek 2-input LUT dikha hai jo AND gate ki truth table store karta hai. Char input combinations 00, 01, 10, 11 char addresses hain; stored column 0,0,0,1 hi woh function hai. Stored column change karo aur wahi LUT OR, XOR ban jaata hai — 2 inputs ki koi bhi function.

Ek aisi camera ka picture karo jo exactly har tick par ek photo leta hai aur next tick tak wahi photo dikhata hai. Flip-flops hi woh tarika hai jisse assembly line (pipeline) har stage ka partial result hold karti hai jab tak next tick use aage move nahi kar deta.

Apni desk par ek notepad (BRAM) versus hall ke andar ek filing cabinet (DRAM) ka picture karo. Data notepad par rakhna hi woh reason hai jisse topic baad mein kehta hai "arithmetic intensity badhao" — §5 dekho.

Recall Ek 6-input LUT kitne bits store karta hai?

::: bits.


2 · Sum notation — FIR formula padhna

Parent note ke worked example mein use hota hai. Chalte hain har piece earn karte hain.

ke liye:

  • = time-step par input sample (square brackets matlab "-waa item ek stream mein").
  • = ek step pehle wala sample; = steps pehle.
  • = ek fixed weight (ek "tap coefficient"). = kitne taps hain.

Topic ko ki zaroorat kyun hai: yeh " multiply-adds" ko ek symbol mein compress karta hai taaki note baat kar sake saare ko same cycle mein karne ki, ek ek ke baad ki bajaye.

Recall

mein kitne terms add hote hain? se inclusive tak ::: exactly terms.


3 · Pipeline symbols: , ,

Yeh char letters topic ke har speed formula ko drive karte hain.

Figure — FPGA-based acceleration

Figure mein ek 3-stage pipeline () ek grid ki tarah dikha hai: columns cycles (time) hain, rows stages hain. Item 1 (yellow) ko dekho stage 1 mein enter karta, next tick stage 2 mein move karta, uske agले tick stage 3 mein — yeh ticks baad exit karta hai. Lekin item 2 (green) bilkul peeche hai, toh pipe fill hone ke baad, har tick ek finished result bahar aata hai.

Topic ko inki zaroorat kyun hai: parent note ka speedup poori tarah , , aur cancelled se bana hai. Woh formula tab tak nahi padh sakte jab tak tumhe pata na ho ki har letter kya picture banata hai.

Recall Throughput ≠ latency kyun?

Latency = pehle result ka time ( cycles) ::: throughput = fill ke baad results ki rate (har cycle 1); large ke liye rate dominate karti hai.


4 · Powers, logs, aur (limit arrow)

Do mathematical tools topic mein ghus aate hain. Yahan kyun har ek, aur koi doosra nahi.

ke liye: 4 mein pair karo, phir 2 mein, phir 1 → 3 levels, aur sach mein hai. Yeh tool kyun: yeh FIR adder tree mein pipeline levels count karta hai — tumhe log chahiye, multiply nahi, kyunki har level count ko halve karta hai.

Speedup par apply karo: . Upar aur neeche se divide karo: . Jab toh term , sirf bachta hai. Yeh tool kyun: yeh claim ko precise banata hai "ek -stage pipeline speedup ke kareeb pahunchta hai" bina hand-waving ke.

Recall

16→8→4→2→1 halve karo, char steps ::: .


5 · Roofline symbols: , ,

Recall Tum memory-bound kab ho?

Jab ::: toh , se capped hai; compute units add karna help nahi karega, tumhe badhana hoga.


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

Top se bottom padho: clock aur flip-flops pipeline maths ko feed karte hain; gates aur LUTs building blocks ko feed karte hain; BRAM roofline ko feed karta hai; sums aur logs FIR example ko feed karte hain — chaaron streams topic mein pour hoti hain.


Equipment checklist

Khud test karo — tum parent note ke liye ready ho jab inमें se har ek instant ho.

Main ko MHz mein frequency mein convert kar sakta hoon
.
Main bata sakta hoon ki ek -input LUT kitne bits store karta hai aur kyun
bits, har possible input combination ke liye ek — poori truth table.
Main ko haath se expand kar sakta hoon
.
Main jaanta hoon ki , , aur har ek pipeline formula mein kya mean karte hain
= stages, = data items, = clock period; time .
Main explain kar sakta hoon ki kyun hota hai jab
se divide karo; fill term , sirf bachta hai.
Main compute kar sakta hoon aur bata sakta hoon yeh kya count karta hai
; 8 numbers ko pairwise sum karne ke liye adder-tree levels ki sankhya.
Main roofline bound aur uski units state kar sakta hoon
; ki units ops/s hain.
Main latency aur throughput ke beech ka difference explain kar sakta hoon
latency = pehle result ka time ( cycles); throughput = results per cycle (fill ke baad 1).