A kind of method and device of realizing universal digital filter
Technical field
The present invention relates to digital filter apparatus in multi-module mobile terminal, relate in particular to a kind of method and device of realizing universal digital filter.
Background technology
In the digital baseband technology of the technology of existing mobile communication, digital filtering technique is a kind of technology of outbalance.Following formula 1 to formula 3 indicates respectively limit for length's unit impulse response (Finite Impulse Response is called for short FIR) three kinds of filtering types of filter, and formula 1 is output filter with same frequency, and formula 2 is decimation filter, and formula 3 is interpolation filtering.
formula 1
formula 2
formula 3
Following formula 4 is endless unit impulse response (Infinite Impulse Response is called for short IIR) filter.
formula 4
From above-mentioned formula, can find out that digital filtering process mainly realizes by multiplication operations and the cumulative operation of filter factor and sampled data.
In FIR filter, relate generally to the delay operation that sampled data is carried out, sampled data and filter factor take advantage of operation, and to the add operation of all products etc.In circuit is realized, addition and multiplication are all the more operations of resource occupation, and the time delay of addition and multiplication function unit is also larger.
In multi mode terminal terminal, because of the difference of different mode algorithm filter, so the exponent number of filter coefficient and filter is all not identical, be difficult to these filters to carry out resource-sharing.Because add operation in filtering and multiplying are compared with consumes resources, so data filtering function can take more calculation resources in mobile terminal in multi-module mobile terminal.In addition, the circuit time delay of adder and multiplier itself is also larger, so the multiplexing efficiency between different filters is lower under same mode.
General and the abundant multiplex filter resource that how to realize dissimilar filter is the technical issues that need to address.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of method and device of realizing universal digital filter, realizes the general utility functions of dissimilar filter, improves filtration efficiency.
In order to solve the problems of the technologies described above, the invention provides a kind of device of realizing universal digital filter, comprise that instruction control module and the data that are connected with described instruction control module provide module and computing module; Data provide the output of module and the input of computing module to be connected; Described instruction control module, provides module to provide filter factor and sampled data to described computing module for controlling described data, also for controlling described computing module, the filter factor receiving and sampled data is carried out to arithmetic operation; Described data provide module, for providing filter factor and sampled data according to the control of described instruction control module to described computing module; Described computing module, for providing filter factor and the sampled data that module provides to carry out multiplication and cumulative operation, output filtering result according to the control of described instruction control module to described data.
Further, said apparatus can also have following characteristics:
Described device also comprises filter factor input module and the sampled data input module that output and described data provide the input of module to be connected; Described filter factor input module, for provide module to provide to the described data filter factor of having stored or the filter factor receiving in real time; Described sampled data input module, for provide module to provide to the described data sampled data of having stored or the sampled data receiving in real time.
Further, said apparatus can also have following characteristics:
Described data provide module to comprise that a plurality of connected data successively provide unit, and described data provide unit to comprise storing sub-units and for sampled data being carried out to the delayer of time delay; Provide unit to form respectively a plurality of data the data of continuous same number submodule is provided; Described instruction control module, provides unit for filtering filter factor is inputed to each data corresponding with filtering mode successively by exponent number order, and sampled data is inputed to data provides first data in module that unit is provided; Described data provide unit, for using the filter factor receiving and sampled data as data to output; And sampled data carries out delay operation, the sampled data after time delay is input to next data unit is provided.
Further, said apparatus can also have following characteristics:
Described data provide module also to comprise a plurality of selectors, and same selector provides the data of same position in submodule to provide unit to be all connected with different pieces of information; Described data provide each selector in module, and the data of unit output are provided for the data of selecting according to the control of described instruction control module to export same data and provide submodule to described computing module.
Further, said apparatus can also have following characteristics:
Described computing module comprises a plurality of operator modules, also comprises the adder being connected with each operator module; Described data provide module, for providing unit to provide unit group as data respectively a continuous X data successively according to the control of instruction control module, data are provided X the data of output of unit group to inputing to correspondingly successively operator module; Described operator module, for to the X a receiving data to carrying out respectively multiply operation, and after the result of multiply operation is added up, cumulative result is inputed to adder; Described adder, obtains filtering result for the data of input are carried out after add operation.
Further, said apparatus can also have following characteristics:
The value of X is 2,4 or 8.
Further, said apparatus can also have following characteristics:
When the number that each data provide the data that comprise in submodule that unit is provided is L, the number of the operator module comprising in described computing module is the ratio of L and X, during the aliquant X of L, the number of operator module be L and X business and 1 and.
In order to solve the problems of the technologies described above, the present invention also provides a kind of method that realizes universal digital filter, comprise: by instruction control module, controlling data provides module to provide filter factor and sampled data to computing module, by described instruction control module, controlling described computing module provides filter factor and the sampled data that module provides to carry out obtaining filtering result after multiplication and cumulative operation to described data.
Further, said method can also have following characteristics:
A plurality of connected data are successively set in described data provide module unit is provided, storing sub-units is set in each data provides unit and for sampled data being carried out to the delayer of time delay; Provide unit to form respectively a plurality of data the data of continuous same number submodule is provided; By described instruction control module control, filter factor in filtering is inputed to each data corresponding with filtering mode successively by exponent number order unit is provided, sampled data is inputed to data provides first data in module that unit is provided; Each data provide unit to carry out delay operation to sampled data and the sampled data after time delay are input to next data unit is provided, each data provide unit using the filter factor receiving and sampled data as data to exporting described arithmetic element to.
Further, said method can also have following characteristics:
The accumulator that a plurality of operator modules is set and is connected with each operator module at described computing module; Described data provide module for a filtering, to provide unit as data, to provide unit group respectively a continuous X data according to the control of instruction control module successively, data are provided X the data of output of unit group to inputing to correspondingly successively operator module; Described operator module to carrying out respectively multiply operation, and after the result of multiply operation is added up, inputs to adder by cumulative result to the X a receiving data; Described adder carries out the data of input to obtain filtering result after add operation.
In the present invention, adopt shared data that module and computing module are provided, these two modules are carried out to instruction control, make computing module unification complete multiply-add operation, can realize dissimilar filter, realize general utility functions, can in multi mode terminal terminal realizes, meet multiplexing between different mode, every kind of mode internal, reach the fully multiplexing of filter multiplicaton addition unit simultaneously, the present invention can also reduce circuit delay, improves arithmetic speed.
Accompanying drawing explanation
Fig. 1 is the structural representation of realizing the device of universal digital filter in embodiment;
Fig. 2 is the structural representation that in embodiment, data provide module;
Fig. 3 is the structural representation of computing module in embodiment.
Embodiment
As shown in Figure 1, the device of realizing universal digital filter in multi-module mobile terminal comprises that instruction control module and the connected data of and instruction control module provide module and computing module; Data provide the output of module and the input of computing module to be connected.This device also comprises filter factor input module and the sampled data input module that output and data provide the input of module to be connected.
Instruction control module is used for controlling data provides module to provide filter factor and sampled data to computing module, also for control algorithm module, the filter factor receiving and sampled data is carried out to arithmetic operation.
Data provide module for providing filter factor and sampled data according to the control of instruction control module to computing module.
Computing module is for providing filter factor and the sampled data that module provides to carry out multiplication and cumulative operation, output filtering result according to the control of instruction control module to data.
In this device, filter factor input module is for to the data filter factor of having stored that provides module to provide or the filter factor receiving in real time.Sampled data input module is for to the data sampled data of having stored that provides module to provide or the sampled data receiving in real time.
In this device, in instruction control module, command memory can be comprised, for storing the control command of universal filter, in instruction control module, decoder can also be comprised, for completing the decoded operation to control command.After the operational order of storing in instruction control module extraction memory decoding, for controlling data, provide module and computing module.
Described data provide module to comprise that a plurality of connected data successively provide unit, and described data provide unit to comprise storing sub-units and for sampled data being carried out to the delayer of time delay; Provide unit to form respectively a plurality of data the data of continuous same number submodule is provided;
Described instruction control module, provides unit for filtering filter factor is inputed to each data corresponding with filtering mode successively by exponent number order, and sampled data is inputed to data provides first data in module that unit is provided.Data provide unit for using the filter factor receiving and sampled data as data to output; And sampled data carries out delay operation, the sampled data after time delay is input to next data unit is provided.
Wherein, in storing sub-units, can also comprise for storing the subelement of filter factor and for the subelement of store sample data.
Data provide module also to comprise a plurality of selectors, and same selector provides the data of same position in submodule to provide unit to be all connected with different pieces of information.Data provide each selector in module that the data of unit output are provided for the data of selecting according to the control of described instruction control module to export same data and provide submodule to described computing module.
A kind of typical applicable cases of take below provides the structure of module as example illustrates data.As shown in Figure 2, data provide module to comprise that N data provide submodule, and each data provides submodule to comprise that L data provide unit.Data provide LxN data in module to provide unit to be connected successively.When filter factor is less than L, instruction control module inputs to same data by filter factor in filtering submodule is provided, and filter factor is inputted to so far data successively by exponent number order provide each data in submodule that unit is provided, take formula 1 as example, instruction control module inputs to data by filter factor h (0) in this filtering provides the first data of submodule 1 that unit is provided, filter factor h (1) is inputed to data provides the second data of submodule 1 that unit is provided, filter factor h (N-1) is inputed to data provides N-1 data of submodule 1 that unit is provided.Instruction control module is inputted data by sampled data provides first data in submodule 1 that unit is provided, first data provide unit, by delayer, the sampled data after postponing is inputed to second data unit are provided, take current time as n be example, it is x (n) that the first data provide sampled data in unit, it is x (n-1) that the second data provide sampled data in unit, and it is x (n-m) that m data provide sampled data in unit.Data shown in Fig. 2 provide module to comprise L selector, and same selector provides the data of same position in submodule to provide unit to be all connected with different pieces of information.Instruction control module is indicated each selector all to export data filter factor and the sampled data in submodule 1 is provided.
Data shown in Fig. 2 provide module can realize the filtering mode shown in formula 1.While being the input of instruction control module control filter factor, according to the mode shown in formula 1, filter factor is inputed to data successively by exponent number order provides each data in module that unit is provided.In other embodiments, when instruction control module is controlled filter factor input, according to the mode shown in formula 2 and formula 3, the filter factor of same order is not inputed to the data corresponding with filtering mode place, unit is provided.Take formula 2 as example, h (1) is inputed to the data that x (Mm-1) locates unit is provided.Take formula 3 as example, h (1) is inputed to the data that x ((m-1)/L) locates unit is provided.
Computing module comprises a plurality of operator modules, also comprises the adder being connected with each operator module.
Data provide module for providing unit to provide unit group as data respectively a continuous X data successively according to the control of instruction control module, data are provided X the data of output of unit group to inputing to correspondingly successively operator module.The value of X is 2,4 or 8.Operator module for to the X a receiving data to carrying out respectively multiply operation, and after the result of multiply operation is added up, cumulative result is inputed to adder.Adder obtains filtering result for the data of input are carried out after add operation.
Take the structure of a kind of typical applicable cases as example explanation computing module below.As shown in Figure 3, computing module comprises L/2 operator module, X value 2, the control of instruction control module provides unit as data, to provide unit group respectively continuous 2 data successively, data are provided 2 data of output of unit group to inputing to correspondingly successively operator module, provide unit 1 and data to provide the data of unit 2 outputs to input to operator module 1 data, provide unit 3 and data to provide the data of unit 4 outputs to input to operator module 2 data, the like, provide unit L-1 and data to provide the data of unit L output to input to operator module L/2 data.For example, 1 pair of data of operator module provide h in unit 1 (0) and x (m) to carry out multiply operation, to data, provide h in unit 2 (1) and x (m-1) to carry out multiply operation, and after the result of two multiply operations is carried out to add operation, input to adder, after adder adds up to the data of each operator unit output as filtering result.
Wherein, when the number that each data provide the data that comprise in submodule that unit is provided is L, the number of the operator module comprising in described computing module is the ratio of L and X, during the aliquant X of L, the number of operator module be L and X business and 1 and.
In this device, arithmetic element has been used pipeline processing mode, can improve processing speed.
Specific embodiment
Take formula 1 as example, filter factor has 24, in the general filtering of the present invention, instruction control module provides the data that comprise in module to provide in unit every 8 to be divided into data submodule is provided data, while carrying out data input, h (0) is inputed to data to h (7) provides the data of submodule vr0 to provide unit 1 to data to provide in unit 8, h (8) is inputed to data to h (15) provides the data of submodule vr1 to provide unit 1 to data to provide in unit 8, h (16) is inputed to data to h (23) provides the data of submodule vr2 to provide unit 1 to data to provide in unit 8.Instruction control module sends to give an order to computing module:
VMAC?vr0;
VMAC?vr1;
VMAC?vr2;
Computing module comprises 12 operator modules, and the 1st operator module input data provide unit 1 and data that filter factor and the sampled data of unit 2 outputs are provided; The 2nd operator module input data provide unit 3 and data that filter factor and the sampled data of unit 4 outputs are provided; The rest may be inferred.
Computing module is received after article one instruction, provides the data in submodule vr0 to carry out the cumulative operation of multiplication and multiplication result data; Receive after second instruction, provide the data in submodule vr1 to carry out the cumulative operation of multiplication and multiplication result data, and add up with the result of the first instruction; Receive after the 3rd instruction, provide the data in submodule vr2 to carry out the cumulative operation of multiplication and multiplication result data, and add up with the result of the second instruction; Obtain filtering result.
This universal filter device can meet the use of different filtering modes, thereby realizes multiplexing between different filter patterns; Secondly because adopted flowing structure, can realize high frequency operation and fully realize the multiplexing of arithmetic element, can further reduce costs; During this universal filter not only can be realized for mobile phone multimode terminal in addition, can also be used in other scenes.
Certainly; the present invention also can have other various embodiments; in the situation that not deviating from spirit of the present invention and essence thereof; those of ordinary skill in the art are when making according to the present invention various corresponding changes and distortion, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.
One of ordinary skill in the art will appreciate that all or part of step in said method can come instruction related hardware to complete by program, described program can be stored in computer-readable recording medium, as read-only memory, disk or CD etc.Alternatively, all or part of step of above-described embodiment also can realize with one or more integrated circuits.Correspondingly, each the module/unit in above-described embodiment can adopt the form of hardware to realize, and also can adopt the form of software function module to realize.The present invention is not restricted to the combination of the hardware and software of any particular form.