Summary of the invention
The object of the invention is to overcome the deficiency of above-mentioned prior art, a kind of SAR imaging signal deal with data transposition method based on FPGA is provided, realize " hardware " transposition, so that the operation of CTM system is more stable, power consumption is lower, speed is faster, efficient is higher, with the complete requirement that can satisfy the real-time image processing transpose storage.
The technical thought that realizes the object of the invention is, based on " matrix is cut apart " thought, large matrix is divided into minor matrix, respectively for the matrix-block of the matrix-block of diagonal pattern, symmetrical non-diagonal pattern, the matrix-block of asymmetric non-diagonal pattern, utilize the DDRII sdram controller design of FPGA and the RAM resource of FPGA inside, implementation step comprises as follows:
(1) with SAR imaging signal deal with data by distance to importing continuously FPGA into from front end, deposit data in DDRII SDRAM storer by FPGA again, form matrix data;
(2) matrix data in the DDRII SDRAM storer being carried out matrix cuts apart:
(2a) take 64 * 64 minor matrix pieces as unit, the diagonal by square formation marks off the symmetric pattern matrix-block with matrix data;
(2b) take 64 * 64 minor matrix pieces as unit, as axis of symmetry, matrix data is marked off symmetrical non-diagonal pattern matrix-block with the diagonal line of square formation;
(2c) take 64 * 64 minor matrix pieces as unit, mark off asymmetric non-diagonal pattern matrix-block with removing square formation residual matrix data in addition;
(3) the RAM memory resource among the use FPGA, deposit unit diagonal pattern matrix-block data in RAM, utilize the address saltus step to read data among the RAM every 64 addresses, the unit's of finishing diagonal pattern matrix-block Data in Azimuth Direction and distance realize the transpose process of diagonal pattern matrix-block to data-switching;
(4) transpose process of symmetrical non-diagonal pattern matrix-block:
(4a) the symmetrical non-diagonal pattern matrix-block of the unit more than the square formation diagonal line laterally is divided into two equal semi-identity matrix pieces, the more symmetrical non-diagonal pattern matrix-block of the unit below the square formation diagonal line vertically is divided into two equal semi-identity matrix pieces;
(4b) the RAM memory resource among the use FPGA, deposit RAM in horizontal semi-identity matrix blocks of data with vertical semi-identity matrix blocks of data of its symmetry, utilize the address saltus step to read data among the RAM every 32 addresses first, be written in the horizontal semi-identity matrix piece, read data among the RAM every 64 addresses again, be written in vertical semi-identity matrix piece, finish horizontal semi-identity matrix blocks of data and with the vertical semi-identity matrix blocks of data conversion of its symmetry;
(5) when distance is unequal to sampling number to sampling number and orientation, use the RAM memory resource among the FPGA, deposit the asymmetric non-diagonal pattern matrix-block data of unit in RAM, utilize the address saltus step to read data among the RAM every 64 addresses, the asymmetric non-diagonal pattern matrix-block Data in Azimuth Direction of the unit of finishing and distance realize the transpose process of asymmetric non-diagonal pattern matrix-block to data-switching; Otherwise do not need to carry out the transpose process of asymmetric non-diagonal pattern matrix-block;
(6) after transposition is finished, carry out reset operation, in order to again carry out transpose process;
(7) with the data after transposition is finished dealing with in the DDRII SDRAM storer, as requested by FPGA by the orientation to reading.
The present invention compared with prior art has the following advantages:
One, the present invention is owing to passing through, so that the operation of transpose memory CTM system is more stable, power consumption is lower, speed is faster, efficient is higher.
The FPGA of current main-stream together with the powerful fixed-point processing ability of data flow-based, makes FPGA be a dark horse in the signal process field because its inside is integrated with a large amount of multipliers, RAM even processor core.Simultaneously, FPGA has the product of army's grade, the FPGA that can satisfy the extreme environments such as Aero-Space carries out SAR imaging signal deal with data transposition system level and uses, particularly to carry out SAR imaging signal deal with data transposition by DSP, FPGA has more hardware resource and can utilize, and processing speed is faster, and dirigibility is better, improve the real-time of whole system, realized " hardware " transposition.
They are two years old, because the present invention adopts " matrix is cut apart " thought, the front end matrix data is divided into equal-sized minor matrix piece, and carry out transpose process according to diagonal pattern, symmetrical non-diagonal pattern and asymmetric non-diagonal pattern, avoided all continuously DDRII SDRAM storer being carried out the read-write operation of inter-bank at every turn, only have few action need continuously the different rows of same bank to be operated, so with respect to using three-leaf type, improved greatly the work efficiency of DDRIISDRAM storer.
They are three years old, according to the distance of Radar Imaging Processing data to the orientation all be 2 n power to counting, the present invention uses 64 * 64 minor matrix pieces as unit, can both satisfy 64 integral multiple so that the vertical and horizontal of matrix are counted, in all SAR imaging rudimentary algorithms, can both use this module to carry out transpose process like this.
They are four years old, because the present invention has carried out piecemeal and the RAM resource of using among the FPGA to matrix, so that read-write storage and the matrix transpose operation of data all only needed to use one group of DDRII SDRAM storer just can realize, greatly the steering logic of DDRII SDRAM storer is utilized, so that in the SAR Real Time Image System, control simultaneously two groups of DDRII SDRAM storeies by a slice FPGA, for continuous data stream, control in turn receive data and carry out transpose process of two groups of DDRII SDRAM storeies by FPGA, can form line production, to reach the effect of real-time processing.
Embodiment
The present invention will be further described below in conjunction with accompanying drawing.
The present invention carries out transposition by FPGA to SAR imaging signal deal with data, and employed fpga chip is StratixIII EP3SL340H1152I3, perhaps uses StratixII EP2S90F1020I4 model, but is not limited to these two kinds.
With reference to Fig. 1, implementation step of the present invention is as follows:
Step 1. by apart to importing continuously FPGA into from front end, deposits SAR imaging signal deal with data in DDRII SDRAM storer by FPGA with data again, forms matrix data.
Because the throughput of user side and DDRII SDRAM storer end is different, this step mainly is to call that asynchronous FIFO memory carries out caching process to data among the FPGA, realize simultaneously FIFO two ends clock synchronously.
Step 2. is carried out matrix with the matrix data in the DDRII SDRAM storer and is cut apart.
With reference to Fig. 2, being implemented as follows of this step:
(2a) take 64 * 64 minor matrix pieces as unit, the diagonal by square formation marks off the symmetric pattern matrix-block with matrix data;
(2b) take 64 * 64 minor matrix pieces as unit, as axis of symmetry, matrix data is marked off symmetrical non-diagonal pattern matrix-block with the diagonal line of square formation;
(2c) take 64 * 64 minor matrix pieces as unit, mark off asymmetric non-diagonal pattern matrix-block with removing square formation residual matrix data in addition;
The front end matrix data is divided into equal-sized 64 * 64 minor matrix pieces, the distance of SAR imaging signal deal with data is compared to sampling number to sampling number and orientation, consist of square formation with both medium and small counting as the limit, and determine it is to use two kinds of patterns or three kinds of patterns through more resulting result, when distance equates to sampling number to sampling number and orientation, carry out transpose process by diagonal pattern and symmetrical non-diagonal pattern; Unequal to sampling number to sampling number and orientation when distance, carry out transpose process by diagonal pattern, symmetrical non-diagonal pattern and asymmetric non-diagonal pattern.
Step 3. is used the RAM memory resource among the FPGA, deposit unit diagonal pattern matrix-block data in RAM, utilize the address saltus step to read data among the RAM every 64 addresses, the unit's of finishing diagonal pattern matrix-block Data in Azimuth Direction and distance realize the transpose process of diagonal pattern matrix-block to data-switching.
The RAM resource of this step among the FPGA, the size of RAM is 64 * 64, and the matrix-block of diagonal pattern is processed, and namely the white matrix piece among Fig. 2 is handled as follows:
At first, first 64 * 64 fritter matrix data read in RAM by row from DDRII SDRAM storer;
Then, utilize the address saltus step every 64 addresses RAM being jumped and read, from zero-address, every 64 address read-outing datas, after jumping to address 4032, turn back to address 1, circulation is until read the data of last address successively.The data of reading are deposited in the DDRII SDRAM storer by row again, deposit the position of position for reading this matrix-block before in, namely finish the transpose process to this minor matrix piece;
At last, carry out the transpose process of next diagonal angle minor matrix piece.Except unit diagonal pattern matrix-block data being deposited in RAM and reading the continued operation of data to the address among the RAM, also needing has the following address jump operation during this time:
Forward the start address of next line to from last address of unit matrix piece delegation;
The start address of getting back to this unit matrix piece from last address of unit matrix piece;
Forward the start address of next unit matrix piece to from last address of unit matrix piece.
The transpose process of the symmetrical non-diagonal pattern matrix-block of step 4..
(4a) the symmetrical non-diagonal pattern matrix-block of the unit more than the square formation diagonal line laterally is divided into two equal semi-identity matrix pieces, again the symmetrical non-diagonal pattern matrix-block of the unit below the square formation diagonal line vertically is divided into two equal semi-identity matrix pieces, such as Fig. 2 backslash line matrix-block;
(4b) the RAM memory resource among the use FPGA, deposit RAM in horizontal semi-identity matrix blocks of data with vertical semi-identity matrix blocks of data of its symmetry, utilize the address saltus step to read data among the RAM every 32 addresses first, be written in the horizontal semi-identity matrix piece, read data among the RAM every 64 addresses again, be written in vertical semi-identity matrix piece, finish horizontal semi-identity matrix blocks of data and with the vertical semi-identity matrix blocks of data conversion of its symmetry;
Use the RAM memory resource in the step 3, the matrix-block of the non-diagonal pattern of symmetry processed, namely the backslash line matrix-block among Fig. 2 is handled as follows:
At first, the symmetrical non-diagonal pattern matrix-block of unit more than the square formation diagonal line laterally is divided into two equal semi-identity matrix pieces, again the symmetrical non-diagonal pattern matrix-block of the unit below the square formation diagonal line vertically is divided into two equal semi-identity matrix pieces, the order that reads and writes data under this pattern and position are the data of reading continuously minor matrix piece 1 by row first, the data of reading continuously minor matrix piece 4 by row again;
Then, the data of utilizing the address saltus step to read the medium and small matrix-block 4 of RAM every 32 addresses first are written in the horizontal minor matrix piece 1 data of reading the medium and small matrix-block 1 of RAM every 64 addresses again, be written in vertical minor matrix piece 4, namely finish the transpose process to minor matrix piece 1 and minor matrix piece 4;
Then, by going the data of reading continuously minor matrix piece 2, the data of reading continuously minor matrix piece 5 by row again, with the first data of reading the medium and small matrix-block 5 of RAM every 32 addresses of address saltus step, be written in the horizontal minor matrix piece 2, the data of reading the medium and small matrix-block 2 of RAM every 64 addresses again are written in vertical minor matrix piece 5, finish the transpose process to minor matrix piece 2 and minor matrix piece 5; Finish the transpose process of minor matrix piece 3 and minor matrix piece 6 with same operation;
Then, by going the data of reading continuously minor matrix piece 1a, the data of reading continuously minor matrix piece 4a by row again, with the first data of reading the medium and small matrix-block 4a of RAM every 32 addresses of address saltus step, be written among the horizontal minor matrix piece 1a, the data of reading the medium and small matrix-block 1a of RAM every 64 addresses again are written among vertical minor matrix piece 4a, finish the transpose process to minor matrix piece 1a and minor matrix piece 4a; Finish again the transpose process of minor matrix piece 2b and minor matrix piece 5b according to aforesaid operations, the transpose process of minor matrix piece 3c and minor matrix piece 6c; Finish the transpose process of symmetrical non-all minor matrix pieces of diagonal pattern matrix-block with same operation, as shown in Figure 3.
Step 5. is when distance is unequal to sampling number to sampling number and orientation, use the RAM memory resource among the FPGA, deposit the asymmetric non-diagonal pattern matrix-block data of unit in RAM, utilize the address saltus step to read data among the RAM every 64 addresses, the asymmetric non-diagonal pattern matrix-block Data in Azimuth Direction of the unit of finishing and distance realize the transpose process of asymmetric non-diagonal pattern matrix-block to data-switching; Otherwise do not need to carry out the transpose process of asymmetric non-diagonal pattern matrix-block.
This step is identical with step 3, has also called the RAM resource among the FPGA, and the size of RAM is 64 * 64, and the matrix-block of asymmetric non-diagonal pattern is processed, and namely the twill matrix-block among Fig. 2 is handled as follows:
At first, first 64 * 64 fritter matrix data read in RAM by row from DDRII SDRAM storer;
Then, utilizing the address saltus step every 64 addresses RAM being jumped reads, the data of reading are deposited in the DDRII SDRAM storer by row again, deposit the position in for reading this matrix-block by the matrix-block position of diagonal line symmetry before, namely finish the transpose process to this minor matrix piece;
At last, carry out the transpose process of next asymmetric non-diagonal angle minor matrix piece.
After step 6. transposition is finished, the component register sum counter is carried out the software reset, so that can correctly finish based on the SAR imaging signal deal with data transposition of FPGA next time.
Step 7. is the data after transposition is finished dealing with in the DDRII SDRAM storer, as requested by FPGA by the orientation to reading.
Because the throughput of user side and DDRII SDRAM storer end is different, this step mainly is to call that asynchronous FIFO memory carries out caching process to data among the FPGA, realize simultaneously FIFO two ends clock synchronously.
Effect of the present invention can further specify by following actual measurement
1. verify and the actual measurement condition
When functional simulation, because testing efficiency is excessively low during the excessive so that emulation of data volume, be 128 so adopt during emulation the orientation of input data to count to sampled data, it is 192 that distance is counted to sampled data, namely the input data matrix piece is 192 * 128 matrix.Design input data is: the data of the first row are that the data of 128 1, the second row are 128 2, produce by that analogy 192 row data, and the data of last column are 128 192.
Input partial data when board level test, counting to sampled data in the orientation is 4096, and it is 512 that distance is counted to sampled data, and namely the input data matrix piece is 512 * 4096 matrix.Design input data is: the data of the first row are 1~4096 4096 continuous number, and the data of the second row also are 1~4096 4096 continuous numbers, and each provisional capital is 1~4096 4096 continuous number, altogether 512 row by that analogy.
2. verify and measured result
2A) checking input data matrix 192 * 128 is 128 * 192 through resulting data matrix behind the transposition, the result as shown in Figure 4, wherein Fig. 4 (a) is the input data before the transpose process, the data that explanation writes from FPGA in every delegation of DDRIISDRAM are identical, and the data of every delegation all increase progressively; Fig. 4 (b) is the first row input data before the transpose process; Fig. 4 (c) is the data of exporting from DDRII SDRAM storer after the transpose process, the output data are that the data of the first row are 1~192 192 continuous number after the transpose process, the second row also is 1~192 192 continuous number, each provisional capital is 1~192 192 continuous number by that analogy, 128 row altogether, data in the every delegation of data that explanation is exported in the DDRII SDRAM storer all increase progressively, namely after the transpose process the data matrix be 128 * 192.By functional simulation, can find out that from this three width of cloth figure this matrix transpose module finished the transposition function of data.
2B) checking input data matrix 512 * 4096 is 4096 * 512 through resulting data matrix behind the transposition, the result as shown in Figure 5 and Figure 6, wherein Fig. 5 (a) is the input data before the transpose process; Fig. 5 (b) is the front end enlarged drawing of Fig. 5 (a), illustrates that the input data are to increase progressively since 1; Fig. 5 (c) is the rear end enlarged drawing of Fig. 5 (a), illustrates that the input data increase progressively until 4096 since 1; Fig. 6 (a) is the data of exporting from DDRII SDRAM storer after the transpose process; Fig. 6 (b) is the first row data of exporting from DDRII SDRAM storer after the transpose process; Fig. 6 (c) be after the transpose process from last column data of DDRII SDRAM storer output, illustrate that exporting data after the transpose process is that the value of the first row is 512 1; 512 2 of the second behaviors produce 4096 row data by that analogy, and last column is 512 4096, and namely getting the data matrix after the transpose process is 4096 * 512.From Fig. 5 and Fig. 6 as seen, the present invention can realize the SAR imaging signal deal with data transposition based on FPGA.