Reconstruction FIR (Finite Impulse Response) filter for complex real number operation

By designing dynamically switching complex and real number operation modes in the FIR filter, combined with AXI bus and ping-pong storage technology, the problems of low hardware utilization and high power consumption of the existing FIR filter are solved, and efficient complex and real number signals are achieved. processing and flexible switching.

CN118801852APending Publication Date: 2024-10-18NANJING NINGQI INTELLIGENT COMPUTING CHIP RES INST CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410859873.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing FIR filters have large differences in hardware structure when processing complex and real signals, resulting in low hardware utilization, high power consumption, and low storage and data reading efficiency, making it difficult to meet the needs of complex and real mixed signal processing.

Method used

A reconstructed FIR filter for complex real number arithmetic is designed. By dynamically switching the complex number arithmetic mode and the real number arithmetic mode, the hardware is reused. The AXI bus and ping-pong storage technology are used to optimize data transmission and storage, combined with parallel computing and data distribution. module, improving computing efficiency and flexibility.

Benefits of technology

It realizes the multiplexing of complex and real number computing hardware, reduces power consumption, improves hardware utilization and computing efficiency, simplifies the hardware structure, reduces chip area and storage overhead, and adapts to the flexible switching of complex and real number signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118801852A_ABST
    Figure CN118801852A_ABST
Patent Text Reader

Abstract

The invention discloses a reconstruction FIR (Finite Impulse Response) filter for complex real number operation, which belongs to the field of integrated circuits and comprises a control module for generating a control signal; the data transmission module is respectively connected with the AXI bus and the data caching module and is used for controlling data transmission between the AXI bus and the data caching module; the data caching module caches the input data, the filter coefficient and the operation result received from the AXI bus; the data distribution module is respectively connected with the data caching module and the complex real number reconstruction operation module and is used for controlling the data caching module to distribute input data and filter coefficients to the complex real number reconstruction operation module and controlling the complex real number reconstruction operation module to transmit an operation result to the data caching module; and the complex real number reconstruction operation module is used for carrying out parallel complex number or real number operation on the input data received from the data distribution module and transmitting an operation result to the data distribution module. Aiming at high power consumption of an FIR filter in the prior art, the power consumption is reduced through dynamic switching between a complex number operation mode and a real number operation mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of integrated circuits, and more specifically, to a reconstruction FIR filter for complex-real number operations. Background Art

[0002] Finite Impulse Response (FIR) filters are widely used in communication systems, audio processing, image processing and other fields because of their linear phase and simple implementation.

[0003] In the field represented by communication systems, there are both complex signals and pure real signals, and it is necessary to support both complex FIR filtering and real FIR filtering. However, the existing FIR filters are often only optimized for complex or pure real signals during design, which makes it difficult to fully utilize computing resources, resulting in low hardware utilization, large chip area and power consumption.

[0004] Specifically, the operation of FIR filtering is generally a multiplication-accumulation operation, but complex numbers and real numbers have different multiplication-accumulation operations. Complex multiplication-accumulation requires the calculation of the real and imaginary parts separately, while real numbers only need to calculate the real part. In the existing FIR filter design, the hardware structures of complex FIR filters and real FIR filters are quite different, and different operation unit circuits usually need to be designed. It is difficult to reuse the operation units, and the flexibility is poor. In terms of data storage and reading, FIR filtering operations require frequent access to input data and filter coefficients, but the existing FIR filters lack optimization in storage structure and data reading control, and there are problems such as waste of storage space and low reading efficiency, which affects the overall operation performance.

[0005] The Chinese patent application, application number CN202110563708.8, published on July 30, 2021, discloses an efficient LSTM accelerator based on FPGA. The FPGA accelerator includes multiple computing units, storage units and control units. The computing units include matrix-vector multiplication modules and element-wise operation modules. The matrix-vector multiplication module consists of 4*N DSPs and 4 adders. The N DSPs are used for parallel multiplication and accumulation of weight data and input data, and the N multiplication and accumulation results are added to obtain the result vector corresponding to a single gate. At the same time, the multiplication and accumulation operations of the four gates are performed in parallel. The element-wise operation module is used to calculate the cell state value and output data at the current moment. Multiple computing units adopt parallel operation and reuse strategies. The storage unit is used to cache the weight data, input data, output value, and cell state value required for LSTM network calculation. The control unit is used to control the state transition and data flow transmission process of LSTM network calculation. However, the LSTM accelerator in this scheme mainly focuses on the parallel optimization of neural network operations, but the hardware compatibility and flexibility in the mixed operation scenario of complex and real numbers are not considered enough. When processing complex-real mixed signals, existing LSTM accelerators may need to switch different hardware circuits, resulting in increased power consumption and reduced real-time performance. Summary of the invention

[0006] 1. Technical issues to be solved

[0007] In view of the problem of high power consumption of FIR filters for complex and real number operations in the prior art, the present application provides a reconstructed FIR filter for complex and real number operations, which realizes the reuse of complex and real number operation hardware and reduces power consumption by dynamically switching between complex operation mode and real operation mode.

