A data processing method and device based on two-dimensional systolic array

Through the data processing method based on the two-dimensional pulsating array, combined with the target control algorithm and the processing of the register group, the problem of low data processing efficiency in the prior art is solved, and more efficient data processing is achieved.

CN115017452BActive Publication Date: 2025-04-11SHENZHEN STATE MICROELECTRONICS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210499739.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-09
Publication Date
2025-04-11
Estimated Expiration
2042-05-09

AI Technical Summary

Technical Problem

In the prior art, the method of processing data through a single floating point leads to low data processing efficiency.

Method used

The data processing method based on the two-dimensional pulsating array is adopted. By obtaining the operation type of the to-process data, the target control algorithm is determined, and the to-process data is input into the preset register group, the data processing is performed according to the target control algorithm, and the data processed is finally calculated through the two-dimensional pulsating array to determine the calculation result of the to-process data.

Benefits of technology

The data processing is processed through two-dimensional pulsating arrays, which significantly improves the efficiency of data processing and can process data of various types of operations more effectively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115017452B_ABST
    Figure CN115017452B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of data processing technology, and provides a data processing method and device based on a two-dimensional systolic array. In the embodiment of the present application, the operation type of the data to be processed is obtained, and the target control algorithm is determined according to the operation type; the data to be processed is input into a preset register group, and the data to be processed in the register group is processed according to the target control algorithm; the register group after the data processing is calculated by a preset two-dimensional systolic array, and the calculation result of the data to be processed is determined, thereby improving the efficiency of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing technology, and in particular, relates to a data processing method and device based on a two-dimensional systolic array. Background Art

[0002] With the development of society, the needs of relevant users are generally met by processing modern information. In modern information processing, data cannot be processed without different computing methods. For example, in the fields of CNN networks, machine vision, spectral analysis, etc., convolution, filtering and correlation functions are usually used to process data. The existing method of processing data through a single floating point will lead to low data processing efficiency. Summary of the invention

[0003] The embodiments of the present application provide a data processing method and device based on a two-dimensional systolic array, which can solve the problem of low efficiency of data processing.

[0004] In a first aspect, an embodiment of the present application provides a data processing method based on a two-dimensional systolic array, comprising:

[0005] Obtaining the operation type of the data to be processed, and determining the target control algorithm according to the operation type;

[0006] Inputting the data to be processed into a preset register group, and performing data processing on the data to be processed in the register group according to the target control algorithm;

[0007] The register group after data processing is calculated through a preset two-dimensional systolic array to determine the calculation result of the data to be processed.

[0008] In a second aspect, an embodiment of the present application provides a data processing device based on a two-dimensional systolic array, comprising:

[0009] A type acquisition module is used to acquire the operation type of the data to be processed and determine the target control algorithm according to the operation type;

[0010] A data processing module, used for inputting the data to be processed into a preset register group, and performing data processing on the data to be processed in the register group according to the target control algorithm;

[0011] The calculation module is used to calculate the register group after data processing through a preset two-dimensional systolic array to determine the calculation result of the data to be processed.

[0012] In the embodiment of the present application, the operation type of the data to be processed is obtained to determine the current processing method to be performed on the data according to the operation type, and the target control algorithm is determined according to the operation type, that is, the algorithm corresponding to the processing method is determined, so as to input the above-mentioned data to be processed into a preset register group, and further process the data to be processed in the above-mentioned register group according to the above-mentioned target control algorithm, and finally calculate the register group after the above-mentioned data processing through a preset two-dimensional systolic array to determine the calculation result of the above-mentioned data to be processed, so as to improve the efficiency of data processing by processing the data through the two-dimensional systolic array. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0014] Figure 1 It is a first flow chart of a data processing method based on a two-dimensional systolic array provided in an embodiment of the present application;

[0015] Figure 2 is a structural diagram of a data processing system provided in an embodiment of the present application;

[0016] Figure 3 It is a schematic diagram of in-situ replication processing provided by an embodiment of the present application;

[0017] Figure 4 is a schematic diagram of triangulation mapping processing provided in an embodiment of the present application;

[0018] Figure 5 It is a schematic diagram of the overlay triangulation mapping process provided by an embodiment of the present application;

[0019] Figure 6 It is a schematic diagram of a single-line transfer process provided by an embodiment of the present application;

[0020] Figure 7 is a schematic diagram of the mirror image processing provided by an embodiment of the present application;

[0021] Figure 8 It is a schematic diagram of discrete processing provided by an embodiment of the present application;

[0022] Fig. 9 It is a schematic diagram of serial pipeline processing between groups and within groups after discretization provided by an embodiment of the present application;

[0023] Fig.10It is a schematic diagram of serial pipeline processing in the diagonal direction between groups and within groups after discretization provided by an embodiment of the present application;

[0024] Fig.11 It is a schematic diagram of horizontal diffusion processing within a group after discretization provided in an embodiment of the present application;

[0025] Fig.12 is a recovery processing schematic diagram provided in an embodiment of the present application;

[0026] Fig.13 This is a schematic diagram of intra-group diagonal diffusion processing provided by an embodiment of the present application;

[0027] Fig.14 It is a schematic diagram of the inversion process provided by the embodiment of the present application;

[0028] Fig.15 is a schematic diagram of scrolling processing provided in an embodiment of the present application;

[0029] Fig.16 It is a schematic diagram of the intra-group horizontal diffusion processing provided by an embodiment of the present application;

[0030] Fig.17 is a schematic diagram of transposition mapping processing provided by an embodiment of the present application;

[0031] Fig.18 It is a schematic diagram of the flow chart corresponding to the FIR filter control algorithm provided in the embodiment of the present application;

[0032] Fig.19 It is a flow chart corresponding to the second-order cascaded IIR filter control algorithm provided in the embodiment of the present application;

[0033] Fig. 20 It is a schematic diagram of a flow chart corresponding to a control algorithm for calculating an autocorrelation function provided in an embodiment of the present application;

[0034] Fig.21 It is a flow chart corresponding to the control algorithm for cross-correlation function calculation provided in the embodiment of the present application;

[0035] Fig. 22 It is a structural schematic diagram of a data processing device based on a two-dimensional systolic array provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0037] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0038] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0039] Embodiment 1

[0040] Figure 1 FIG. 1 is a flow chart of a data processing method based on a two-dimensional systolic array in an embodiment of the present application. Figure 1 As shown, the above-mentioned data processing method based on the two-dimensional systolic array may include the following steps:

[0041] Step S101: Obtain the operation type of the data to be processed, and determine the target control algorithm according to the operation type.

[0042] In this embodiment, the controller determines in advance the operation type of the data to be processed according to the identification information carried by the data to be processed, that is, what operation is currently required to be performed on the data to be processed, and then determines the corresponding target control algorithm according to the obtained operation type.

[0043] In one embodiment, the target control algorithm includes but is not limited to an FIR filter control algorithm, a one-dimensional convolution control algorithm, a second-order cascaded IIR filter control algorithm, an autocorrelation function calculation control algorithm, and a cross-correlation function calculation control algorithm. The FIR filter control algorithm may be a direct type I FIR filter control algorithm. In this embodiment, the terminal device may implement the algorithm in an accelerated form through a two-dimensional systolic array, thereby offsetting the computational delay caused by the increase in data size. Accelerating the algorithm through a two-dimensional systolic array may enable the computing array to have more acceleration features, thereby more comprehensively meeting user needs.

[0044] In one embodiment, Figure 2 As shown, Figure 22 is a structural diagram of a data processing system, which can implement the above-mentioned data processing method based on a two-dimensional systolic array, and can include a controller 21, a register group 22, a two-dimensional systolic array 23, a high-speed bus 24 and a data storage module 25. The controller 21 is responsible for starting and controlling various components in the data processing system to implement the above-mentioned data processing method based on a two-dimensional systolic array; the register group 22 can be composed of N*N registers, that is, the data can be divided into N groups, each group of N, N is a power of 2, and the register width can be set according to user needs; the two-dimensional systolic array 23 is a rectangular structure, which can be composed of N*N multiplication and addition units of the same type, and the two-dimensional systolic array 23 can be used to calculate matrix bitwise addition, subtraction, multiplication, and matrix multiplication; the high-speed bus 24 inputs or outputs data to the data storage module 25 through a high-speed interconnection; the data storage module 25 is used to store data.

[0045] It can be understood that the register group 22 may include at least one group of register groups. For example, in this embodiment, three groups of register groups with completely identical structures and functions may be used to implement the data processing method based on the two-dimensional systolic array. Specifically, the three groups of register groups are the first register group 221, the second register group 222, and the third register group 223, and the first register group 221 includes register group A and register group BA, the second register group 222 includes register group B and register group BB, and the third register group 223 includes register group C and register group BC. Among them, the register group BA, register group BB, and register group BC can be used to cache data, but are not interconnected with the computing array, that is, equivalent to the cache register group, and the register group A, register group B, and register group C can be used to cache and process data, that is, equivalent to the processing register group.

[0046] Step S102: input the data to be processed into a preset register group, and perform data processing on the data to be processed in the register group according to the target control algorithm.

[0047] In this embodiment, by inputting the data to be processed into the register group, the controller can schedule the register group according to the determined algorithm to realize data processing in the register group or structural change of the register group.

[0048] In one embodiment, the terminal device can determine the processing mode according to the target control algorithm, so that the terminal device can process the data to be processed in the register group according to the processing mode. The processing mode may include but is not limited to in-situ copy processing, triangulation mapping processing, superposition triangulation mapping processing, single-line transfer processing, mirror mapping processing, discrete processing, serial pipeline processing between groups and within groups after discrete processing, serial pipeline processing between groups and within groups in diagonal directions after discrete processing, horizontal diffusion processing within groups after discrete processing, recovery processing, diagonal diffusion processing within groups, inversion processing, scrolling processing, horizontal diffusion processing within groups, and transposition mapping processing.

[0049] Specifically, the above-mentioned in-situ copy processing can be used to copy the data in the cache register group to the processing register group in the same group, and can also be used for processing in reverse, that is, copying the data in the processing register group to the cache register group in the same group, such as Figure 3 As shown, when N is 8, the data of register group BA in the first register group 221 is copied to the register group A in the first register group 221.

[0050] Specifically, the triangulation mapping process can be used to map the first group of data in the cache register group to the processing register group in the same group in the form of a lower right triangular matrix, and can also be processed vice versa, such as Figure 4 As shown, when N is 8, the first group of data in the register group BA in the first register group 221 is mapped to the register group A in the first register group 221 in the form of a lower right triangular matrix.

