# An Efficient On-Chip Data Storage and Exchange Engine for Spaceborne SAR System
## 3 The Data Storage and Exchange Method Based on Superscalar Pipeline
### The Three-Dimensional Cross-Mapping Method Based on Equal Division of Sub-Matrix with Dual-Channel
#### 3.1.3 Address Mapping Strategy  
According to the mapping method proposed above, this section will describe the address mapping strategy that is used. Address mapping refers to the process of obtaining the physical storage address \((i,j,k)\) in DDR3 SDRAM for any given coordinate address \((x,y)\) within the SAR data matrix. The data points whose coordinates are \((x,y)\) in the two-dimensional data matrix can be explicitly distributed to the sub-matrix \(A_{m,n}\). Assume that the coordinates in this submatrix are \((a,b)\). The relationship between \((a,b)\) and \((x,y)\) is as follows. \[ \begin{cases}a=x-m\times N_{a}\\ b=y-n\times N_{r}\end{cases}  \tag{9}\]  
Among them, \(0\leq m\leq M-1\), \(0\leq n\leq N-1\), \(0\leq a\leq N_{a}-1\), \(0\leq b\leq N_{r}-1\), satisfying \(M\times N_{a}=N_{A}\), \(N\times N_{r}=N_{R}\). According to the three-dimensional cross-mapping method based on an equal division of the sub-matrix with dual-channel DDR3, the mapping  
Figure 7: Schematic diagram of sub-matrix equal division cross-mapping with dual channel. relationship between the two-dimensional matrix coordinate address \((x,y)\) and the DDR3 physical address \((i,j,k,z)\) is shown in the following formula. \[\left\{ \begin{aligned} & i=floor((m\times N+n)/B_{n})\\ & j=floor(floor(a/2)/2)\times 2N_{r}+2b+mod(a,2)\\ & k=mod(m+n,B_{n})\end{aligned} \right. \tag{10}\]  
\(floor(p)\) means to return the largest integer less than or equal to \(p\); \(mod(p,q)\) denotes the remainder of \(p/q\). i, j, k are the rows, columns, and banks in the DDR3. Through the above formula, the storage physical address corresponding to all data coordinate addresses of the two-dimensional matrix can be calculated, but the calculation is large and complicated. We found that, for the SAR two-dimensional data matrix, the jump of the coordinate address \((x,y)\) has a continuous and simple law when performing continuous data access operations in the range or azimuth direction. There is also a certain relationship between the physical addresses of the DDR3 SDRAM of the two adjacent data accesses. Therefore, the coordinate address of the currently accessed data can be obtained by adding a regular coordinate offset to the coordinate address of the previous data. Due to the burst transmission characteristics of DDR3 SDRAM, we found that many data points in the two-dimensional matrix do not need to calculate their corresponding physical storage addresses. Eight pieces of data in a burst transmission are accessed using the same unique address. Taking the divided sub-matrix in Figure 8 as an example, the eight adjacent data points with the same color are the data of the same burst transmission. However, the physical storage addresses of these eight data points do not all need to be calculated. Only the physical storage addresses of the data points marked by the circle or triangle in the following figure are needed to store the eight data points into DDR3 at one time. Since the sub-matrix must be mapped equally to two DDR3 SDRAM, the circular representation uses the DDR3A physical mapping address of the data point as a burst transmission address, and the triangular representation uses the DDR3B physical mapping address of the data point as a burst transmission address. Because the addresses mapped to DDR3A and DDR3B are completely independent, the above-mentioned sub-matrix of \(N_{a}=64\) and \(N_{r}=32\) can be regarded as a combination of two sub-matrices corresponding to DDR3A and DDR3B respectively. The size of two sub-matrices is \(N_{a}/2=32\) and \(N_{r}=32\). Next, the address mapping conversion will be performed on the \(32\times 32\) sub-matrix mapped to DDR3A. Assuming that the coordinates of the data points in the sub-matrix  
Figure 8: Schematic diagram of sub-matrix address mapping. are \(P(a,b)\), accessing the data of point \(P\) is actually accessing the address of point \(p^{\prime}(a^{\prime},b^{\prime})\). The calculation formula of point \(p^{\prime}(a^{\prime},b^{\prime})\) is as follows. \[