[0008] 2. Technical solution

[0009] The purpose of this application is achieved through the following technical solutions.

[0010] The present specification provides a reconstruction FIR filter for complex-real number operations, including: a control module, which generates a control signal; a data transmission module, which is respectively connected to an AXI bus and a data cache module, and controls the data transmission between the AXI bus and the data cache module; a data cache module, which caches input data, filter coefficients and operation results received from the AXI bus; a data distribution module, which is respectively connected to the data cache module and a complex-real number reconstruction operation module, controls the data cache module to distribute input data and filter coefficients to the complex-real number reconstruction operation module, and the complex-real number reconstruction operation module to transmit the operation results to the data cache module; the complex-real number reconstruction operation module performs parallel complex or real number operations on the input data received from the data distribution module, and transmits the operation results to the data distribution module.

[0011] Among them, AXI bus: Advanced eXtensible Interface bus, is a high-performance, high-bandwidth, low-latency on-chip interconnect bus protocol used to connect various modules in the system on chip (SoC). Filter coefficient: A set of fixed coefficients used to multiply the input data in the FIR filter, which determines the frequency response characteristics of the filter. The number of filter coefficients is the filter order.

[0012] Furthermore, the data transmission module includes: a zero padding unit connected to the AXI bus, receiving an N-point complex or real input data vector from the AXI bus, and adding M-1 zeros at the beginning of the input data, wherein M is the number of filter coefficient points; a data segmentation unit, receiving the zero-padded input data, and performing segmentation processing on the zero-padded input data according to the operation mode; a ping-pong storage control unit, connected to the data segmentation unit and the input data area of ​​the data cache module, receiving the segmented input data, and controlling the ping-pong storage process of the input data in the input data area of ​​the data cache module according to the length of the input data and the operation mode; a filter coefficient storage unit, respectively A filter coefficient area connected to the AXI bus and the data cache module receives an M-point complex or real filter coefficient vector from the AXI bus, and sequentially stores the filter coefficients in the filter coefficient area of ​​the data cache module; an operation result processing unit is respectively connected to the AXI bus and the data cache module, sequentially reads the operation results from the first group of SRAM in the operation result ping-pong area or pong area of ​​the data cache module in a ping-pong manner, and sends the read operation results to the AXI bus; wherein, ping-pong storage refers to a method in which data is sequentially stored in the first half of the storage space in a continuous storage space, and when the data is stored to the end, the data is cyclically stored starting from the second half.

[0013] Among them, N-point complex or real input data vector: a one-dimensional vector composed of N complex or real numbers, representing the input signal sequence of the FIR filter. Input data area: a storage area in the data cache module for storing input data vectors. Filter coefficient area: a storage area in the data cache module for storing filter coefficients. Ping-pong area or pong area: two storage areas of the same size used for ping-pong storage in the data cache module. When one area is used to write data, the other area can be used to read data, thereby achieving seamless data access. SRAM: Static Random Access Memory, a random access memory that is easy to control and has a fast access speed. In the data cache module, SRAM is used to form different storage areas, such as input data area, filter coefficient area and ping-pong area. The input data area includes the input data ping-pong area and the input data pong area, and the operation result area also includes the operation result ping-pong area and the operation result pong area. The first half: refers to the half of the continuous storage units with smaller addresses in the ping-pong storage space, which is usually used for the first writing of data. The second half refers to the half of the continuous storage units with larger addresses in the ping-pong storage space. When the first half is full, data storage will be written cyclically starting from the second half.

[0014] Furthermore, a data segmentation unit receives the zero-padded input data and performs segmentation processing on the zero-padded input data according to the operation mode, including: if the operation mode is the complex mode, the zero-padded input data is evenly divided into k segments; if the operation mode is the real mode, the zero-padded input data is evenly divided into 4k segments. Among them, complex mode: an operation mode of the FIR filter, used to process complex input data. In the complex mode, the input data, filter coefficients and operation results are all in complex form, and the multiplication and accumulation operations need to calculate the real part and the imaginary part respectively. Real mode: another operation mode of the FIR filter, used to process real input data. In the real mode, the input data, filter coefficients and operation results are all in real form, and the multiplication and accumulation operations only need to calculate the real part.

[0015] Furthermore, the ping-pong storage control unit controls the ping-pong storage process of the input data in the input data area of ​​the data cache module according to the length of the input data and the operation mode, including: when the operation mode is a complex mode and the input data does not need ping-pong storage, the ping-pong storage control unit starts from the first segment of input data, sequentially allocates 1 remainder data to each segment of data, and sequentially stores the k segments of data in k groups of SRAM in the input data ping-pong area of ​​the data cache module; when the operation mode is a complex mode and the input data needs ping-pong storage, the ping-pong storage control unit sequentially stores the zero-filled input data from the first group of SRAM in the input data ping-pong area of ​​the data cache module until all SRAMs in the ping-pong area are filled, and then supplements the last M-1 data stored in the ping-pong area to the front end of the remaining input data to form new remaining input data, and continues to perform ping-pong storage control; when the operation mode is a real number mode, the ping-pong storage control unit uses the same control method as the complex mode to perform ping-pong storage control.