[0051] Specifically, the above-mentioned superimposed triangulation mapping process can be used to construct a lower right triangular matrix from the first group of data in the cache register group with the current group of data in the cache register group, and map it to the processing register group of the same group, and at the same time construct an upper left triangular matrix with the current group of data in the processing register group and map it to itself, and can also be processed in reverse, such as Figure 5 As shown, when N is 8, starting from the first group of data in register group BA in the first register group 221, the lower right triangular matrix is ​​constructed with the current group data of register group BA and mapped to register group A in the first register group 221, and at the same time, the upper left triangular matrix is ​​constructed with the current group data of register group A and mapped to itself.

[0052] Specifically, the above-mentioned single-line transfer process can be used to transfer any set of data in the cache register group to the corresponding position of the processing register group in the same group, and the data in other positions of the processing register group and the cache register group remain unchanged, and vice versa, such as Figure 6As shown, when N is 8, the fourth row of data in the register group BA in the first register group 221 is transferred to the corresponding position of the register group A in the first register group 221, and the data in other positions of the register group A and the register group BA remain unchanged. Figure 6 The texture area in is a set of data passed.

[0053] Specifically, the mirror mapping process can be used to mirror the data in the cache register group to the processing register group in the same group, or vice versa. Figure 7 As shown, when N is 8, the data in the register set BA in the first register set 221 is mirrored and copied to the register set A in the first register set 221 .

[0054] Specifically, the above discrete processing can be used to heterogeneously configure the cache register group into four groups of register groups with a size of N / 2*N / 2, and the processing register group in the same group can perform the same operation to be discretized into four groups of register groups with a size of N / 2*N / 2. For example, when N is 8, the register group BA in the first register group 221 is heterogeneously configured into four groups of register groups with a size of 4*4, namely ba1, ba2, ba3 and ba4, and the register group A in the first register group 221 is discretized into four groups of register groups with a size of 4*4, namely a1, a2, a3 and a4, as shown in FIG. Figure 8 shown.

[0055] Specifically, the above-mentioned inter-group and intra-group serial pipeline processing after discretization can be used to transfer the data of each register group after discretization by serial pipeline transfer within and between groups at the same time, such as Fig. 9 As shown, when N is 8, the data of each register group a1, a2, a3 and a4 generated by discretizing the register group A in the first register group 221 are simultaneously transferred in serial pipeline within the group and between the groups.

[0056] Specifically, the above-mentioned serial pipeline processing in the diagonal direction between groups and within groups after discretization can be used to simultaneously execute serial pipeline transfer within and between groups along the main diagonal direction for the data on the main diagonal of each register group after discretization. For example, the data on the main diagonal of the register groups ba1, ba2, ba3 and ba4 generated after the register group BA in the first register group 221 is discretized is simultaneously executed serial pipeline transfer within and between groups along the main diagonal direction, such as Fig.10 As shown, Fig.10 The figure shows how the data in ba1 is transferred when N is 8.

[0057] Specifically, the above-mentioned intra-group horizontal diffusion processing after discretization can be used to transfer the data on the main diagonal of each discretized register group simultaneously in the horizontal direction. For example, the data on the main diagonal of the register groups a1, a2, a3 and a4 generated after the register group A in the first register group 221 is discretized are transferred simultaneously in the horizontal direction. Fig.11 As shown, Fig.11 The figure shows how the data in a1 is transferred when N is 8.

[0058] Specifically, the above-mentioned restoration processing can be used to keep the data of each register group generated after the register group is discreted, and reorganize it into the register group before the discreted state according to the original position sequence. For example, the register groups ba1, ba2, ba3 and ba4 generated after the register group BA in the first register group 221 is discreted keep the data unchanged, and reorganize it into the register BA according to the original position sequence, and perform the same operation on the register groups a1, a2, a3 and a4 generated after the register group A in the first register group 221 is discreted, so as to reorganize it into the register A. Fig.12 As shown, Fig.12 The figure shows the recovery process when N is 8.

[0059] Specifically, the above intra-group diagonal diffusion process can be used to copy the data value in the first register on the main diagonal of the register group along the main diagonal direction, such as Fig.13 As shown, the data value in the first register on the main diagonal line of the register group BA in the first register group 221 is copied along the main diagonal line.

[0060] Specifically, the above reversal process can be used to map the data in the cache register group to the processing register group in the same group in a reversed order, or vice versa. Fig.14 As shown, when N is 8, the data of the register set BA in the first register set 221 is mapped to the register set A in the first register set 221 in reverse order.

[0061] Specifically, the above rolling process can be used to roll the data in the cache register group up and down 1 to N times and then map it to the processing register group in the same group, or vice versa. Fig.15 As shown, when N is 8, the data of the register group BA in the first register group 221 is scrolled up and down once and then mapped to the register group A in the first register group 221.

[0062] Specifically, the above-mentioned intra-group horizontal diffusion processing can be used to copy the data in the registers on the main diagonal line of the register group to all the registers in the same line, such as Fig.16As shown, when N is 8, the data in the registers on the main diagonal of register group BA in the first register group 221 are copied to all the registers in the same row.

[0063] Specifically, the above transposition mapping process can be used to map the row elements of each register group after the register group is discretized to the column elements of each register group after the register group of the same type is discretized in a specific way, such as Fig.17 As shown, when N is 8, the row elements of the registers a1, a2, a3 and a4 of the register group A in the first register group 221 are mapped in a specific manner to the column elements of the registers a1_1, a2_1, a3_1 and a4_1 of another group of registers A_1 of the same type that are discretized.

[0064] Step S103: Calculate the register group after data processing by using a preset two-dimensional systolic array to determine the calculation result of the data to be processed.

[0065] In the embodiment of the present application, the operation type of the data to be processed is obtained to determine the current processing method to be performed on the data according to the operation type, and the target control algorithm is determined according to the operation type, that is, the algorithm corresponding to the processing method is determined, so as to input the above-mentioned data to be processed into a preset register group, and further process the data to be processed in the above-mentioned register group according to the above-mentioned target control algorithm, and finally calculate the register group after the above-mentioned data processing through a preset two-dimensional systolic array to determine the calculation result of the above-mentioned data to be processed, so as to improve the efficiency of data processing by processing the data through the two-dimensional systolic array.

[0066] Embodiment 2

[0067] When the target control algorithm is the preset FIR filter control algorithm, such as Fig.18 As shown, the above-mentioned data processing method based on the two-dimensional systolic array includes the following steps:

[0068] In step S102, inputting the data to be processed into the preset register group may include:

[0069] Step S1801, obtain the coefficient length of the filter coefficient.

[0070] In this embodiment, the controller obtains the filter order of the filter coefficient in advance, and then determines the coefficient length of the filter coefficient according to the filter order, that is, the sum of the filter order plus 1 is the coefficient length of the filter coefficient.

[0071] It is understandable that the register group needs to be cleared before obtaining the coefficient length of the filter coefficient in order to execute the FIR filter control algorithm.

[0072] In one embodiment, the coefficient length of the filter coefficient may be compared with the data length of the data to be processed. If the coefficient length of the filter coefficient is greater than the data length of the data to be processed, the length value of the coefficient length is updated to the length value of the data length.

[0073] Step S1802: Determine whether the coefficient length is less than or equal to the number of registers in the register group.

[0074] If so, execute steps S1803 to S1807; if not, execute steps S1808 to S1807.

[0075] In this embodiment, the number of registers is N*N, which can be represented by k.

[0076] Step S1803: group the data to be processed according to a preset granularity to obtain a plurality of first data groups to be processed, wherein the granularity is determined according to the number of registers.

[0077] In this embodiment, the granularity may be k, and the data to be processed is grouped by k according to the order of data arrangement, which is equivalent to dividing the data length of the data to be processed by k to obtain the quotient q1 and the remainder r1, which is equivalent to obtaining q1+1 first data groups to be processed.

[0078] Step S1804: input each first data group to be processed into the register group in sequence.

[0079] In this embodiment, if the current register group can only process one first data group to be processed at a time, the first data groups to be processed are sequentially input into the register group for calculation according to the position of the first data group to be processed, that is, after the result corresponding to the current first data group to be processed is determined, the next first data group to be processed is input into the register group until the calculation of each first data group to be processed is completed. If the current register group can calculate at least two first data groups to be processed at a time, the corresponding number of first data groups to be processed are input according to the number of data groups that can be calculated at present, and the at least two first data groups to be processed are respectively calculated and processed.

[0080] Specifically, the controller can obtain the initial storage position of the data to be processed in the data storage module, and determine the storage position of the first data group to be processed based on the initial storage position of the data to be processed and the data length of the first data group to be processed. The data length of the first data group to be processed is the product of k and the byte length of a single data storage.

[0081] Exemplarily, the controller may input the first data group to be processed currently to be calculated into the register group BB according to the storage location corresponding to the first data group to be processed currently to be calculated.

[0082] Accordingly, in the above step S102, processing the data to be processed in the register group according to the target control algorithm may include:

[0083] Step S1805: input the filter coefficients into the register group.

[0084] In this embodiment, the controller may obtain the initial storage position of the filter coefficient in the data storage module, obtain the filter coefficient according to the initial storage position, and input the filter coefficient into the register group, for example, store the filter coefficient into the register group BA.

[0085] Step S1806: perform data processing on the first to-be-processed data group and the filter coefficients in the register group according to the FIR filter control algorithm.

[0086] In this embodiment, the controller determines at least one processing method among in-situ copy processing, triangulated mapping processing, overlaid triangulated mapping processing, single-line transfer processing, mirror mapping processing and scrolling processing according to the FIR filtering control algorithm; and then performs data processing on the first data group to be processed or the filter coefficient in the register group according to the processing method.

[0087] Accordingly, the above step S103 may include:

[0088] Step S1807, calculating the register group storing the first data group to be processed and the filter coefficients after data processing through a two-dimensional systolic array to obtain a first target result corresponding to the first data group to be processed, thereby determining the calculation result of the data to be processed according to multiple first target results.

[0089] Exemplarily, the first data group to be processed is input into the register group BB, the filter coefficient is stored into the register group BA, and the initial value of the loop variable i is set to 1. The above steps S1806 and S1807 may include the following steps:

[0090] In the first step, a triangulation mapping processing method is determined according to the FIR filter control algorithm, and the data of the i-th row in the register group BB is mapped to the register group B according to the triangulation mapping processing method.

