# RISC-Based 10K+ Core Finite Difference Method Accelerator for CFD
## 2 Computational Characteristics of CFD  
FDM discretizes the computational domain into a structured grid, replacing continuous solution spaces with a finite set of nodal points [34]. This approach directly transforms differential problems into algebraic systems, enabling approximate numerical solutions through mathematically intuitive and computationally concise formulations. By systematically combining temporal discretization, spatial approximation, and precision criteria, diverse finite difference computational schemes can be constructed to address specific fluid dynamics challenges. This study investigates the computational characteristics of CFD through the canonical example of a one-dimensional linear convection equation. The governing partial differential equation (PDE) for one-dimensional linear convection is formulated as  
\[\frac{\partial u}{\partial t}+c\frac{\partial u}{\partial x}=0 \tag{1}\]Equation (1) is referred to as the governing equation, where \(u\) denotes the velocity, \(t\) represents time, \(c\) is a constant, and \(x\) indicates the spatial coordinate direction. To solve Equation (1), a common approach involves its discretization. In this study, the FDM is adopted, employing forward differencing in the temporal domain and backward differencing in the spatial domain. The governing equation is discretized on an equidistant grid within the Cartesian coordinate system, with uniform spacing applied across all computational directions. All relevant variables are stored on a collocated grid architecture. Following the discretization process, the governing Equation (1) can be reformulated as  
\[\frac{u_{i}^{n+1}-u_{i}^{n}}{\triangle t}+c\frac{u_{i}^{n}-u_{i-1}^{n}}{ \triangle x}=0 \tag{2}\]  
In Equation (2), \(n\) and \(n+1\) denote two consecutive time steps, while \(i\) and \(i-1\) represent adjacent spatial nodes along the \(x\)-coordinate. The velocity update formula derived from Equation (3) is expressed as  
\[u_{i}^{n+1}=u_{i}^{n}-c\frac{\Delta t}{\Delta x}(u_{i}^{n}-u_{i-1}^{n}) \tag{3}\]  
Here, \(\triangle t\) and \(\triangle x\) denote the temporal and spatial discretization step sizes, respectively. The term \(-c\triangle t/\triangle x\) corresponds to the Courant-Friedrichs-Lewy (CFL) number, denoted as C, which is treated as a predefined constant. Given the initial velocity field at \(t=0\) (note that boundary conditions are not required for the 1D linear convection equation but may be essential for higher-dimensional systems, e.g., 2D convection), the velocity field at any spatial point and time step can be iteratively computed. The solution procedure for the 1D convection equation involves a time-marching loop, where the velocity field at time \(n\) is recurrently updated to \(n+1\). A pseudocode representation of this iterative process is provided in Figure 1.  
As illustrated by the main pseudocode in Figure 1, the CFD algorithm exhibits the following distinctive characteristics:  
* Minimal Arithmetic Complexity. Computational operations are limited to basic arithmetic (addition, subtraction, and multiplication). * High Parallelizability. The absence of control dependencies and structural hazards between spatial nodes enables fully parallel execution. Structural dependencies are resolved by allocating dedicated computational resources to each spatial node. * Strong Data Locality. Data dependencies are localized to adjacent spatial nodes, with minimal requirements for long-range data exchange across multiple grid points. * Stable Data Production-Consumption Pattern. Data generated at step n are exclusively consumed at step n + 1, eliminating the need for high-capacity data storage and reducing memory access frequency. Detailed analysis reveals that these characteristics remain applicable to more complex and higher-order finite difference schemes. In the subsequent sections, we systematically demonstrate how these algorithmic properties are exploited to design a specialized accelerator architecture optimized for CFD.