[0016] Among them, remainder data: In the data segmentation process, when the input data length cannot be divided by the number of segments, the remaining data is called remainder data. For example, if the input data length is 10 and is to be divided into 3 segments, the first two segments contain 3 data each, and the last segment contains 4 data, of which the last data is the remainder data. In complex number mode, the number of remainder data is at most k-1, and in real number mode, the number of remainder data is at most 4k-1. The data segmentation unit needs to evenly distribute the remainder data to each segment to ensure that the length of each segment data is as equal as possible.

[0017] Furthermore, the data allocation module includes: an input data allocation unit, which takes out data from the input data area of ​​the data cache module in parallel and sequentially and sends it to the complex and real number reconstruction operation module; a filter coefficient allocation unit, which is respectively connected to the filter coefficient area of ​​the data cache module and the complex and real number reconstruction operation module, takes out all the filter coefficients in the filter coefficient area of ​​the data cache module in reverse order and sends them to the complex and real number reconstruction operation module in a broadcast manner; a control unit, which is respectively connected to the input data allocation unit and the filter coefficient allocation unit, and controls the data acquisition method and the number of data acquisitions of the input data allocation unit and the filter coefficient allocation unit according to the operation mode; a result storage unit, which is respectively connected to the operation result area of ​​the complex and real number reconstruction operation module and the data cache module, and stores the operation results of the complex and real number reconstruction operation module in parallel and sequentially to the ping-pong area or the pong area of ​​the operation result area of ​​the data cache module.

[0018] Furthermore, the control unit controls the data acquisition method and the number of data acquisition times of the input data allocation unit and the filter coefficient allocation unit according to the operation mode, including: when the operation mode is the complex mode, the control unit controls the input data allocation unit to start from address 0, and sequentially and in parallel take out M data from the k groups of SRAM in the ping-pong area or pong area of ​​the input data area of ​​the data cache module, and send them to the complex-real reconstruction operation module; controls the filter coefficient allocation unit to take out all the complex coefficients in the filter coefficient area of ​​the data cache module in reverse order and send them to the complex-real reconstruction operation module in a broadcast manner, and performs M times of k parallel complex multiplication and accumulation operations; when the M times of complex multiplication and accumulation operations are completed, the control unit controls the input data allocation unit to add 1 to the starting address of the input data area, and repeats the above acquisition. The control unit controls the input data allocation unit to sequentially obtain sufficient data from the next group of SRAM address 0 until the end of the data in the current ping-pong area or pong area; when except for the last group of SRAM, M multiplication and accumulation operations with the end address of the group as the starting address are completed, and the last group of SRAM completes M multiplication and accumulation operations with the end address of the group as the starting address when no ping-pong is required or M multiplication and accumulation operations with the Mth to last data of the group as the starting address when ping-pong is required, the control unit determines that the FIR filtering operation of the current ping-pong area or pong area is completed.

[0019] Among them, complex multiplication and accumulation operation: In complex mode, the FIR filter performs multiplication and accumulation operations on the input data and the filter coefficient. Assuming that the input data is a complex number x(n)=a+bj, and the filter coefficient is a complex number h(n)=c+dj, the complex multiplication and accumulation operation can be expressed as: y(n)=Σ[x(ni)×h(i)]=Σ[(ac-bd)+j(ad+bc)]. Among them, y(n) is the filter output, Σ represents accumulation, and i is the filter order. The complex multiplication and accumulation operation needs to calculate the real part (ac-bd) and the imaginary part (ad+bc) separately, and accumulate the results. No ping-pong required: When the input data length is not greater than the capacity of the input data area of ​​the data cache module, all input data can be stored in the input data area at one time, and no ping-pong storage is required. In the absence of ping-pong, the FIR filtering operation can be performed continuously until all input data is processed. Ping-pong situation: When the input data length is greater than the capacity of the input data area of ​​the data cache module, the input data needs to be stored in batches in the input data area, and the ping-pong storage method is used. In the case of ping-pong, when the data of one ping-pong area or pong area is processed, the FIR filtering operation needs to wait for the data storage of another ping-pong area or pong area to be completed, and then continue until all the input data is processed. FIR filtering operation: The filtering operation performed by the finite impulse response (FIR) filter on the input data. The FIR filter obtains the filtered output data by multiplying and accumulating the input data and the filter coefficient. The FIR filtering operation can be performed in the time domain or the frequency domain, and its mathematical expression is: y(n) = Σ[x(ni) × h(i)], where x(n) is the input data, h(i) is the filter coefficient, y(n) is the filter output, Σ represents accumulation, and i is the filter order. The FIR filtering operation can realize the frequency selection, noise suppression, waveform shaping and other functions of the input signal.

[0020] Furthermore, when the operation mode is the real number mode, the control unit controls the input data allocation unit, the filter coefficient allocation unit and the result storage unit to perform data allocation and storage in the same control manner as the complex number mode.