[0091] In the second step, a mirror mapping processing method is determined according to the FIR filter control algorithm, and the data in the register group BA is mapped to the register group A according to the mirror mapping processing method.

[0092] The third step is to calculate the matrix multiplication result of register A and register B through the two-dimensional systolic array, and store the matrix multiplication result in register C, which is equivalent to the formula C=A*B, which can be described by Matlab language.

[0093] In the fourth step, a single-row transfer processing mode is determined according to the FIR filter control algorithm, and the i-th row of the register group C is mapped to the register group BC according to the single-row transfer processing mode.

[0094] Step 5: Determine the rolling processing method according to the FIR filter control algorithm, and map the data in register group BA to register group A by rolling i rounds according to the rolling processing method, and update the value of loop variable i to i+1.

[0095] Step 6: Determine the superposition triangulation mapping processing method according to the FIR filter control algorithm, map the data of the i-th row in register group BB to register group B according to the superposition triangulation mapping processing method, jump to step 3, and execute steps 3 to 6 in a loop. Second-rate.

[0096] In one embodiment, it can be determined whether there is a first to-be-processed data group that has not been processed and calculated according to the q1 value and the r1 value.

[0097] Specifically, when the processing of the current first data group to be processed is completed, the q1 value is judged. When the q1 value is not equal to 0, the q1 value is updated to the q1 value minus 1, and the unprocessed first data group to be processed is processed and calculated again according to the above steps S1804, S1805, S1806 and S1807; when the q1 value is equal to 0, the r1 value is judged. If the r1 value is equal to 0, the calculation ends directly. If the r1 value is not equal to 0, r1 data are moved from the register group BC to the data storage module with the starting address of the calculation result as the first address, and the calculation ends here.

[0098] Inputting the data to be processed into the preset register group in the above step S102 may also include:

[0099] Step S1808: group the filter coefficients according to the granularity to obtain various coefficient groups, and group the data to be processed according to the granularity to obtain multiple second data groups to be processed.

[0100] In this embodiment, the above-mentioned granularity can be k, and the filter coefficients are grouped by k, which is equivalent to dividing the coefficient length of the filter coefficient by k, and obtaining the quotient q2 and the remainder r2, which is equivalent to obtaining q2+1 coefficient groups, and the data to be processed are grouped by k according to the arrangement order of the data, which is equivalent to dividing the data length of the data to be processed by k, and obtaining the quotient q3 and the remainder r3, which is equivalent to obtaining q3+1 second data groups to be processed.

[0101] Step S1809: input each second to-be-processed data group into the register group in sequence based on each coefficient group.

[0102] In this embodiment, the controller can input each coefficient group into the register group, and input each second data group to be processed into the register based on each coefficient group, that is, based on a certain coefficient group, the corresponding results of each second data group to be processed under the coefficient group can be calculated respectively. It can be understood that if the current register group can only process one second data group to be processed at a time, then according to the position of the second data group to be processed, the first data group to be processed is sequentially input into the register group and the register group storing the coefficient group for calculation, that is, after determining the result corresponding to the current second data group to be processed, the next second data group to be processed is input into the register group until all the second data groups to be processed under a certain coefficient group are calculated, and then the next coefficient group is input, and each second data group to be processed is continued to be calculated until all the second data groups to be processed under each coefficient group obtain the corresponding results. If the current register group can calculate at least two second data groups to be processed at a time, the corresponding number of second data groups to be processed is input according to the number of data groups that can be calculated at present, and at least two second data groups to be processed are calculated and processed respectively.

[0103] Specifically, the controller can obtain the initial storage position of the filter coefficient in the data storage module, and determine the storage position of the coefficient group according to the initial storage position of the filter coefficient and the data length of the coefficient group, and the data length of the coefficient group is the product of the word lengths of k data storages. The controller can also obtain the initial storage position of the data to be processed in the data storage module, and determine the storage position of the second data group to be processed according to the initial storage position and the data length of the data to be processed, and the data length of the second data group to be processed is the product of k and the byte length of a single data storage.

[0104] Exemplarily, the controller may input the second data group to be calculated currently into register group BB according to the storage position corresponding to the second data group to be calculated currently; and input the coefficient group to be calculated currently into register group BA according to the storage position corresponding to the coefficient group to be calculated currently.

[0105] Accordingly, in the above step S102, processing the data to be processed in the register group according to the target control algorithm may include:

[0106] Step S1810: perform data processing on the second to-be-processed data group and the coefficient group in the register group according to the FIR filter control algorithm.

[0107] In this embodiment, the controller determines at least one processing method among in-situ copy processing, triangulated mapping processing, overlaid triangulated mapping processing, single-line transfer processing, mirror mapping processing and scrolling processing according to the FIR filtering control algorithm; and then processes the second data group to be processed or the coefficient group in the register group according to the processing method.

[0108] Accordingly, the above step S103 may include:

[0109] Step S1811, calculating the data-processed register groups corresponding to each coefficient group through a two-dimensional systolic array to obtain first target results corresponding to each coefficient group, thereby determining the calculation results of the data to be processed according to multiple first target results.

[0110] Exemplarily, the second data group to be processed is input into register group BB, the coefficient group is stored into register group BA, and the initial value of the loop variable i is set to 1. The above steps S1810 and S1811 may include the following steps:

[0111] In the first step, a triangulation mapping processing method is determined according to the FIR filter control algorithm, and the data of the i-th row in the register group BB is mapped to the register group B according to the triangulation mapping processing method.

[0112] In the second step, a mirror mapping processing method is determined according to the FIR filter control algorithm, and the data in the register group BA is mapped to the register group A according to the mirror mapping processing method.

[0113] The third step is to calculate the matrix multiplication result of register A and register B through the two-dimensional systolic array, and store the matrix multiplication result in register C, which is equivalent to the formula C=A*B, which can be described by Matlab language.

[0114] In the fourth step, a single-row transfer processing mode is determined according to the FIR filter control algorithm, and the i-th row of the register group C is mapped to the register group BC according to the single-row transfer processing mode.

[0115] Step 5: Determine the rolling processing method according to the FIR filter control algorithm, and map the data in register group BA to register group A by rolling i rounds according to the rolling processing method, and update the value of loop variable i to i+1.

[0116] Step 6: Determine the superposition triangulation mapping processing method according to the FIR filter control algorithm, map the data of the i-th row in register group BB to register group B according to the superposition triangulation mapping processing method, jump to step 3, and execute steps 3 to 6 in a loop. Second-rate.

[0117] In one embodiment, it can be determined whether there is a second data group to be processed that has not been processed and calculated based on the q3 value, r3 value, q2 value and r2 value.

[0118] Specifically, when the processing of the current second data group to be processed is completed, the q3 value is updated to q3 value minus 1, and the q3 value is judged. When the q3 value is not equal to 0, the unprocessed second data group to be processed is processed and calculated again according to the above steps S1809, S1810 and S1811.

[0119] When the q3 value is equal to 0, the r3 value is judged. If the r3 value is equal to 0, the storage position of the coefficient group is updated to the storage position of the next coefficient group to facilitate the acquisition of a new round of coefficient groups, and the storage position of the second data group to be processed is updated to the initial storage position to facilitate the input of each second data group to be processed into the register group again, and the storage position for storing the calculation results is updated to the sum of the initial storage position for storing the calculation results and the data length of the current calculation result, the data length of the calculation result is the product of k and the word length of a single data storage, and the q2 value is continued to be judged.

[0120] If the value of r3 is not equal to 0, the storage position of the coefficient group is updated to the storage position of the next coefficient group to facilitate the acquisition of a new round of coefficient groups, and r3 calculation data are moved into the register group BB according to the storage position, and the r3 calculation data are calculated according to the above steps S1809, S1810 and S1811, wherein no new coefficients are moved when executing step S1809, and then the storage position of the coefficient group is updated to the initial value of the coefficient group of the previous cycle, the storage position of the second data group to be processed is updated to the storage position of the next second data group to be processed, and the storage position for storing the calculation results is updated to the sum of the initial storage position of the previous round of storage of the calculation results and the data length of the current calculation result, and the q2 value continues to be judged.

[0121] When judging the q2 value, update the q2 value to the q2 value minus 1, and then judge the q2 value. When q2 is not equal to zero, update the q3 value to the q3 value of the previous round minus 1, update the r3 value to the initial value of r3, and move the k calculation results of the to-be-processed data obtained by the previous round of calculation into the register group C according to the storage location for storing the calculation results, and execute the above steps S1809, S1810, S1811 and the above judgment steps, and each time the above step S1809 is executed, move the k calculation results of the to-be-processed data obtained by the previous round of calculation into the register group C according to the storage location for storing the calculation results; when the q2 value is 0, continue to judge the r2 value.

[0122] When the value of r2 is not equal to 0, the storage position of the coefficient group is updated to the storage position of the next coefficient group, the storage position of the second data group to be processed is updated to the initial storage position of the second data group to be processed, and the storage position for storing the calculation results is updated to the sum of the initial storage position for storing the calculation results in the previous round and the data length of the current calculation results. According to the storage position for storing the calculation results, the calculation results of the data to be processed obtained in the previous round of calculation are moved into the register group C, and the data to be processed and the above calculation results are calculated according to the above steps S1809, S1810 and S1811, wherein no new coefficients are moved when executing step S1809, and the calculation ends here; when r2 is equal to 0, the calculation ends.

[0123] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the second embodiment described above can refer to the corresponding process in the first embodiment, which will not be repeated here.

[0124] Embodiment 3

[0125] When the target control algorithm is a preset one-dimensional convolution control algorithm, inputting the to-be-processed data into the preset register group in the above step S102 may include:

[0126] Obtain the length of a preset first vector. Determine the length of a preset second vector according to the length of the first vector. Call a preset first filter control algorithm, and during the execution of the first filter control algorithm, determine the length of the first vector as the data length of the data to be processed, and determine the length of the second vector as the coefficient length of the filter coefficient. Input the data to be processed into the register group according to the data length and the coefficient length.

[0127] In this embodiment, when the controller obtains the length of the first vector, it can determine the initial storage position for storing the first vector. The controller then obtains the initial length of the second vector in advance, and correspondingly determines the initial storage position for storing the second vector, and pads the end of the second vector with zeros, the number of zeros being the length of vector 1 minus 1, that is, the length of the second vector is m+n-1, where m is the length of the first vector and n is the initial length of the second vector. After determining the first vector and the second vector, the first filtering control algorithm is called to implement the one-dimensional convolution control algorithm. Among them, the above-mentioned first filtering control algorithm can be a direct type I FIR filtering control algorithm.

