Project objective
This reference pipeline explores how FPGA and GPU computing can be combined in an Edge AI system where continuous sensor data must be processed with predictable timing before reaching an AI inference engine.
The FPGA handles real-time interfaces, data conditioning and streaming preprocessing, while the GPU performs compute-intensive neural network inference and higher-level vision workloads.
System architecture
FPGA responsibilities
The FPGA is responsible for the operations that need deterministic timing, stable interfaces and continuous streaming behavior.
- Camera and sensor interfaces
- Clock-domain handling
- Frame and packet synchronization
- Image preprocessing
- Filtering and format conversion
- Region extraction
- Resize or crop preparation
- Data packing for downstream transfer
Performing these operations before the GPU can reduce unnecessary data movement and prevent the GPU from spending compute cycles on simple deterministic transformations.
GPU responsibilities
The GPU handles the parts of the workload that benefit from large-scale parallel numerical computation.
- Neural network inference
- Object detection
- Classification
- Segmentation
- Feature extraction
- Computer vision algorithms
- CUDA-based post-processing
Frameworks such as TensorRT can be used to optimize inference execution, but overall system performance still depends heavily on how data reaches the GPU.
Why preprocessing placement matters
Many Edge AI pipelines perform operations such as resizing, cropping, color conversion and filtering before inference.
These operations can run on CPU, GPU or FPGA. The best placement depends on latency, bandwidth, flexibility and available hardware resources.
Best when preprocessing must happen continuously as data arrives with predictable latency.
Best for control logic, changing workflows and general system coordination.
Best for neural networks and compute-heavy image or tensor workloads.
Data movement
Data movement is often the most important part of FPGA + GPU integration. A fast FPGA and a fast GPU can still create a slow system if data passes through too many intermediate copies.
A typical data path may look like:
The architecture should minimize unnecessary transfers between host memory, device memory and application buffers.
DMA and PCIe
DMA and PCIe are common mechanisms for moving high-rate data between FPGA, host memory and GPU-connected systems.
Important engineering considerations include:
- Transfer block size
- DMA queue depth
- PCIe bandwidth
- Memory alignment
- Buffer reuse
- Synchronization
- Transfer overlap with GPU execution
Large theoretical bandwidth numbers are less useful than measuring the sustained end-to-end throughput of the complete pipeline.
Keeping the GPU supplied with work
One common failure mode is low GPU utilization even when the GPU itself is powerful enough for the workload.
This can happen when the upstream FPGA, DMA, CPU or memory system does not provide tensors or frames quickly enough.
- Small transfer sizes
- Frequent synchronization
- Excessive host-side preprocessing
- Insufficient buffering
- Blocking data copies
- Unbalanced pipeline stages
GPU profiling must therefore be combined with upstream data-path analysis.
Pipeline parallelism
The FPGA and GPU do not need to process the exact same frame at the same time.
A pipelined architecture can allow:
- FPGA to preprocess frame N+1
- DMA to transfer frame N
- GPU to infer frame N-1
- Application software to process results from frame N-2
This overlap improves utilization across the complete heterogeneous system.
Buffer strategy
Buffering must absorb timing variation between deterministic FPGA logic and less predictable GPU or operating-system scheduling.
- Double buffering
- Ring buffers
- Frame queues
- Descriptor-based DMA
- Producer / consumer scheduling
Buffer depth should be large enough to absorb normal variation but small enough to avoid unnecessary end-to-end latency.
Bring-up strategy
Confirm sensor capture, preprocessing and deterministic output behavior.
Measure DMA / PCIe throughput and confirm stable buffer movement.
Add CUDA or TensorRT inference and profile the complete pipeline.
Validation metrics
- Sensor input rate
- FPGA processing latency
- DMA throughput
- PCIe utilization
- GPU utilization
- Inference latency
- Frame queue depth
- Dropped frames
- End-to-end latency
The most useful metric is often end-to-end system behavior rather than peak performance of any individual processor.
Common bottlenecks
- GPU waiting for upstream data
- Too many memory copies
- PCIe transfer overhead
- Small or poorly aligned DMA transfers
- CPU preprocessing delaying GPU work
- Unbalanced FPGA and GPU stage throughput
- Synchronization stalls
- Buffer queues growing under sustained load
Example Edge AI pipeline
Consider a real-time inspection system receiving a continuous camera stream.
The FPGA captures the video, performs pixel-level filtering, extracts the region of interest and converts the data into the format expected by the AI pipeline.
DMA transfers prepared frames into system or GPU-accessible memory. The GPU runs an optimized inference engine and returns detection results to the application.
The application combines inference results with control logic, visualization, logging or external communication.
Typical applications
- Industrial AI inspection
- Robotics
- Autonomous systems
- Smart cameras
- Edge vision appliances
- High-speed defect detection
- Advanced sensor fusion platforms
Why this reference system matters
FPGA and GPU acceleration are often discussed independently, but the highest-value engineering work is usually at the boundary between them.
The reference pipeline is intended to validate workload partitioning, data movement, buffering and end-to-end performance across the complete heterogeneous system.