[0021] Furthermore, the complex-real number reconstruction operation module comprises: k complex-real number reconstruction operation units, each of which comprises an adder, a multiplier and a data selector; a complex number reconstruction control unit, respectively connected to the data selectors of the k complex-real number reconstruction operation units, and when the operation mode is the complex number mode, each complex-real number reconstruction operation unit is reconstructed and combined into one complex number multiplication-accumulation operation structure by controlling the selection of the data selector, and the k complex-real number reconstruction operation units are reconstructed and combined into k parallel complex number multiplication-accumulation operation structures; a real number reconstruction control unit, respectively connected to the data selectors of the k complex-real number reconstruction operation units, and when the operation mode is the real number mode, each complex-real number reconstruction unit is reconstructed and combined into four real number multiplication-accumulation operation structures by controlling the selection of the data selector, and the k complex-real number reconstruction operation units are reconstructed and combined into 4k real number multiplication-accumulation operation structures.

[0022] Furthermore, the complex-real reconstruction operation unit includes: a multiplier, which receives input data and filter coefficients from a data allocation module and performs a multiplication operation; an adder, which receives the output result of the multiplier and performs different addition operations according to the operation mode: when the operation mode is a complex number mode, some adders receive the output results of two upper multipliers and perform an addition operation; another part of the adders receive the output result of the upper adder and perform an addition operation with the previous output result of the adder; when the operation mode is a real number mode, the adder receives the output result of a upper multiplier and performs an addition operation with the previous output result of the adder; a data selector, which is respectively connected to the adder and the multiplier, selects the output result of the adder as the output of the corresponding complex-real reconstruction operation unit according to the control signal of the complex number reconstruction control unit or the real number reconstruction control unit, and changes the connection between the multiplier and the adder and between the adder and the adder according to the operation mode.

[0023] Furthermore, when the operation mode is a complex mode, each complex-real number reconstruction operation unit is reconstructed and combined into a complex multiplication-accumulation operation structure by controlling the selection of a data selector, including: by controlling the data selector of each complex-real number reconstruction operation unit, the output of the adder of a part of the complex-real number reconstruction operation units is connected to the input of the adder of another part of the complex-real number reconstruction operation units to form a complex multiplication-accumulation operation structure; each complex multiplication-accumulation operation structure is composed of a complex-real number reconstruction operation unit connected according to the data flow direction, and is used to perform complex multiplication-accumulation operations on M complex input data and M complex filter coefficients from a data allocation module to obtain a complex operation result.

[0024] Furthermore, when the operation mode is the real number mode, each complex-real number reconstruction unit is reconstructed and combined into four real number multiplication and accumulation operation structures by controlling the selection of the data selector, including: by controlling the data selector of each complex-real number reconstruction operation unit, the four multipliers and four adders of each complex-real number reconstruction operation unit are connected according to the data flow direction of the real number multiplication and accumulation operation, and combined into four real number multiplication and accumulation operation structures; each real number multiplication and accumulation operation structure is composed of one multiplier and one adder connected according to the data flow direction, wherein the output of the multiplier is connected to one input of the adder, and the other input of the adder is connected to its own previous output, and is used to perform continuous real number multiplication and accumulation operations on M real number input data and M real number filter coefficients from the data allocation module to obtain one real number operation result.

[0025] 3. Beneficial effects

[0026] Compared with the prior art, the advantages of this application are:

[0027] The reconstruction technology is used to realize the reuse of complex number operation and real number operation hardware, thereby improving the hardware utilization rate. The k complex real number reconstruction operation units in the complex real number reconstruction operation module can be dynamically reconstructed according to the control of the complex number reconstruction control unit and the real number reconstruction control unit, and can be combined into k complex number multiplication and accumulation operation structures in the complex number mode and 4k real number multiplication and accumulation operation structures in the real number mode. The reconstruction is realized by controlling the data selector to change the connection relationship between the multiplier and the adder, without adding additional hardware, saving chip area and power consumption.

[0028] The data storage and reading methods are optimized and the hardware structure is simplified through technologies such as zero padding, data segmentation and ping-pong access. The zero padding unit adds M-1 zeros at the beginning of the input data to ensure the correctness of the FIR operation; the data segmentation unit evenly segments the zero-filled input data according to the operation mode to facilitate subsequent parallel operations; the ping-pong storage control unit uses ping-pong access to control the storage of input data in the data cache module, avoiding data overwriting and reducing storage space. These measures effectively reduce hardware complexity and storage overhead.

[0029] The data distribution module adopts parallel sequential data acquisition and filter coefficient broadcasting technologies to improve data distribution and operation efficiency. The input data distribution unit can sequentially retrieve data from the data cache module in parallel; the filter coefficient distribution unit distributes the filter coefficients to all complex and real number reconstruction operation units in a broadcasting manner, which speeds up data distribution. The result storage unit stores the operation results in parallel and sequentially, avoiding serial storage delays. The optimized data distribution and storage process reduces the operation waiting time and gives full play to the parallel operation performance.