[0128] It is understandable that the register group needs to be cleared before obtaining the coefficient length of the filter coefficient in order to execute the one-dimensional convolution control algorithm.

[0129] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the third embodiment described above can refer to the corresponding processes in the first and second embodiments, and will not be repeated here.

[0130] Embodiment 4

[0131] When the target control algorithm is the preset second-order cascade IIR filter control algorithm, such as Fig.19 As shown, the above-mentioned data processing method based on the two-dimensional systolic array includes the following steps:

[0132] In the above step S102, inputting the data to be processed into the preset register group may include:

[0133] Step S1901: perform gain amplification on the data to be processed according to the second-order cascade filter coefficients, and perform discrete processing on the register group.

[0134] In this embodiment, the data to be processed are multiplied one by one by the gain coefficient of the second-order cascade filter, that is, the second-order cascade filter coefficient, so as to achieve multiple amplification, obtain the calculation result, and store the calculation result in the corresponding storage location.

[0135] Specifically, when gain amplification is performed on the data to be processed, the initial value of the loop variable i needs to be set to 1, the quotient of the data length of the data to be processed divided by k is q4, and the remainder is r4. When r4 is not 0, q4 is updated to q4+1:

[0136] The first step is to move the first data into register group BA according to the starting address of the second-order cascade filter coefficients.

[0137] In the second step, the intra-group diagonal diffusion processing method is determined according to the preset gain amplification rule, and the first data of the register group BA is diffused to the main diagonal register of the register group BA according to the intra-group diagonal diffusion processing method.

[0138] In the third step, a reversal processing method is determined according to a preset gain amplification rule, and the data in the main diagonal registers of the register group BA are diffused to all registers of the register group BA according to the reversal processing method.

[0139] In the fourth step, an in-situ copy processing method is determined according to a preset gain amplification rule, and the data in the register set BA is mapped to the register set A according to the in-situ copy processing method.

[0140] The fifth step is to move data into register group B with a granularity of k according to the starting address of the data to be processed, and perform matrix bitwise multiplication calculation, which is equivalent to the formula C=A.*B, which can be described by Matlab language.

[0141] The sixth step is to store the calculation result from the register group C in the data storage module according to the preset starting address of the calculation result, and update the storage position of the data to be processed and the storage position of the calculation result. The storage position of the data to be processed is the sum of the previous round address of the data to be processed and the word length of the k data storage, and the storage position of the calculation result is the sum of the previous round address of the calculation result and the word length of the k data storage.

[0142] Step 7: Update the value of loop variable i to i+1, clear register C, and jump to step 5 to execute q4 times.

[0143] In the eighth step, the storage location of the second-order cascade filter coefficients is updated to be the sum of the initial storage location of the second-order cascade filter coefficients and the byte length of the single data storage.

[0144] Specifically, when the register group is discretely processed, it includes: the controller can discretize the register groups A, BA, B, BB, C, and BC into register groups a1, a2, a3, a4; ba1, ba2, ba3, ba4; b1, b2, b3, b4; bb1, bb2, bb3, bb4; c1, c2, c3, c4; bc1, bc2, bc3, bc4 of size k*4 through discrete processing.

[0145] Step S1902: Determine a comparison result between a preset second-order cascade number and a register quantity, and determine a target granularity according to the comparison result.

[0146] Specifically, different ranges can be set according to the number of registers. For example, the first preset range is less than or equal to k / 8; the second preset range is greater than k / 4; and the third preset range is greater than k / 8 and less than or equal to k / 4.

[0147] When the secondary cascade number is within the first preset range, the target granularity is k / 8; when the secondary cascade number is within the second preset range, the target granularity is k / 4, and in addition, the secondary cascade number needs to be grouped according to the target granularity; when the secondary cascade number is within the third preset range, the target granularity is k / 4.

[0148] Step S1903: group the gain-amplified data to be processed according to the target granularity to obtain a plurality of third data groups to be processed.

[0149] Step S1904: input each third data group to be processed into the register group after discrete processing in sequence.

[0150] In one embodiment, the data processing of the to-be-processed data in the register group according to the target control algorithm in the above step S102 may include:

[0151] Step S1905 , performing data processing on the third to-be-processed data group in the register group after the discrete processing according to the second-order cascaded IIR filter control algorithm.

[0152] Specifically, at least one of the following processing methods is determined according to the second-order cascaded IIR filter control algorithm: serial pipeline processing between discrete groups and within groups, serial pipeline processing between discrete groups and in the diagonal direction within groups, horizontal diffusion processing within groups after discreteness, recovery processing, and diffusion processing in the diagonal direction within groups; and data processing is performed on the third data group to be processed in the register group according to the processing method.

[0153] Accordingly, the above step S103 may include:

[0154] Step S1906, controlling the two-dimensional systolic array through a preset enable signal to calculate each data-processed register group to obtain each second target result, wherein the enable signal is determined according to the second-order cascade number; and determining the calculation result of the data to be processed according to the multiple second target results.

[0155] Exemplarily, when the secondary cascade number is in the first preset range, the data to be processed is grouped with a granularity of k / 8, that is, the data length of the data to be processed is divided by k / 8 to obtain the quotient q5 and the remainder r5, and the initial value of the loop variable i is set to 1.

[0156] In the first step, the second-order cascade filter coefficients are moved into register groups a1 and a2 in order according to the storage positions of the second-order cascade filter coefficients.

[0157] The second step is to move k / 8 data to the backup register group bC0 according to the storage location of the calculation result.

[0158] The third step is to determine the serial pipeline processing mode and rolling processing mode between and within the discrete groups according to the second-order cascaded IIR filter control algorithm, and transfer the i-th data pipeline in the backup register group bc0 to C0, the last data pipeline in the register group C1 to the backup register group bc0, the last data pipeline in the register group C2 to the backup register group bc2, and the last data pipeline in the register group C3 to the backup register group bc3 according to the serial pipeline processing mode and rolling processing mode between and within the discrete groups.

[0159] The fourth step is to perform matrix multiplication and subtraction operations through the two-dimensional systolic array, that is, to execute the formulas C0=C0-A0*B0, C1=C1-A1*B1, C2=C2-A2*B2, C3=C3-A3*B3, which can be described by Matlab language.

[0160] The fifth step is to determine the post-discrete intra-group horizontal diffusion processing method according to the second-order cascaded IIR filter control algorithm, and remap the data in the register groups C0, C1, C2, and C3 to C0, C1, C2, and C3 according to the post-discrete intra-group horizontal diffusion processing method.

[0161] The sixth step is to perform matrix multiplication and addition operations through the two-dimensional systolic array, that is, to execute the formulas C0=C0+A0*B0, C1=C1+A1*B1, C2=C2+A2*B2, C3=C3+A3*B3, which can be described by Matlab language.

[0162] In the seventh step, the horizontal diffusion processing method within the discrete group is determined according to the second-order cascade IIR filter control algorithm. According to the horizontal diffusion processing method within the discrete group, the data in the register groups C0, C1, C2, and C3 are mapped to b0, b1, b2, and b3, and the value of the loop variable i is updated to i+1, and the process jumps to the third step. After executing the third to seventh steps k / 8 times in a loop, k / 8 data are moved from the register group bc1 with the storage location of the calculation result as the first address, and the data is stored in the data storage module.

[0163] In the eighth step, the storage location of the calculation result is updated to the sum of the storage location of the previous round of calculation results and the word length of k / 8 data storages, and the value of q5 is updated to q5 minus 1.

[0164] In the ninth step, the q5 value is judged. When the q5 value is not 0, the first step to the eighth step are executed in a loop, but the new second-order cascade filter coefficient is no longer transferred; when the q5 value is 0, the r5 value is judged.

[0165] In the tenth step, when the value of r5 is not 0, execute a round of steps 1 to 8, but no new coefficients are transferred, and the calculation ends here; when the value of r5 is 0, the calculation ends.

[0166] Exemplarily, when the secondary cascade number is in the third preset range, the data to be processed is grouped with a granularity of k / 4, that is, when the data length of the data to be processed is divided by k / 4 to obtain the quotient q6 and the remainder r6, the initial value of the loop variable i is set to 1.

[0167] In the first step, the second-order cascade filter coefficients are moved into register groups a1 and a2 in order according to the storage positions of the second-order cascade filter coefficients.

[0168] The second step is to move k / 4 data to the backup register group bC0 according to the storage location of the calculation result.

[0169] The third step is to determine the serial pipeline processing mode and rolling processing mode between and within the discrete groups according to the second-order cascaded IIR filter control algorithm, and transfer the i-th data pipeline in the backup register group bc0 to C0, the last data pipeline in the register group C1 to the backup register group bc0, the last data pipeline in the register group C2 to the backup register group bc2, and the last data pipeline in the register group C3 to the backup register group bc3 according to the serial pipeline processing mode and rolling processing mode between and within the discrete groups.

[0170] The fourth step is to perform matrix multiplication and subtraction operations through the two-dimensional systolic array, that is, to execute the formulas C0=C0-A0*B0, C1=C1-A1*B1, C2=C2-A2*B2, C3=C3-A3*B3, which can be described by Matlab language.

[0171] The fifth step is to determine the post-discrete intra-group horizontal diffusion processing method according to the second-order cascaded IIR filter control algorithm, and remap the data in the register groups C0, C1, C2, and C3 to C0, C1, C2, and C3 according to the post-discrete intra-group horizontal diffusion processing method.

[0172] The sixth step is to perform matrix multiplication and addition operations through the two-dimensional systolic array, that is, to execute the formulas C0=C0+A0*B0, C1=C1+A1*B1, C2=C2+A2*B2, C3=C3+A3*B3, which can be described by Matlab language.

[0173] In the seventh step, the horizontal diffusion processing method within the discretized group is determined according to the second-order cascaded IIR filter control algorithm. According to the horizontal diffusion processing method within the discretized group, the data in the register groups C0, C1, C2, and C3 are mapped to b0, b1, b2, and b3, and the value of the loop variable i is updated to i+1. Jump to the third step, and after looping the third to seventh steps k / 4 times, k / 4 data are moved from the register group bc1 with the storage location of the calculation result as the first address, and the data is stored in the data storage module.

[0174] In the eighth step, the storage location of the calculation result is updated to the sum of the storage location of the previous round of calculation results and the word length of k / 4 data storages, and the value of q6 is updated to q6 minus 1.

