Abstract
Modern FPGAs support partial reconfiguration, allowing hardware modules to be swapped dynamically. However, unpredictable task arrivals lead to "Swiss cheese" fragmentation of the chip surface, hindering the placement of new modules and causing column interference. This paper proposes an offline defragmentation strategy that models module layout as a 2D strip packing problem. By leveraging graph-theoretic algorithms during system idle time, the approach optimally rearranges modules to maximize contiguous free space and minimize future task interruptions.
The Challenge of FPGA Fragmentation
Field-Programmable Gate Arrays (FPGAs) have evolved to support partial reconfiguration, enabling the hot-swapping of hardware modules—such as decoders or networking cores—without halting the entire system. In dynamic environments, tasks arrive and depart asynchronously, leading to a fragmented hardware surface.
This fragmentation presents two primary issues:
- Space Fragmentation: Total free area may be sufficient for a new module, but if it is scattered in non-contiguous "holes," the module cannot be placed.
- Column Interference: In architectures like the Xilinx Virtex-II, reconfiguration occurs column-wise. Loading a new module into a column occupied by an active task requires interrupting that task, degrading performance.
The authors address this by proposing an offline "defragmenter" designed to run during system idle periods, packing existing modules as tightly as possible to prepare for future demands.
Graph-Theoretic Methods
The core of the proposed solution treats defragmentation as a Two-Dimensional Strip Packing Problem (SPP). To overcome the NP-hard nature of coordinate-based searches, the authors employ a framework based on packing classes and component graphs.
- Combinatorial Characterization: Instead of absolute $(x, y)$ coordinates, the system represents relative module positions using interval graphs. If the projections of two modules onto an axis overlap, they share an edge in that axis's component graph.
- Feasibility via Theorem: Utilizing the Fekete & Schepers theorem, a packing is deemed feasible if its component graphs satisfy three specific combinatorial conditions (C1, C2, and C3).
- Optimization Strategy: The algorithm performs a binary search on the FPGA's width. At each step, a branch-and-bound algorithm checks for a valid packing, pruning the search space by identifying "forbidden substructures" within the graphs.
Experimental Validation
The approach was tested against 10 benchmark scenarios simulating a real-world automotive multimedia system. These scenarios included IP cores like MPEG2/MP3 decoders and MicroBlaze processors, with active module counts ranging from 5 to 11. Initial fragmentation was generated using a "Least Interference Fit" (LIF) online strategy followed by random removals.
Key Results and Insights
The algorithm demonstrated significant improvements in both efficiency and resource recovery:
- Computational Speed: Optimal solutions for all scenarios were found in under 0.5 seconds on standard hardware (Intel Pentium IV 3GHz).
- Space Recovery: The area of the maximal free rectangle increased by an average factor of 2.2, with some scenarios seeing a threefold increase.
- Column Availability: The number of entirely free columns increased by an average of 4.2 columns per scenario, directly reducing the risk of future reconfiguration interference.
By shifting heavy optimization to "recurring idle times," the authors provide a practical way to maintain high-performance FPGA operation without the overhead of complex online placement algorithms.
Future Directions
While effective, the current model assumes modules have fixed rectangular aspect ratios. Future work aims to incorporate malleable modules, where synthesis tools generate multiple valid shapes for a single core. Additionally, the model needs to account for fixed modules (like I/O controllers) that are hard-wired to specific pins and cannot be moved during the defragmentation process.
Summary updated