[0030] The complex-real reconstruction operation unit adopts a pipeline structure, and realizes the multiplication and accumulation operation of complex and real numbers through the connection combination of multipliers and adders, which has high operation efficiency and reconstruction flexibility. When the operation mode is switched, it only needs to change the internal connection of the operation unit through the data selector to adapt to different operation requirements, without adding additional operation devices, reducing hardware overhead. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a structural diagram of a reconstruction FIR filter for complex real number operation of the present application.

[0032] Figure 2 It is a structural diagram of the complex-real number reconstruction operation unit of the present application.

[0033] Figure 3 It is a schematic diagram of complex number pattern reconstruction of the complex-real number reconstruction operation unit of the present application.

[0034] Figure 4 It is a schematic diagram of real number mode reconstruction of the complex-real number reconstruction operation unit of the present application. DETAILED DESCRIPTION

[0035] The present application is described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0036] Example 1

[0037] First, the operation formula of the FIR filter and the algorithm principle of the reconstruction FIR filter of the complex real number operation of the present application are explained. Assume that the input data is a vector A of N points = [x[0], x[1], ..., x[N-1]], and the filter coefficient is a vector B of M points = [h[0], h[1], ..., h[M-1]]. Then the operation formula of the FIR filter is: Among them, y(n) represents the filtering result of the nth point; M represents the number of filtering coefficient points, that is, the filtering order; h(j) represents the filtering coefficient involved in the calculation of the filtering result of the nth point; x(nj) represents the input data involved in the calculation of the filtering result of the nth point;

[0038] According to the formula, FIR filtering is to perform N+M-1 groups of M multiplication-accumulation operations. Therefore, a complex real number operation reconstruction FIR filter of the present application evenly splits N+M-1 groups of multiplication-accumulation operations into multiple parallel multiplication-accumulation operations, thereby achieving higher operation performance.

[0039] This example discloses a reconstruction FIR filter for complex real number operations, such as Figure 1As shown, it includes: a control module: generates control signals for each module. A data transmission module: controls the data transmission between the AXI bus and the data cache module. A data cache module: temporarily stores input data, filter coefficients and operation results. A data allocation module: controls the data transmission between the data cache module and the complex-real reconstruction operation module. The complex-real reconstruction operation module: can be reconstructed into a complex operation mode or a real operation mode, and performs parallel multiplication and accumulation operations on the input data.

[0040] This embodiment is specifically described with input data being a complex or real vector of N points, filter coefficients being a complex or real vector of M points, and the number of complex and real reconstruction operation units in the complex and real reconstruction operation module being k=2. The data transmission module receives input data from the AXI bus and adds M-1 zeros at the head end of the input data. If the operation mode is a complex mode, when the input data does not need ping-pong, the input data after adding zeros is evenly divided into 2 segments, and 1 remainder data is sequentially allocated to each segment starting from the first segment, and the 2 segments of data are sequentially stored in 2 groups of SRAM in the input data ping-pong area of ​​the data cache module; when the input data needs ping-pong, assuming that data is stored starting from the input data ping-pong area of ​​the data cache module, the data transmission module sequentially stores the input data after adding zeros starting from the first group of SRAM in the input data ping-pong area of ​​the data cache module until all SRAMs in the ping-pong area are filled, and the M-1 data stored at the end of the ping-pong area are added to the front end of the remaining input data. If the remaining input data after the data is supplemented does not need ping-pong, the remaining data is input to the data cache module in the data pong area according to the situation that no ping-pong is required. If the remaining input data after the data is supplemented still needs ping-pong, the remaining data is input to the data cache module in the data pong area according to the situation that ping-pong is required, so as to store data in a ping-pong manner. If the operation mode is the real number mode, the data transmission module processes the input data in the same way, except that 2 is changed to 8.

[0041] The data transmission module receives the filter coefficients from the AXI bus and stores them sequentially in the filter coefficient area of ​​the data cache module. The data transmission module sequentially takes out the operation results from the first group of SRAM in the ping-pong area or pong area of ​​the data cache module operation result area in a ping-pong manner and sends them to the AXI bus. The data cache module is divided into an input data area, a filter coefficient area, and an operation result area. The input data area is divided into a ping-pong area and a pong area. The ping-pong area and the pong area each have 8 SRAMs. Taking the ping-pong area as an example, in the complex mode, 4 SRAMs are deeply spliced ​​into 1 group of SRAMs, with a total of 2 groups of SRAMs; in the real mode, each SRAM is independent as 1 group, with a total of 8 groups of SRAMs. The filter coefficient area has 1 SRAM. The operation result is divided into a ping-pong area and a pong area, each with 8 SRAMs. Taking the ping-pong area as an example, in the complex mode, 4 SRAMs are deeply spliced ​​into 1 group of SRAMs, with a total of 2 groups of SRAMs; in the real mode, each SRAM is independent as 1 group, with a total of 8 groups of SRAMs.