[0175] In the ninth step, the q6 value is judged. When the q6 value is not 0, the first step to the eighth step are executed in a loop, but the new second-order cascade filter coefficient is no longer transferred; when the q6 value is 0, the r6 value is judged.

[0176] Step 10: When the value of r6 is not 0, execute a round of steps 1 to 8, but no new coefficients are transferred, and the calculation ends here; when the value of r6 is 0, the calculation ends.

[0177] Exemplarily, when the secondary cascade number is in the second preset range, the data to be processed is grouped with a granularity of k / 4, that is, the data length of the data to be processed is divided by k / 4 to obtain a quotient q7 and a remainder r7, and then the second-order cascade number is grouped with a granularity of k / 4, that is, the second-order cascade number is divided by k / 4 to obtain a quotient q8 and a remainder r8, and the initial value of the loop variable i is set to 1.

[0178] In the first step, the second-order cascade filter coefficients are moved into register groups a1 and a2 in order according to the storage positions of the second-order cascade filter coefficients.

[0179] The second step is to move k / 4 data to the backup register group bC0 according to the storage location of the calculation result.

[0180] The third step is to determine the serial pipeline processing mode and rolling processing mode between and within the discrete groups according to the second-order cascaded IIR filter control algorithm, and transfer the i-th data pipeline in the backup register group bc0 to C0, the last data pipeline in the register group C1 to the backup register group bc0, the last data pipeline in the register group C2 to the backup register group bc2, and the last data pipeline in the register group C3 to the backup register group bc3 according to the serial pipeline processing mode and rolling processing mode between and within the discrete groups.

[0181] The fourth step is to perform matrix multiplication and subtraction operations through the two-dimensional systolic array, that is, to execute the formulas C0=C0-A0*B0, C1=C1-A1*B1, C2=C2-A2*B2, C3=C3-A3*B3, which can be described by Matlab language.

[0182] The fifth step is to determine the post-discrete intra-group horizontal diffusion processing method according to the second-order cascaded IIR filter control algorithm, and remap the data in the register groups C0, C1, C2, and C3 to C0, C1, C2, and C3 according to the post-discrete intra-group horizontal diffusion processing method.

[0183] The sixth step is to perform matrix multiplication and addition operations through the two-dimensional systolic array, that is, to execute the formulas C0=C0+A0*B0, C1=C1+A1*B1, C2=C2+A2*B2, C3=C3+A3*B3, which can be described by Matlab language.

[0184] In the seventh step, the horizontal diffusion processing method within the discretized group is determined according to the second-order cascaded IIR filter control algorithm. According to the horizontal diffusion processing method within the discretized group, the data in the register groups C0, C1, C2, and C3 are mapped to b0, b1, b2, and b3, and the value of the loop variable i is updated to i+1. Jump to the third step, and after looping the third to seventh steps k / 4 times, k / 4 data are moved from the register group bc1 with the storage location of the calculation result as the first address, and the data is stored in the data storage module.

[0185] In the eighth step, the storage location of the calculation result is updated to the sum of the storage location of the previous round of calculation results and the word length of k / 4 data storages, and the value of q7 is updated to q7 minus 1.

[0186] In the ninth step, the q7 value is judged. When the q7 value is not 0, the first step to the eighth step are executed in a loop, but the new second-order cascade filter coefficient is no longer transferred; when the q7 value is 0, the r7 value is judged.

[0187] In the tenth step, when the value of r7 is not 0, execute a round of steps 1 to 8, but no longer carry new coefficients, then update the value of q8 to q8-1, and judge the value of q8; when the value of r7 is 0, update the value of q8 to q8-1, and judge the value of q8.

[0188] In the eleventh step, the q8 value is judged. When the q8 value is not 0, the storage locations of q7, r7 and the calculation result are updated to the initial value of q7, the initial value of r7 and the initial storage location of the calculation result respectively; the storage location of the second-order cascade filter coefficient is updated to the storage location of the previous round of the second-order cascade filter coefficient and the sum of the word lengths of k / 4 data storages, and the first to eleventh steps are executed in a loop; when the q8 value is 0, the r8 value is judged.

[0189] Step 12. When the value of r8 is not 0, the storage locations of q7, r7 and the calculation result are updated to the initial value of q7, the initial value of r7 and the initial storage location of the calculation result respectively; the storage location of the second-order cascade filter coefficient is updated to the storage location of the previous round of the second-order cascade filter coefficient and the sum of the word lengths of the 16 data storages, and a round of steps 1 to 8 is executed, and the calculation ends here; when the value of r8 is 0, the calculation ends.

[0190] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the fourth embodiment described above can refer to the corresponding processes in the aforementioned first, second and third embodiments, and will not be repeated here.

[0191] Embodiment 5

[0192] When the target control algorithm is a control algorithm for calculating the preset autocorrelation function, such as Fig. 20 As shown, the above-mentioned data processing method based on the two-dimensional systolic array includes the following steps:

[0193] Inputting the data to be processed into the preset register group in the above step S102 may include:

[0194] Step S2001, obtaining a preset vector length of a third vector; wherein the data to be processed includes the third vector.

[0195] Step S2002: Determine whether the vector length is greater than the number of registers in the register group.

[0196] If yes, execute steps S2003 to S2006; if no, execute step S2007 and subsequent steps.

[0197] In this embodiment, the number of registers is N*N, which can be represented by k.

[0198] Step S2003: group the data to be processed according to the number of registers to obtain a plurality of fourth data groups to be processed.

[0199] In this embodiment, the data to be processed are grouped by k according to the order of data arrangement, which is equivalent to dividing the vector length of the data to be processed by k, and obtaining the quotient q9 and the remainder r9, which is equivalent to obtaining q9+1 fourth data groups to be processed.

[0200] Step S2004: input each fourth to-be-processed data group into the register group in sequence.

[0201] In this embodiment, if the current register group can only process one fourth data group to be processed at a time, then the fourth data group to be processed is sequentially input into the register group for calculation according to the position of the fourth data group to be processed, that is, after the result corresponding to the current fourth data group to be processed is determined, the next fourth data group to be processed is input into the register group until the calculation of each fourth data group to be processed is completed. If the current register group can calculate at least two fourth data groups to be processed at a time, the corresponding number of fourth data groups to be processed is input according to the number of data groups that can be calculated at present, and the at least two fourth data groups to be processed are respectively calculated and processed.

[0202] Specifically, the controller can obtain the initial storage position of the data to be processed in the data storage module, and determine the storage position of the fourth data group to be processed based on the initial storage position of the data to be processed and the data length of the fourth data group to be processed. The data length of the fourth data group to be processed is the product of k and the byte length of a single data storage.

[0203] Accordingly, in the above step S102, processing the data to be processed in the register group according to the target control algorithm may include:

[0204] Step S2005: Process the fourth to-be-processed data group in the register group according to the control algorithm for calculating the autocorrelation function.

[0205] In this embodiment, at least one processing method among in-situ copy processing, triangulated mapping processing, superimposed triangulated mapping processing, single-line transfer processing, mirror mapping processing, inversion processing and scrolling processing is determined according to the control algorithm of autocorrelation function calculation; and data processing is performed on the data to be processed in the register group according to the processing method.

[0206] Accordingly, the above step S103 may include:

[0207] Step S2006, calculating the register group storing the fourth data group to be processed after data processing through a two-dimensional systolic array to obtain a first target result corresponding to the fourth data group to be processed, thereby determining the calculation result of the data to be processed according to multiple first target results.

[0208] Exemplarily, the parameters q10 and r10 are set and the value of q10 is equal to q9, and the value of r10 is equal to r9; the initial value of the loop variable i is 1, and the above step S2005 and step S2005 include the following steps:

[0209] The first step is to move the fourth data group to be processed into the register group BA according to the storage location of the fourth data group to be processed.

[0210] The second step is to move the fourth data group to be processed into register group B according to the storage location of the fourth data group to be processed.

[0211] The third step is to determine the rolling processing method according to the control algorithm of the autocorrelation function calculation, and map the data in the register group B to the register group BB according to the rolling processing method.

[0212] The fourth step is to determine the triangulation mapping processing method according to the control algorithm for calculating the autocorrelation function, and map the data of the i-th row in the register group BB to the register group B according to the triangulation mapping processing method.

[0213] The fifth step is to determine the mirror mapping processing method according to the control algorithm for calculating the autocorrelation function, and map the data in the register group BA to the register group A according to the mirror mapping processing method.

[0214] The sixth step is to calculate the matrix multiplication result of register A and register B through the two-dimensional systolic array, which is equivalent to the formula C=A*B, which can be described by Matlab language.

[0215] In the seventh step, a single-row transfer processing mode is determined according to a control algorithm for calculating the autocorrelation function, and the i-th row of the register group C is mapped to the register group BC according to the single-row transfer processing mode.

[0216] Step 8: Determine the intra-group horizontal diffusion processing method according to the control algorithm for calculating the autocorrelation function, and map the data in register group BA to register group A according to the intra-group horizontal diffusion processing method. Update the initial value of loop variable i to i+1, call the data self-processing method or structure change 3 to map the data of the i-th row in register group BB to register group B, jump to step 3, and execute steps 6 to 8 in a loop. Next, k calculation results are moved from register group BC to the data storage module with the storage location of the registered results as the first address, and the value of q9 is updated to q9 minus 1.

[0217] In the ninth step, the q9 value is judged. When the q9 value is not 0, the storage location of the data to be processed is updated to the sum of the previous storage location of the data to be processed and the word length of the k data storages. The first to eighth steps are executed in a loop, but no new coefficient values ​​are moved in. When the q9 value is 0, the r9 value is judged.

[0218] In the tenth step, when the value of r9 is not 0, the storage location of the data to be processed is updated to the sum of the storage location of the data to be processed in the previous round and the word length of the k data storage, and a round of steps one to eight is executed, but no new coefficient values ​​are moved in, the value of q9 is updated to the initial value of q9, and the value of q10 is judged; when the value of r9 is 0, the value of q10 is judged.

[0219] Step 11. When the value of q10 is not zero, set the parameter address, and the parameter address is the initial storage position of the data to be processed. Update the storage position of the data to be processed to the sum of the previous round storage position of the data to be processed and the word length of k data storages. Loop through steps 1 to 11. When the value of q10 is 0, judge the value of r10.

