fpga
**FPGA means field-programmable gate array: an integrated circuit whose logic functions and connections can be configured after manufacturing.** Instead of committing one fixed datapath in silicon, an FPGA provides a fabric of programmable lookup tables, registers, memories, arithmetic units, clock networks, I/O transceivers, and routing switches. Engineers compile a hardware description into a bitstream that transforms this generic fabric into a custom digital system, making the FPGA uniquely valuable for prototyping, low-volume products, evolving standards, deterministic control, and specialized acceleration.
**The FPGA fabric is spatial computing hardware.** A conventional processor reuses a small set of execution units over time; an FPGA maps operations into many physical pipelines that run concurrently. Each pipeline stage can accept new data every clock when properly designed, so throughput may be high even at a clock frequency below a CPU or GPU. This distinction matters for packet processing, industrial control, image pipelines, software-defined radio, genomics, and AI inference where predictable streaming latency is more important than peak floating-point benchmarks.
| Platform | Reprogrammable after deployment | Typical latency | Energy efficiency at volume | Up-front engineering / NRE | Best fit |
|---|---:|---|---|---|---|
| FPGA | Yes, at hardware level | Very low and deterministic | Medium to high for tailored pipelines | Moderate | Evolving protocols, low volume, prototyping, real-time streams |
| ASIC | No, except embedded firmware | Lowest | Highest for the designed workload | Very high | Stable workloads and high shipment volume |
| GPU | Yes, through software | High throughput, less deterministic | High for dense regular math | Low hardware NRE | Training, large batches, programmable parallel workloads |
| CPU | Yes, through software | Flexible but serial-resource limited | Lower for highly parallel kernels | Lowest | Control, operating systems, irregular algorithms |
```svg
```
**Configurable logic blocks are the repeated unit of the fabric.** A lookup table, or LUT, stores the truth table for a small Boolean function. Its address inputs select one configuration bit as the output, allowing the same hardware cell to implement AND, XOR, multiplexing, comparators, or arbitrary logic within its input count. Flip-flops store state, multiplexers select local paths, and fast carry chains accelerate addition, counting, and comparison without using general routing for every bit.
The exact grouping differs by vendor and generation. AMD commonly describes slices and configurable logic blocks; Intel uses logic elements and adaptive logic modules; Lattice emphasizes compact logic cells in low-power devices. Architecture names matter less than the mapping problem: synthesis must pack Boolean logic and registers into the available cells while preserving timing, routability, clock behavior, and configuration constraints.
**Programmable routing makes the device flexible and expensive.** Wire segments connect through configuration-controlled switches arranged in local, regional, and long-distance networks. Compared with an ASIC metal connection, a programmable path crosses transistors and multiplexers that add resistance, capacitance, delay, area, and energy. Routing usually occupies more silicon than the LUTs themselves, and congestion can prevent timing closure even when the logic utilization appears acceptable.
Placement decides which physical resources implement each operation; routing assigns wires and switches. A design near the device limit is not necessarily efficient: high utilization reduces the freedom needed to route critical nets, insert pipeline stages, distribute clocks, or satisfy I/O placement. Floorplanning, hierarchy, replication, retiming, and congestion analysis are central FPGA engineering skills.
**Dedicated blocks recover efficiency for common workloads.** Block RAM stores tables, line buffers, queues, caches, and model parameters without consuming thousands of LUTs. UltraRAM or larger embedded memories provide deeper storage in some families. DSP slices contain multipliers, adders, accumulators, pre-adders, and cascade paths optimized for filters, FFTs, matrix operations, and quantized neural networks. Hard memory controllers and high-speed transceivers handle analog-sensitive interfaces that would be impractical in soft logic.
**Configuration memory defines the hardware.** Most high-capacity FPGAs use volatile SRAM configuration bits and load a bitstream at power-up from flash, a processor, or a secure configuration controller. Flash-based and antifuse devices provide different startup, power, and radiation properties. Partial reconfiguration changes a region while the rest of the device continues operating, enabling adaptable accelerators or field updates without replacing the complete design.
The bitstream is security-sensitive intellectual property. Secure boot, encryption, authentication, rollback prevention, device identity, debug control, and key provisioning protect against cloning and malicious modification. A corrupted configuration can alter every logic and routing resource, so safety-critical systems also consider configuration scrubbing, redundancy, error detection, and recovery.
**The implementation flow resembles ASIC design but stops before fabrication.** Engineers capture requirements, write RTL in Verilog, SystemVerilog, VHDL, or generate it through higher-level tools, simulate behavior, synthesize to device primitives, place and route, analyze timing, generate a bitstream, and validate on hardware. Constraints define clock frequencies, input/output delays, false paths, multicycle paths, pin locations, electrical standards, and physical regions.
Static timing analysis checks setup and hold timing across process, voltage, and temperature models supplied for the device. Timing closure may require deeper pipelines, lower fanout, local memories, register duplication, alternate arithmetic structures, or a different floorplan. The fixed routing fabric means an RTL expression that looks small can have very different physical timing depending on placement.
High-level synthesis converts C, C++, OpenCL, or model graphs into hardware. It can improve productivity for regular loops and streaming algorithms, but directives for pipelining, unrolling, memory partitioning, interface protocols, and numeric precision still express hardware architecture. HLS does not remove the need to understand initiation interval, latency, resource sharing, data dependence, and memory bandwidth.
**FPGA arithmetic is deliberately approximate when the application permits it.** Fixed-point formats reduce area, memory bandwidth, and latency compared with floating point. If a signed value has total width (W) and (F) fractional bits, its quantization step is
$$\Delta=2^{-F}$$
Range analysis, saturation, rounding, overflow behavior, and accumulated error must be verified against application quality. DSP blocks support selected operand widths efficiently; awkward widths may consume extra slices or LUTs. Block floating point and mixed precision provide compromises for signal processing and AI.
For a fully pipelined kernel accepting one item every (II) cycles at clock frequency (f_{clk}), ideal throughput is
$$T=\frac{f_{clk}}{II}$$
An initiation interval of one matters more to streaming throughput than the number of cycles between input and output. End-to-end performance can still be limited by DRAM, PCIe, network, or host synchronization, so on-chip concurrency must be matched to data movement.
**FPGAs are strong AI inference platforms when latency, precision, and model evolution align.** Quantized convolution, attention projections, recommendation features, preprocessing, and sensor fusion can be mapped into parallel pipelines. Weights may reside in block memory for small models or stream from external DDR or HBM. Sparsity can save work if the representation and scheduler avoid irregular routing and control overhead.
Compared with GPUs, FPGAs can remove instruction scheduling and batch queues, use application-specific numeric widths, fuse preprocessing with inference, and deliver consistent latency. They are less attractive when models change faster than compilation, kernels demand unsupported floating-point density, or software portability dominates. Toolchain maturity and developer time are part of the platform cost.
**Verification spans simulation and live hardware.** Testbenches check functional behavior; assertions encode protocols and invariants; formal tools prove selected properties; lint and CDC analysis catch structural hazards. In-system logic analyzers capture internal signals through trace buffers, but probe insertion consumes resources and can change timing. Hardware results should reproduce controlled test vectors rather than replace pre-hardware verification.
**The economic decision depends on lifetime volume and change risk.** FPGA unit prices include large programmable overhead, while ASICs require masks, physical design, verification, packaging, and fabrication investment before the first shipment. An FPGA is favored when volume is modest, schedules are short, algorithms or standards may change, or the device enables learning before an ASIC. An ASIC is favored when stable high volume makes lower unit power and cost repay the non-recurring investment.
**CFS connects FPGA decisions to the silicon beneath them.** The timing, floorplan, cache memory, voltage regulator, signal integrity, thermal, packaging, and verification knowledge entries explain the constraints encountered by an FPGA board and by an ASIC migration. CFS fabrication simulators show why an FPGA’s programmable transistors and routing have physical cost, while the RTL-to-GDS flow explains what fixed-function silicon removes.
**A professional FPGA project treats programmability as an architectural resource, not a substitute for architecture.** Choose the device from I/O, memory, arithmetic, clock, security, power, and lifecycle needs; build pipelines around data movement; constrain clocks and interfaces accurately; verify crossings and numeric behavior; inspect post-route evidence; and test the complete board. The bitstream can change after deployment, but timing, bandwidth, power, and physics still decide whether the system works.