[0042] When the operation mode is the complex number mode, the data allocation module starts from address 0, and sequentially and in parallel takes out M data from the two groups of SRAM in the ping-pong area or pong area of ​​the data cache module input data area, and sends them to the complex-real reconstruction operation module. At the same time, all the complex coefficients in the filter coefficient area of ​​the data cache module are taken out in reverse order and sent to the complex-real reconstruction operation module in a broadcast manner, and M times of 2 parallel complex multiplication and accumulation operations are performed. When the M times of complex multiplication and accumulation operations are completed, the data allocation module adds 1 to the starting address of the input data area, repeats the above-mentioned data acquisition and operation operations, and stores the operation results in parallel and sequentially to the two groups of SRAM in the ping-pong area or pong area of ​​the data cache module operation result area. If the current group of SRAM does not take M input data, it will start to take enough data from the next group of SRAM address 0 in sequence until the end of the data in the current ping-pong area or pong area. When the non-last group of SRAM completes M multiplication and accumulation operations with the end address of this group as the starting address, and the last group of SRAM completes M multiplication and accumulation operations with the end address of this group as the starting address when no ping-pong is required, or M multiplication and accumulation operations with the Mth last data of this group as the starting address when ping-pong is required, the FIR filtering operation of this ping-pong area or pong area is completed. When the operation mode is real number mode, the data allocation module allocates input data, filter coefficients and operation results in the same way, except that 2 is changed to 8.

[0043] The complex-real number reconstruction operation module includes two complex-real number reconstruction operation units. Each complex-real number reconstruction operation unit is composed of an adder, a multiplier and a data selector. Figure 3 As shown, when the operation mode is complex mode, MUX0 of the complex-real reconstruction operation unit selects D0, MUX1 selects D1, MUX2 selects D1, MUX3 selects D1, MUX4 selects D1, MUX5 selects D1, MUX6 selects D1, MUX7 selects D1, MUX8 selects D0, and MUX9 selects D0, and is reconstructed into a complex multiplication-accumulation operation structure. The real and imaginary parts of the complex input data enter port A and port B respectively, and the real and imaginary parts of the complex filter coefficients enter port C and port D respectively, realizing a parallel complex multiplication-accumulation operation. Figure 4 As shown, when the operation mode is real number mode, MUX0 of the complex real number reconstruction operation unit selects D1, MUX1 selects D0, MUX2 selects D0, MUX3 selects D0, MUX4 selects D0, MUX5 selects D0, MUX6 selects D0, MUX7 selects D0, MUX8 selects D1, and MUX9 selects D1, and is reconstructed into 4 real number multiplication and accumulation operation structures. The 4 real number input data enter ports A, C, E and G respectively, and the 4 real number filter coefficients enter ports B, D, F and H respectively, realizing 4 parallel real number multiplication and accumulation operations. When the operation mode is complex number mode, the complex real number reconstruction operation module converts the 2 complex real number reconstruction operation units

[0044] Reconstruct and combine into 2 parallel complex multiplication and accumulation operation structures; when the operation mode is real number mode, the complex real number reconstruction operation module reconstructs and combines 8 complex real number reconstruction operation units into 8 parallel real number multiplication and accumulation operation structures.

[0045] If the input data does not require ping-pong, the data transmission module stores the input data in the ping-pong area of ​​the input data area of ​​the data cache module, and stores the filter coefficient in the filter coefficient area of ​​the data cache module. After that, the data allocation module takes out the input data and filter coefficient in the data cache module and sends them to the complex-real reconstruction operation module for operation. When the operation is completed, the data allocation module stores the operation result in the ping-pong area of ​​the operation result area of ​​the data cache module. The data transmission module then takes out the operation result from the ping-pong area of ​​the operation result area and sends it to the AXI bus. If the input data requires ping-pong, the data transmission module alternately stores the input data in the ping-pong area or the pong area of ​​the input data area of ​​the data cache module, stores the filter coefficient in the filter coefficient area of ​​the data cache module, alternately takes out the operation result from the ping-pong area or the pong area of ​​the operation result area of ​​the data cache module and sends it to the AXI bus; the data allocation module alternately takes out the input data in the ping-pong area or the pong area of ​​the input data area, takes out the filter coefficient in the filter coefficient area, sends the input data and the filter coefficient to the complex-real reconstruction operation module for operation, and alternately stores the operation result in the ping-pong area or the pong area of ​​the operation result area of ​​the data cache module.

[0046] The present application supports both complex FIR filtering and real FIR filtering, and reuses computing units by means of reconstruction, so that both complex FIR filtering and real FIR filtering can fully utilize computing resources.

[0047] As mentioned above, although the present application has been represented and described with reference to specific preferred embodiments, it shall not be interpreted as a limitation on the present application itself. Various changes may be made to it in form and detail without departing from the spirit and scope of the present application as defined in the appended claims. Therefore, if a person of ordinary skill in the art is inspired by it, and without departing from the purpose of the present invention, designs a structural method and an embodiment similar to the technical solution without creativity, they shall all fall within the scope of protection of this patent. In addition, the word "including" does not exclude other elements or steps, and the word "one" before an element does not exclude the inclusion of "multiple" elements. The multiple elements stated in the product claim may also be implemented by one element through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any specific order.

Claims