[0220] Step 12: When the value of r10 is not 0, set the parameter address, which is the initial storage location of the data to be processed. The storage location of the data to be processed is updated to the sum of the last round storage location of the data to be processed and the word length of k data storages. Execute steps 1 to 10 in a loop, and the calculation ends after the end of step 10. When the value of r10 is 0, the calculation ends.

[0221] Inputting the data to be processed into the preset register group in the above step S102 may also include:

[0222] Step S2007: input the data to be processed into the register group in sequence.

[0223] Step S2008: Process the data to be processed in the register group according to the control algorithm of the autocorrelation function calculation.

[0224] Step S2009: Calculate the register group storing the data to be processed after the data processing through the two-dimensional systolic array to obtain the calculation result of the data to be processed.

[0225] Exemplarily, the initial value of the loop variable i is set to 1, and the above steps S2006 and S2009 include the following steps:

[0226] The first step is to move the data to be processed into the register group BA according to the storage location of the data to be processed.

[0227] The second step is to move the data to be processed into register group B according to the storage location of the data to be processed.

[0228] The third step is to determine the rolling processing method according to the control algorithm of the autocorrelation function calculation, and map the data in the register group B to the register group BB according to the rolling processing method.

[0229] The fourth step is to determine the triangulation mapping processing method according to the control algorithm for calculating the autocorrelation function, and map the data of the i-th row in the register group BB to the register group B according to the triangulation mapping processing method.

[0230] The fifth step is to determine the mirror mapping processing method according to the control algorithm for calculating the autocorrelation function, and map the data in the register group BA to the register group A according to the mirror mapping processing method.

[0231] The sixth step is to calculate the matrix multiplication result of register A and register B through the two-dimensional systolic array, which is equivalent to the formula C=A*B, which can be described by Matlab language.

[0232] In the seventh step, a single-row transfer processing mode is determined according to a control algorithm for calculating the autocorrelation function, and the i-th row of the register group C is mapped to the register group BC according to the single-row transfer processing mode.

[0233] Step 8: Determine the intra-group horizontal diffusion processing method according to the control algorithm for calculating the autocorrelation function, and map the data in register group BA to register group A according to the intra-group horizontal diffusion processing method. Update the initial value of loop variable i to i+1, call the data self-processing method or structure change 3 to map the data of the i-th row in register group BB to register group B, jump to step 3, and execute steps 6 to 8 in a loop. Next, the calculation result of the data length corresponding to the data to be processed is moved from the register group BC to the data storage module with the storage location of the registration result as the first address, and the value of q9 is updated to q9 minus 1.

[0234] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the fifth embodiment described above can refer to the corresponding processes in the aforementioned first, second, third and fourth embodiments, and will not be repeated here.

[0235] Embodiment 6

[0236] When the target control algorithm is a control algorithm for calculating the preset cross-correlation function, such as Fig.21 As shown, the above-mentioned data processing method based on the two-dimensional systolic array includes the following steps:

[0237] In the above step S102, inputting the data to be processed into the preset register group may include: determining the grouping method of the data to be processed according to the vector lengths of the preset fourth vector and the fifth vector. In the above step S102, the data to be processed includes the fourth vector and the fifth vector. The data to be processed are grouped in a grouping manner to obtain a plurality of fifth data groups to be processed; and each fifth data group to be processed is sequentially input into the register group.

[0238] Accordingly, in the above step S102, data processing of the data to be processed in the register group according to the target control algorithm may include: determining at least one processing method among in-situ copy processing, triangulated mapping processing, superimposed triangulated mapping processing, single-line transfer processing, mirror mapping processing, inversion processing and scrolling processing according to the control algorithm calculated by the cross-correlation function; and performing data processing on the data to be processed in the register group according to the processing method.

[0239] Specifically, after obtaining the vector lengths of the fourth vector and the fifth vector, the method includes:

[0240] Step S2101: Determine whether the vector length of the fourth vector is less than or equal to the number of registers.

[0241] If yes, execute step S2102 and subsequent steps; if no, execute step S2107 and subsequent steps.

[0242] Step S2102: input the data to be processed into a preset register group, perform data processing on the register group according to a control algorithm for calculating a cross-correlation function, and calculate the register group after data processing through a two-dimensional systolic array to obtain a first result.

[0243] Exemplarily, the initial value of the loop variable i is set to 1, and the above step S2102 may include the following steps:

[0244] In the first step, the to-be-processed data of the vector length corresponding to the fifth vector is moved into the register group BA according to the storage position of the fifth vector.

[0245] In the second step, the to-be-processed data of the vector length corresponding to the fourth vector is moved into register group B according to the storage position of the fourth vector.

[0246] The third step is to determine the rolling processing method according to the control algorithm of the cross-correlation function calculation, and map the data in the register group B to the register group BB according to the rolling processing method.

[0247] The fourth step is to determine the triangulation mapping processing method according to the control algorithm for calculating the cross-correlation function, and map the data of the i-th row in the register group BB to the register group B according to the triangulation mapping processing method.

[0248] The fifth step is to determine the mirror mapping processing method according to the control algorithm for calculating the cross-correlation function, and map the data in the register group BA to the register group A according to the mirror mapping processing method.

[0249] The sixth step is to calculate the matrix multiplication result of register A and register B through the two-dimensional systolic array, which is equivalent to the formula C=A*B, which can be described by Matlab language.

[0250] In the seventh step, a single-row transfer processing mode is determined according to a control algorithm for calculating the cross-correlation function, and the i-th row of the register group C is mapped to the register group BC according to the single-row transfer processing mode.

[0251] Step 8: Determine the intra-group horizontal diffusion processing method based on the control algorithm of cross-correlation function calculation, and map the data in register group BA to register group A by i rounds according to the intra-group horizontal diffusion processing method, and update the initial value of loop variable i to i+1. Determine the superposition triangulation mapping processing method based on the control algorithm of cross-correlation function calculation, and map the data of the i-th row in register group BB to register group B according to the superposition triangulation mapping processing method, jump to step 3, and loop through steps 6 to 8 Next, the calculation result of the vector length corresponding to the fifth vector is moved into the data storage module from the register group BC with the storage position of the fifth vector as the starting address. The calculation result is the above-mentioned first result, and the storage position for storing the calculation result is updated to the sum of the initial storage position for storing the calculation result in the previous round and the data length of the current calculation result.

[0252] Step S2103: determine whether the vector length of the fifth vector is less than or equal to the number of registers.

[0253] If yes, execute step S2104; if no, execute steps S2105 to S2106.

[0254] In one embodiment, before step S2103, it also includes: clearing the above-mentioned register group, and updating the storage position of the fourth vector to the initial storage position of the fifth vector, updating the vector length of the fourth vector to the vector length of the fifth vector, updating the storage position of the fifth vector to the initial storage position of the fourth vector, and updating the vector length of the fifth vector to the difference between the vector length of the fourth vector and 1.

[0255] Step S2104: input the data to be processed into a preset register group, perform data processing on the register group according to the control algorithm for calculating the cross-correlation function, and calculate the register group after data processing through a two-dimensional systolic array to determine the calculation result of the data to be processed.

[0256] Exemplarily, the initial value of the loop variable i is set to 1, and the above step S2104 may include the following steps:

[0257] In the first step, the to-be-processed data of the vector length corresponding to the fourth vector is moved into the register group BA according to the storage position of the fourth vector.

[0258] In the second step, the to-be-processed data of the vector length corresponding to the fifth vector is moved into register group B according to the storage position of the fifth vector.

[0259] The third step is to determine the rolling processing method according to the control algorithm of the cross-correlation function calculation, and map the data in the register group B to the register group BB according to the rolling processing method.

[0260] The fourth step is to determine the triangulation mapping processing method according to the control algorithm for calculating the cross-correlation function, and map the data of the i-th row in the register group BB to the register group B according to the triangulation mapping processing method.

[0261] The fifth step is to determine the mirror mapping processing method according to the control algorithm for calculating the cross-correlation function, and map the data in the register group BA to the register group A according to the mirror mapping processing method.

[0262] The sixth step is to calculate the matrix multiplication result of register A and register B through the two-dimensional systolic array, which is equivalent to the formula C=A*B, which can be described by Matlab language.

[0263] In the seventh step, a single-row transfer processing mode is determined according to a control algorithm for calculating the cross-correlation function, and the i-th row of the register group C is mapped to the register group BC according to the single-row transfer processing mode.

[0264] Step 8: Determine the intra-group horizontal diffusion processing method based on the control algorithm of cross-correlation function calculation, and map the data in register group BA to register group A by i rounds according to the intra-group horizontal diffusion processing method, and update the initial value of loop variable i to i+1. Determine the superposition triangulation mapping processing method based on the control algorithm of cross-correlation function calculation, and map the data of the i-th row in register group BB to register group B according to the superposition triangulation mapping processing method, jump to step 3, and loop through steps 6 to 8 Next, the calculation result of the vector length corresponding to the fifth vector is moved from the register group BC to the data storage module with the storage position of the fifth vector as the first address. The calculation result is the calculation result of the above-mentioned data to be processed, and the calculation is completed.

[0265] Step S2105: group the data to be processed.

[0266] Exemplarily, the data to be processed corresponding to the fourth vector are grouped with a granularity of k, that is, the vector length of the fourth vector is divided by k to obtain the quotient q11 and the remainder r11, and the data to be processed corresponding to the fifth vector are also grouped with a granularity of k, that is, the vector length of the fifth vector is divided by k to obtain the quotient q12 and the remainder r12.

[0267] Step S2106: input the grouped data to be processed into a preset register group, process the register group according to the control algorithm for calculating the cross-correlation function, and calculate the register group after the data processing through a two-dimensional systolic array to determine the calculation result corresponding to the data to be processed.

[0268] Exemplarily, the initial value of the loop variable i is set to 1, and the above step S2106 may include the following steps:

[0269] In the first step, the to-be-processed data corresponding to the k fourth vectors are moved into the register group BA according to the storage position of the fourth vector.

[0270] In the second step, the to-be-processed data corresponding to the k fifth vectors are moved into register group B according to the storage position of the fifth vector.

[0271] The third step is to determine the rolling processing method according to the control algorithm of the cross-correlation function calculation, and map the data in the register group B to the register group BB according to the rolling processing method.

[0272] The fourth step is to determine the triangulation mapping processing method according to the control algorithm for calculating the cross-correlation function, and map the data of the i-th row in the register group BB to the register group B according to the triangulation mapping processing method.

[0273] The fifth step is to determine the mirror mapping processing method according to the control algorithm for calculating the cross-correlation function, and map the data in the register group BA to the register group A according to the mirror mapping processing method.

[0274] The sixth step is to calculate the matrix multiplication result of register A and register B through the two-dimensional systolic array, which is equivalent to the formula C=A*B, which can be described by Matlab language.

[0275] In the seventh step, a single-row transfer processing mode is determined according to a control algorithm for calculating the cross-correlation function, and the i-th row of the register group C is mapped to the register group BC according to the single-row transfer processing mode.

[0276] Step 8: Determine the intra-group horizontal diffusion processing method based on the control algorithm of cross-correlation function calculation, and map the data in register group BA to register group A by i rounds according to the intra-group horizontal diffusion processing method, and update the initial value of loop variable i to i+1. Determine the superposition triangulation mapping processing method based on the control algorithm of cross-correlation function calculation, and map the data of the i-th row in register group BB to register group B according to the superposition triangulation mapping processing method, jump to step 3, and loop through steps 6 to 8 Next, k calculation results are moved from register group BC to the data storage module with the storage position of the fourth vector as the first address, and the value of q12 is updated to q12-1.

[0277] In the ninth step, the value of q12 is judged. When the value of q12 is not 0, the storage position of the fourth vector is updated to the sum of the previous storage position of the fourth vector and the word length of the k data storages. The first to eighth steps are executed in a loop, but no new coefficients are moved. When the value of q12 is 0, the value of r12 is judged.

[0278] In the tenth step, when the value of r12 is not 0, the storage position of the fourth vector is updated to the sum of the storage position of the fourth vector in the previous round and the word length of the k data storage, and a round of steps one to eight is executed, but no new coefficients are moved, and then the value of q12 is updated to the initial value of q12, and the value of q11 is judged; when the value of r12 is 0, the value of q11 is judged.

[0279] In the eleventh step, the q11 value is judged. When the q11 value is not 0, the storage position of the fourth vector is updated to the initial storage position of the fourth vector, and the storage position of the fifth vector is updated to the sum of the previous round storage position of the fifth vector and the word length of the k data storages. The first step to the eleventh step are executed in a loop. When the q11 value is 0, the r11 value is judged.

[0280] Step 12: When the value of r11 is not 0, the storage position of the fourth vector is updated to the initial storage position of the fourth vector, and the storage position of the fifth vector is updated to the sum of the storage position of the fifth vector in the previous round and the word length of the k data storages. The first step to the tenth step are executed in a loop, and after the tenth step is completed, the calculation is completed; when the value of r11 is 0, the calculation is completed.

[0281] Step S2107: group the data to be processed.

[0282] Exemplarily, the data to be processed corresponding to the fourth vector is grouped with a granularity of k, that is, the vector length of the fourth vector is divided by k to obtain the quotient q13 and the remainder r13, and the data to be processed corresponding to the fifth vector is also grouped with a granularity of k, that is, the vector length of the fifth vector is divided by k to obtain the quotient q14 and the remainder r14.

[0283] Step S2108: input the grouped data to be processed into a preset register group, perform data processing on the register group according to the control algorithm for calculating the cross-correlation function, and calculate the register group after data processing through a two-dimensional systolic array to obtain a second result.

[0284] Exemplarily, the initial value of the loop variable i is set to 1, and the above step S2108 may include the following steps:

[0285] The first step is to move the to-be-processed data corresponding to the k fifth vectors into the register group BA according to the storage position of the fifth vector.

[0286] In the second step, the to-be-processed data corresponding to the k fourth vectors are moved into register group B according to the storage position of the fourth vector.

[0287] The third step is to determine the rolling processing method according to the control algorithm of the cross-correlation function calculation, and map the data in the register group B to the register group BB according to the rolling processing method.

[0288] The fourth step is to determine the triangulation mapping processing method according to the control algorithm for calculating the cross-correlation function, and map the data of the i-th row in the register group BB to the register group B according to the triangulation mapping processing method.

[0289] The fifth step is to determine the mirror mapping processing method according to the control algorithm for calculating the cross-correlation function, and map the data in the register group BA to the register group A according to the mirror mapping processing method.

[0290] The sixth step is to calculate the matrix multiplication result of register A and register B through the two-dimensional systolic array, which is equivalent to the formula C=A*B, which can be described by Matlab language.

[0291] In the seventh step, a single-row transfer processing mode is determined according to a control algorithm for calculating the cross-correlation function, and the i-th row of the register group C is mapped to the register group BC according to the single-row transfer processing mode.

[0292] Step 8: Determine the intra-group horizontal diffusion processing method based on the control algorithm of cross-correlation function calculation, and map the data in register group BA to register group A by i rounds according to the intra-group horizontal diffusion processing method, and update the initial value of loop variable i to i+1. Determine the superposition triangulation mapping processing method based on the control algorithm of cross-correlation function calculation, and map the data of the i-th row in register group BB to register group B according to the superposition triangulation mapping processing method, jump to step 3, and loop through steps 6 to 8 Next, k calculation results are moved from register group BC to the data storage module with the storage position of the fifth vector as the first address, and the value of q13 is updated to q13-1.

[0293] In the ninth step, the value of q13 is judged. When the value of q13 is not 0, the storage position of the fourth vector is updated to the sum of the previous storage position of the fourth vector and the word length of the k data storages. The first to eighth steps are executed in a loop, but no new coefficients are moved. When the value of q13 is 0, the value of r13 is judged.

[0294] In the tenth step, when the value of r13 is not 0, the storage position of the fourth vector is updated to the sum of the storage position of the fourth vector in the previous round and the word length of the k data storage, and a round of steps one to eight is executed, but no new coefficients are moved, and then the value of q13 is updated to the initial value of q13, and the value of q14 is judged; when the value of r13 is 0, the value of q14 is judged.

[0295] In the eleventh step, the q14 value is judged. When the q14 value is not 0, the storage position of the fourth vector is updated to the initial storage position of the fourth vector, and the storage position of the fifth vector is updated to the sum of the previous round storage position of the fifth vector and the word length of the k data storages. The first step to the eleventh step are executed in a loop; when the q14 value is 0, the r14 value is judged.

[0296] Step 12: When the value of r14 is not 0, the storage position of the fourth vector is updated to the initial storage position of the fourth vector, and the storage position of the fifth vector is updated to the sum of the storage position of the fifth vector in the previous round and the word length of the k data storages. Steps 1 to 10 are executed in a loop, and after the tenth step is completed, step S2103 and subsequent steps are executed; when the value of r14 is 0, step S2103 and subsequent steps are executed.

[0297] It is understandable that after obtaining the second result, step S2103 and subsequent steps need to be executed, so as to determine the calculation result of the data to be processed by associating the first result or the second result with the corresponding results obtained in step S2103 and subsequent steps.

[0298] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the sixth embodiment described above can refer to the corresponding processes in the aforementioned first, second, third, fourth and fifth embodiments, and will not be repeated here.

[0299] Embodiment 7

[0300] Corresponding to the data processing method based on a two-dimensional systolic array described in Embodiment 1, Fig. 22 FIG. 1 is a schematic diagram of a data processing device based on a two-dimensional systolic array in an embodiment of the present application. Fig. 22 As shown, the above-mentioned data processing device based on the two-dimensional systolic array may include:

[0301] The type acquisition module 221 is used to acquire the operation type of the data to be processed and determine the target control algorithm according to the operation type.

[0302] The data processing module 222 is used to input the data to be processed into a preset register group, and perform data processing on the data to be processed in the register group according to the target control algorithm.

[0303] The calculation module 223 is used to calculate the register group after data processing through a preset two-dimensional systolic array to determine the calculation result of the data to be processed.

[0304] In one embodiment, the data processing module 222 may include:

[0305] The first length acquisition unit is used to acquire the coefficient length of the filter coefficient when the target control algorithm is a preset FIR filter control algorithm.

[0306] The first grouping unit is used to group the data to be processed at a preset granularity to obtain multiple first data groups to be processed when the coefficient length is less than or equal to the number of registers in the register group, wherein the granularity is determined according to the number of registers.

[0307] The first data input unit is used to input each first to-be-processed data group into the register group in sequence.

[0308] The coefficient input unit is used to input the filter coefficients into the register group.

[0309] The first data processing unit is used to perform data processing on the first to-be-processed data group and the filter coefficients in the register group according to the FIR filter control algorithm.

[0310] In one embodiment, the data processing module 222 may further include:

[0311] The second grouping unit is used to group the filter coefficients according to the granularity to obtain each coefficient group when the coefficient length is greater than the number of registers, and to group the data to be processed according to the granularity to obtain multiple second data groups to be processed.

[0312] The second data input unit is used to input each second to-be-processed data group into the register group in sequence based on each coefficient group.

[0313] Accordingly, the calculation module 223 may include:

[0314] The first calculation unit is used to calculate the data-processed register groups corresponding to each coefficient group through a two-dimensional systolic array to obtain first target results corresponding to each coefficient group.

[0315] The first result determination unit is used to determine the calculation result of the to-be-processed data according to a plurality of first target results.

[0316] In one embodiment, the data processing unit may include:

[0317] The mode determination subunit is used to determine at least one processing mode among in-situ copy processing, triangulation mapping processing, superposition triangulation mapping processing, single-line transfer processing, mirror mapping processing and scrolling processing according to the FIR filter control algorithm.

[0318] The data processing subunit is used to perform data processing on the first to-be-processed data group or the filter coefficients in the register group according to the processing method.

[0319] In one embodiment, the data processing module 222 may further include:

[0320] The second length acquisition unit is used to acquire the length of the preset first vector when the target control algorithm is a preset one-dimensional convolution control algorithm.

[0321] The first length determining unit is used to determine the length of a preset second vector according to the length of the first vector.

[0322] The second length determination unit is used to call the preset first filtering control algorithm, and determine the length of the first vector as the data length of the data to be processed, and determine the length of the second vector as the coefficient length of the filtering coefficient during the execution of the first filtering control algorithm.

[0323] The third data input unit is used to input the data to be processed into the register group according to the data length and the coefficient length.

[0324] In one embodiment, the data processing module 222 may further include:

[0325] The gain amplification unit is used to perform gain amplification on the data to be processed according to the second-order cascade filter coefficients and perform discrete processing on the register group when the target control algorithm is a preset second-order cascade IIR filter control algorithm.

[0326] The granularity determination unit is used to determine a comparison result between a preset second-order cascade number and the number of registers, and determine a target granularity according to the comparison result.