1. A reconstruction FIR filter for complex real number operation, comprising: A control module, generating a control signal; A data transmission module is connected to the AXI bus and the data cache module respectively, and controls the data transmission between the AXI bus and the data cache module; A data cache module caches input data, filter coefficients and operation results received from the AXI bus; A data distribution module is connected to the data cache module and the complex-real number reconstruction operation module, respectively, controls the data cache module to distribute input data and filter coefficients to the complex-real number reconstruction operation module, and controls the complex-real number reconstruction operation module to transmit operation results to the data cache module; The complex-real number reconstruction operation module performs parallel complex number or real number operations on the input data received from the data distribution module, and transmits the operation results to the data distribution module.

2. The reconstruction FIR filter of complex-real number operation according to claim 1, characterized in that: Data transmission module, including: A zero padding unit is connected to the AXI bus, receives an N-point complex or real input data vector from the AXI bus, and pads M-1 zeros at the beginning of the input data, where M is the number of filter coefficient points; A data segmentation unit receives the zero-filled input data and processes the zero-filled input data in segments according to an operation mode; A ping-pong storage control unit is connected to the data segmentation unit and the input data area of ​​the data cache module, receives the segmented input data, and controls the ping-pong storage process of the input data in the input data area of ​​the data cache module according to the length and operation mode of the input data; A filter coefficient storage unit is connected to the filter coefficient area of ​​the AXI bus and the data cache module respectively, receives the M-point complex or real filter coefficient vector from the AXI bus, and sequentially stores the filter coefficients in the filter coefficient area of ​​the data cache module; The operation result processing unit is connected to the AXI bus and the data cache module respectively, sequentially reads the operation results from the first group of SRAM in the operation result ping-pong area or pong area of ​​the data cache module in a ping-pong manner, and sends the read operation results to the AXI bus; Ping-Pong storage refers to a method in which data is sequentially stored in the first half of a continuous storage space, and when the data reaches the end, the data is stored cyclically from the second half. The ping-pong area refers to an area in the data cache module used for ping-pong storage; the pong area refers to another area in the data cache module used for ping-pong storage; the ping-pong area and the pong area store and read data alternately.

3. The reconstruction FIR filter of complex-real number operation according to claim 2, characterized in that: The data segmentation unit receives the zero-filled input data and performs segmentation processing on the zero-filled input data according to the operation mode, including: If the operation mode is complex mode, the zero-filled input data is evenly divided into k segments; If the operation mode is real number mode, the zero-filled input data is evenly divided into 4k segments; where k is a positive integer.

4. The reconstruction FIR filter of complex-real number operation according to claim 3, characterized in that: The ping-pong storage control unit controls the ping-pong storage process of the input data in the input data area of ​​the data cache module according to the length of the input data and the operation mode, including: When the operation mode is the complex mode and the input data does not need ping-pong storage, the ping-pong storage control unit starts from the first segment of input data, sequentially allocates one remainder data to each segment of data, and sequentially stores k segments of data into k groups of SRAM in the input data ping-pong area of ​​the data cache module; When the operation mode is the complex mode and the input data needs ping-pong storage, the ping-pong storage control unit will sequentially store the zero-filled input data from the first group of SRAM in the input data ping-pong area of ​​the data cache module until all the SRAMs in the ping-pong area are full, and then add the last M-1 data stored in the ping-pong area to the front end of the remaining input data to form new remaining input data, and continue to perform ping-pong storage control; When the operation mode is the real number mode, the ping-pong storage control unit performs ping-pong storage control in the same control manner as the complex number mode.

5. The reconstruction FIR filter of complex-real number operation according to claim 3, characterized in that: Data distribution module, including: An input data distribution unit is connected to the input data area of ​​the data storage module and the complex-real number reconstruction operation module respectively, and takes out data from the input data area of ​​the data cache module in parallel and sequentially and sends the data to the complex-real number reconstruction operation module; The filter coefficient allocation unit is connected to the filter coefficient area of ​​the data cache module and the complex-real number reconstruction operation module respectively, retrieves all the filter coefficients of the filter coefficient area of ​​the data cache module in reverse order and sends them to the complex-real number reconstruction operation module in a broadcasting manner; A control unit, connected to the input data allocation unit and the filter coefficient allocation unit, respectively, controls the data acquisition method and the number of data acquisition of the input data allocation unit and the filter coefficient allocation unit according to the operation mode; The result storage unit is connected to the operation result area of ​​the complex and real number reconstruction operation module and the data cache module respectively, and stores the operation result of the complex and real number reconstruction operation module in parallel and sequentially to the ping-pong area or pong area of ​​the operation result area of ​​the data cache module.