[0327] The third grouping unit is used to group the gain-amplified data to be processed according to the target granularity to obtain a plurality of third data groups to be processed.

[0328] The fourth data input unit is used to sequentially input each third to-be-processed data group into the register group after discrete processing.

[0329] Accordingly, the calculation module 223 may include:

[0330] The second calculation unit is used to control the two-dimensional systolic array to calculate each data-processed register group through a preset enable signal to obtain each second target result, wherein the enable signal is determined according to the second-order cascade number.

[0331] The second result determination unit is used to determine the calculation results of the data to be processed according to multiple second target results.

[0332] In one embodiment, the data processing module 222 may further include:

[0333] The first mode determination unit is used to determine at least one processing mode among the following: serial pipeline processing between discrete groups and within groups, serial pipeline processing between discrete groups and in the diagonal direction within groups, horizontal diffusion processing within groups after discreteness, recovery processing, and diagonal diffusion processing within groups according to a second-order cascaded IIR filter control algorithm.

[0334] The second data processing unit is used to perform data processing on the third to-be-processed data group in the register group according to the processing method.

[0335] In one embodiment, the data processing module 222 may further include:

[0336] The third length acquisition unit is used to acquire the vector length of a preset third vector when the target control algorithm is a control algorithm of preset autocorrelation function calculation.

[0337] The fourth grouping unit is used to group the data to be processed according to the number of registers to obtain multiple groups of data to be processed when the vector length is greater than the number of registers in the register group.

[0338] The fifth data input unit is used to input each to-be-processed data group into the register group in sequence.

[0339] The second mode determination unit is used to determine at least one processing mode of in-situ replication processing, triangulated mapping processing, superimposed triangulated mapping processing, single-line transfer processing, mirror mapping processing, inversion processing and scrolling processing according to the control algorithm of autocorrelation function calculation.

[0340] The third data processing unit is used to process the data to be processed in the register group according to the processing method.

[0341] In one embodiment, the data processing module 222 may further include:

[0342] The grouping mode determining unit is used to determine the grouping mode of the to-be-processed data according to the preset vector lengths of the fourth vector and the fifth vector when the target control algorithm is a preset control algorithm of cross-correlation function calculation.

[0343] The fifth grouping unit is used to group the data to be processed in groups to obtain multiple fifth data groups to be processed.

[0344] The sixth data input unit is used to input each fifth to-be-processed data group into the register group in sequence.

[0345] The third mode determination unit is used to determine at least one processing mode of in-situ replication processing, triangulated mapping processing, superimposed triangulated mapping processing, single-line transfer processing, mirror mapping processing, inversion processing and scrolling processing according to the control algorithm of cross-correlation function calculation.

[0346] The fourth data processing unit is used to process the data to be processed in the register group according to the processing method.

[0347] In the embodiment of the present application, the operation type of the data to be processed is obtained to determine the current processing method to be performed on the data according to the operation type, and the target control algorithm is determined according to the operation type, that is, the algorithm corresponding to the processing method is determined, so as to input the above-mentioned data to be processed into a preset register group, and further process the data to be processed in the above-mentioned register group according to the above-mentioned target control algorithm, and finally calculate the register group after the above-mentioned data processing through a preset two-dimensional systolic array to determine the calculation result of the above-mentioned data to be processed, so as to improve the efficiency of data processing by processing the data through the two-dimensional systolic array.

[0348] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the above-described device and module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, refer to the relevant description of other embodiments.

[0349] It should be understood that the order of execution of the steps in the above embodiments does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the above embodiments.

Claims

1. A data processing method based on a two-dimensional systolic array, characterized in that: include: Acquiring an operation type of the data to be processed, and determining a target control algorithm according to the operation type; Inputting the data to be processed into a preset register group includes: when the target control algorithm is a preset second-order cascade IIR filter control algorithm, performing gain amplification on the data to be processed according to the second-order cascade filter coefficient, and performing discrete processing on the register group; determining a comparison result between a preset second-order cascade number and the number of registers, and determining a target granularity according to the comparison result; grouping the gain-amplified data to be processed according to the target granularity to obtain a plurality of third data groups to be processed; and sequentially inputting each of the third data groups to be processed into the register group after the discrete processing; Performing data processing on the data to be processed in the register group according to the target control algorithm; The method comprises: calculating the register groups after the data processing by using a preset two-dimensional systolic array to determine the calculation results of the data to be processed, comprising: controlling the two-dimensional systolic array to calculate each register group after the data processing by using a preset enable signal to obtain each second target result, wherein the enable signal is determined according to the second-order cascade number; and determining the calculation results of the data to be processed according to a plurality of the second target results.

2. The data processing method based on a two-dimensional systolic array according to claim 1, characterized in that: The step of inputting the data to be processed into a preset register group includes: When the target control algorithm is a preset FIR filter control algorithm, obtaining the coefficient length of the filter coefficient; When the coefficient length is less than or equal to the number of registers in the register group, grouping the data to be processed at a preset granularity to obtain a plurality of first data groups to be processed, wherein the granularity is determined according to the number of registers; Inputting each of the first to-be-processed data groups into the register group in sequence; Accordingly, data processing is performed on the data to be processed in the register group according to the target control algorithm, including: Inputting the filter coefficients into the register group; Data processing is performed on the first to-be-processed data group and the filter coefficients in the register group according to the FIR filter control algorithm.

3. The data processing method based on a two-dimensional systolic array according to claim 2, characterized in that: The step of inputting the data to be processed into a preset register group further includes: When the coefficient length is greater than the number of registers, the filter coefficients are grouped at the granularity to obtain coefficient groups, and the data to be processed are grouped at the granularity to obtain a plurality of second data groups to be processed; Inputting each of the second to-be-processed data groups into the register group in sequence based on each of the coefficient groups; Accordingly, calculating the register group after the data processing by a preset two-dimensional systolic array to determine the calculation result of the data to be processed includes: Calculating the data-processed register groups corresponding to the coefficient groups through the two-dimensional systolic array to obtain first target results corresponding to the coefficient groups; The calculation result of the data to be processed is determined according to the plurality of the first target results.

4. The data processing method based on a two-dimensional systolic array according to claim 2, characterized in that: The performing data processing on the first to-be-processed data group and the filter coefficients in the register group according to the FIR filter control algorithm includes: Determine at least one processing method among in-situ copy processing, triangulated mapping processing, superimposed triangulated mapping processing, single-line transfer processing, mirror mapping processing and scrolling processing according to the FIR filter control algorithm; Data processing is performed on the first to-be-processed data group or the filter coefficients in the register group according to the processing method.

5. The data processing method based on a two-dimensional systolic array according to claim 1, characterized in that: The step of inputting the data to be processed into a preset register group includes: When the target control algorithm is a preset one-dimensional convolution control algorithm, obtaining a preset length of the first vector; Determine the length of a preset second vector according to the length of the first vector; Calling a preset first filtering control algorithm, and in the process of executing the first filtering control algorithm, determining the length of the first vector as the data length of the data to be processed, and determining the length of the second vector as the coefficient length of the filtering coefficient; The data to be processed is input into the register group according to the data length and the coefficient length.

6. The data processing method based on a two-dimensional systolic array according to claim 1, characterized in that: The performing data processing on the to-be-processed data in the register group according to the target control algorithm comprises: Determine at least one of the following processing methods according to the second-order cascaded IIR filter control algorithm: serial pipeline processing between groups and within groups after discretization, serial pipeline processing between groups and within groups in diagonal direction after discretization, horizontal diffusion processing within groups after discretization, recovery processing, and diffusion processing in diagonal direction within groups; The third to-be-processed data group in the register group is processed according to the processing method.

7. The data processing method based on a two-dimensional systolic array according to claim 1, characterized in that: The step of inputting the data to be processed into a preset register group includes: When the target control algorithm is a preset control algorithm for autocorrelation function calculation, obtaining a vector length of a preset third vector; When the vector length is greater than the number of registers in the register group, grouping the data to be processed according to the number of registers to obtain a plurality of fourth data groups to be processed; Inputting each of the fourth to-be-processed data groups into the register group in sequence; Accordingly, the processing of the to-be-processed data in the register group according to the target control algorithm includes: Determine at least one processing method among in-situ replication processing, triangulated mapping processing, superimposed triangulated mapping processing, single-line transfer processing, mirror mapping processing, inversion processing and scrolling processing according to the control algorithm of the autocorrelation function calculation; The data to be processed in the register group is processed according to the processing method.

8. The data processing method based on a two-dimensional systolic array according to claim 1, characterized in that: The step of inputting the data to be processed into a preset register group includes: When the target control algorithm is a preset control algorithm of cross-correlation function calculation, determining the grouping method of the data to be processed according to the preset vector lengths of the fourth vector and the fifth vector; Grouping the data to be processed in the grouping manner to obtain a plurality of fifth data groups to be processed; Inputting each of the fifth to-be-processed data groups into the register group in sequence; Accordingly, the processing of the to-be-processed data in the register group according to the target control algorithm includes: Determine at least one processing method among in-situ replication processing, triangulated mapping processing, superimposed triangulated mapping processing, single-line transfer processing, mirror mapping processing, inversion processing and scrolling processing according to the control algorithm of cross-correlation function calculation; The data to be processed in the register group is processed according to the processing method.

9. A data processing device based on a two-dimensional systolic array, characterized in that: include: A type acquisition module, used to acquire the operation type of the data to be processed and determine the target control algorithm according to the operation type; A data processing module, used for inputting the data to be processed into a preset register group, comprising: when the target control algorithm is a preset second-order cascade IIR filter control algorithm, performing gain amplification on the data to be processed according to the second-order cascade filter coefficient, and performing discrete processing on the register group; determining a comparison result between a preset second-order cascade number and the number of registers, and determining a target granularity according to the comparison result; grouping the gain-amplified data to be processed according to the target granularity to obtain a plurality of third data groups to be processed; sequentially inputting each of the third data groups to be processed into the register group after discrete processing; performing data processing on the data to be processed in the register group according to the target control algorithm; A calculation module, used for calculating the register group after the data processing through a preset two-dimensional systolic array to determine the calculation result of the data to be processed, comprising: controlling the two-dimensional systolic array to calculate each register group after the data processing through a preset enable signal to obtain each second target result, wherein the enable signal is determined according to the second-order cascade number; and determining the calculation result of the data to be processed according to multiple second target results.

Citation Information

Patent Citations

  • Image data processing method and device, computer equipment and storage medium

    CN111897579A