6. The reconstruction FIR filter of complex-real number operation according to claim 5, characterized in that: The control unit is connected to the input data allocation unit and the filter coefficient allocation unit respectively, and controls the data acquisition method and the number of data acquisition of the input data allocation unit and the filter coefficient allocation unit according to the operation mode, including: When the operation mode is the complex number mode, the control unit controls the input data allocation unit to start from address 0, and sequentially and in parallel fetch M data from the k groups of SRAM in the ping-pong area or pong area of ​​the input data area of ​​the data cache module, and send them to the complex-real number reconstruction operation module; Control the filter coefficient allocation unit to retrieve all complex coefficients in the filter coefficient area of ​​the data cache module in reverse order and send them to the complex-real reconstruction operation module in a broadcasting manner, and perform M times of k-parallel complex multiplication and accumulation operations; When the M times of complex multiplication and accumulation operations are completed, the control unit controls the input data allocation unit to add 1 to the data fetching start address of the input data area, repeats the above data fetching and operation operations, and controls the result storage unit to store the operation results in parallel and sequentially into k groups of SRAM in the operation result ping-pong area or pong area of ​​the data cache module; If the current group SRAM does not have enough input data, the control unit controls the input data allocation unit to sequentially fetch sufficient data from the next group SRAM address 0 until the end of the data in the current ping-pong area or pong area. When, except for the last group of SRAM, M multiplication-accumulation operations with the end address of the group as the starting address are completed, and the last group of SRAM completes M multiplication-accumulation operations with the end address of the group as the starting address when no ping-pong is required or M multiplication-accumulation operations with the Mth last data of the group as the starting address when ping-pong is required, the control unit determines that the FIR filtering operation of the current ping-pong area or pong area is completed; When the operation mode is the real number mode, the control unit controls the input data allocation unit, the filter coefficient allocation unit and the result storage unit to perform data allocation and storage in the same control manner as the complex number mode.

7. The reconstruction FIR filter of complex-real number operation according to claim 1, characterized in that: Complex and real number reconstruction operation module, including: k complex-real number reconstruction operation units, each of which comprises an adder, a multiplier and a data selector; A complex reconstruction control unit is connected to the data selectors of the k complex and real reconstruction operation units respectively. When the operation mode is the complex mode, each complex and real reconstruction operation unit is reconstructed and combined into one complex multiplication and accumulation operation structure by controlling the selection of the data selector, and the k complex and real reconstruction operation units are reconstructed and combined into k parallel complex multiplication and accumulation operation structures. A real number reconstruction control unit is respectively connected to the data selectors of k complex real number reconstruction operation units. When the operation mode is the real number mode, each complex real number reconstruction unit is reconstructed and combined into 4 real number multiplication and accumulation operation structures by controlling the selection of the data selector, and the k complex real number reconstruction operation units are reconstructed and combined into 4k real number multiplication and accumulation operation structures.

8. The reconstruction FIR filter of complex-real number operation according to claim 7, characterized in that: Complex and real number reconstruction operation unit, including: a multiplier, receiving input data and filter coefficients from the data distribution module and performing a multiplication operation; The adder receives the output of the multiplier and performs different addition operations according to the operation mode: When the operation mode is the complex mode, some adders receive the output results of the two upper multipliers and perform addition operations; another part of the adders receive the output results of the upper adder and perform addition operations with the previous output result of the adder; When the operation mode is the real number mode, the adder receives the output result of a previous multiplier and performs an addition operation with the previous output result of the adder; The data selector is connected to the adder and the multiplier respectively, and selects the output result of the adder as the output of the corresponding complex and real reconstruction operation unit according to the control signal of the complex reconstruction control unit or the real reconstruction control unit, and changes the connection between the multiplier and the adder and between the adders according to the operation mode.

9. The reconstruction FIR filter of complex-real number operation according to claim 8, characterized in that: When the operation mode is the complex mode, each complex-real reconstruction operation unit is reconstructed and combined into a complex multiplication-accumulation operation structure by controlling the selection of the data selector, including: By controlling the data selector of each complex-real number reconstruction operation unit, the output of the adder of a part of the complex-real number reconstruction operation units is connected to the input of the adder of another part of the complex-real number reconstruction operation units, so as to form a complex multiplication-accumulation operation structure; Each complex multiplication-accumulation operation structure consists of a complex-real reconstruction operation unit connected according to the data flow direction, and is used to perform complex multiplication-accumulation operations on M complex input data and M complex filter coefficients from the data allocation module to obtain a complex operation result.

10. The complex-real number reconstruction FIR filter according to claim 8, characterized in that: When the operation mode is the real number mode, each complex-real number reconstruction unit is reconstructed and combined into four real number multiplication-accumulation operation structures by controlling the selection of the data selector, including: By controlling the data selector of each complex-real reconstruction operation unit, four multipliers and four adders of each complex-real reconstruction operation unit are connected according to the data flow direction of the real number multiplication and accumulation operation, and are combined into four real number multiplication and accumulation operation structures; Each real number multiplication and accumulation operation structure is composed of a multiplier and an adder connected according to the data flow direction, wherein the output of the multiplier is connected to an input of the adder, and the other input of the adder is connected to its own previous output, and is used to perform continuous real number multiplication and accumulation operations on M real number input data and M real number filter coefficients from the data allocation module to obtain a real number operation result.

Citation Information

Cited By

  • Reconfigurable computing array, reconfigurable controller architecture, chip and reconfigurable computing method

    CN119474007A

  • Multifunctional linear convolution accelerator

    CN119474626A

  • A multifunctional linear convolution accelerator

    CN119474626B

  • Digital filtering system

    CN120811324A