CN102722564B - Table lookup method and device - Google Patents

Table lookup method and device Download PDF

Info

Publication number
CN102722564B
CN102722564B CN201210179018.3A CN201210179018A CN102722564B CN 102722564 B CN102722564 B CN 102722564B CN 201210179018 A CN201210179018 A CN 201210179018A CN 102722564 B CN102722564 B CN 102722564B
Authority
CN
China
Prior art keywords
ram
address
index
data
look
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210179018.3A
Other languages
Chinese (zh)
Other versions
CN102722564A (en
Inventor
向利
杨勋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Gaohang Intellectual Property Operation Co ltd
Taizhou Haitong Asset Management Co ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210179018.3A priority Critical patent/CN102722564B/en
Publication of CN102722564A publication Critical patent/CN102722564A/en
Application granted granted Critical
Publication of CN102722564B publication Critical patent/CN102722564B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a table lookup method and device, belongs to the communication field. The table lookup method and the table lookup device can compatibly realize one-dimensional search and two-dimensional search. The table lookup method comprises the following steps: adding 1 to an input index for operation to obtain a 1-added input index, selecting an index address in a corresponding RAM (random-access memory) according to the input index and the 1-added input index, and outputting data in the index address in the corresponding RAM according to the index address; and then interpolating the output data in the corresponding RAM according to a selected data output sequence in the RAM so as to obtain a final output value.

Description

A kind of look-up method and device
Technical field
The present invention relates to the communications field, relate in particular to a kind of look-up method and device.
Background technology
Calculating operation when look-up table normally utilizes simple query manipulation to replace operation, more a lot of soon than complicated computing velocity owing to extracting numerical value from internal memory, so look-up table is widely used.Now conventional look-up method mainly contains that one dimension is searched and two-dimensional seek.Described one dimension look for to be inputted an one dimension index and can find a unique output valve corresponding with described index in one dimension look-up table; Described two-dimensional seek is in two-dimensional look-up table, to input a 2-d index can find a unique output valve corresponding with described index.
Above-mentioned look-up method, can only carry out that one dimension is searched and two-dimensional seek independently, not only needing one dimension to search but also need the occasion of two-dimensional seek, can not meet one dimension and searches with two-dimensional seek and deposit.
Summary of the invention
Embodiments of the invention provide a kind of look-up method and device, can compatibility realize that one dimension is searched and two-dimensional seek.
For achieving the above object, embodiments of the invention adopt following technical scheme:
A kind of look-up method, comprising:
Input index is carried out to add-one operation and obtain adding 1 input index;
According to described input index with add 1 input index selection and obtain the index address in corresponding RAM;
Search the look-up table of storing in the RAM of described correspondence according to described index address, export the data in index address described in the look-up table of RAM of described correspondence, described look-up table is split and is formed by two-dimensional look-up table;
According to described input index and add the order of the data of exporting in corresponding RAM described in 1 input index selection;
The data of exporting in described corresponding RAM are carried out to interpolation according to described order and obtain final output valve.
A kind of table look-up device, comprising:
Add 1 computing unit, obtain adding 1 input index for input index being carried out to add-one operation;
Address acquisition unit, for according to described input index with add 1 input index selection and obtain the index address of corresponding RAM;
Search output unit, search for the described index address that obtains according to described address acquisition unit the look-up table that the RAM of described correspondence stores, export the data in index address described in the look-up table of RAM of described correspondence, described look-up table is split and is formed by two-dimensional look-up table;
Order selected cell, for adding the order of the data that corresponding RAM exports described in 1 input index and described input index selection described in adding described in basis that 1 computing unit obtains;
Interpolation computing unit, the order of selecting according to described order selected cell for the data that the described described corresponding RAM that searches output unit is exported carries out interpolation and obtains final output valve.
The look-up method that technique scheme provides and device, obtain adding 1 input index by input index being carried out to add-one operation, and according to described input index with add 1 input index selection and obtain the index address in corresponding RAM, and search the look-up table of storing in the RAM of described correspondence according to described index address, export the data in index address described in the look-up table of RAM of described correspondence; Then according to the order of the data of exporting in the described corresponding RAM selecting, the data of exporting in corresponding RAM are carried out to interpolation and obtain final output valve, according to above-mentioned look-up method, can input one dimension index carries out one dimension and searches, also can input 2-d index and carry out two dimension and table look-up, compatibility realizes that one dimension is searched and two-dimensional seek.
Brief description of the drawings
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
A kind of look-up table schematic diagram that Fig. 1 provides for the embodiment of the present invention;
A kind of look-up method schematic flow sheet that Fig. 2 provides for the embodiment of the present invention;
A kind of one dimension virtual address system of selection schematic diagram that Fig. 3 provides for the embodiment of the present invention;
A kind of two-dimensional virtual address selection method schematic diagram that Fig. 4 provides for the embodiment of the present invention;
A kind of one dimension output data selecting method schematic diagram that Fig. 5 provides for the embodiment of the present invention;
The one two dimension output data selecting method schematic diagram that Fig. 6 provides for the embodiment of the present invention;
The structured flowchart of a kind of table look-up device that Fig. 7 provides for the embodiment of the present invention;
The structured flowchart of the another kind of table look-up device that Fig. 8 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
The look-up method look-up table used providing in the embodiment of the present invention is that two-dimensional look-up table splits and forms according to (even, even), (even, strange), (strange, even) and (strange, strange) according to the parity of 2-d index.4 described look-up tables that fractionation forms are stored in respectively in 4 RAM, the address addr that stores data in the look-up table of described 4 RAM meets following formula: addr=((a > > 1) * k+b > > 1), wherein (a, b) be described 2-d index, a > > 1 and b > > 1 represent that a and b move to right 1, and k is the half of described two look-up table width values.
Suppose to have 6*6 two-dimensional look-up table table 1, as follows:
(a,b)
0,0 0,1 0,2 0,3 0,4 0,5
1,0 1,1 1,2 1,3 1,4 1,5
2,0 2,1 2,2 2,3 2,4 2,5
3,0 3,1 3,2 3,3 3,4 3,5
4,0 4,1 4,2 4,3 4,4 4,5
5,0 5,1 5,2 5,3 5,4 5,5
The 2-d index that wherein (a, b) is two-dimensional look-up table, according to existing two-dimensional seek method, (a of input, b) in this two-dimensional look-up table, search, can find the data in the address that in described look-up table, (a, b) is corresponding.
By above-mentioned two-dimensional look-up table, according to a, the parity of b splits, and as shown in Figure 1 by a, b is that i.e. (a, the b) of even number is that (even, even) is divided into a look-up table, is stored in RAM00.Be that (even, strange), (strange, even) and being divided in respectively in different look-up tables and according to its parity of (strange, strange) are stored in respectively in RAM01, RAM10 and RAM11 equally to (a, b).So far, two-dimensional look-up table has been split into the one dimension table shown in 4 Fig. 1, be stored in 4 different RAM.The address addr that stores data in the look-up table of described 4 RAM meets following formula: addr=((a > > 1) * k+b > > 1), wherein (a, b) be described 2-d index, a > > 1 and b > > 1 represent that a and b move to right 1, and k is that described two-dimensional look-up table is wide half.The bivariate table that here bivariate table shown in table 1 is 6*6, the width value of this bivariate table is 6, therefore k=0.5*6=3.Suppose (a, b)=(2,4), (2,4) corresponding data are stored in the look-up table in RAM00, address addr=((a > > 1) * k+b > > 1)=((2 > > 1) * 3+4 > > 1)=1*3+2=5.Be that index is that (2,4) corresponding data are stored in the address 5 of RAM00.
From the above mentioned, the look-up table of using in the embodiment of the present invention has been formed and stored in RAM.According to this look-up table, the embodiment of the present invention provides a kind of look-up method, as shown in Figure 2, said method comprising the steps of:
201, input index is carried out to add-one operation and obtain adding 1 input index.
User is carrying out one dimension while searching, and the numeral that user need to search by terminal input is correspondingly equivalent to input one dimension index S_i at table look-up device.Now, the b in the index (a, b) of the look-up table of table look-up device shown in can Fig. 2 is set to 0, only index of reference a, now a=S_i.After described table look-up device acquisition input index S_i, can carry out add-one operation to described input index S_i and obtain adding 1 input index S_i_1.
If user will carry out two-dimensional seek, two numerals that user need to search by terminal input, correspondence is equivalent to user at table look-up device and in table look-up device, inputs 2-d index (i, j).After described table look-up device acquisition input index (i, j), can carry out add-one operation to described input index (i, j) and obtain adding 1 input index (i, j+1), (i+1, j) and (i+1, j+1).
202, according to described input index with add 1 input index selection and obtain the index address in corresponding RAM.
Optionally, described table look-up device can and add 1 input index selection according to described input index and obtains corresponding virtual address after obtaining the input index of one dimension and adding 1 input index; Then, calculate the index address in RAM corresponding to described virtual address according to described virtual address.
Obtaining the input index of one dimension and adding after 1 input index S_i and S_i_1, table look-up device can, according to described S_i and S_i_1, select to obtain described S_i and virtual address corresponding to S_i_1.Obtaining after the virtual address that one dimension index is corresponding, described table look-up device can calculate the index address in RAM corresponding to described virtual address by described virtual address according to flat address computing formula; Wherein, the described virtual address that S_i or S_i_1 are corresponding is xxh, xx represents corresponding RAM, described flat address computing formula is: addr1=h > > 1, addr1 is S_i or index address corresponding to S_i_1, and h > > 1 represents that h moves to right one.
Optionally, as shown in Figure 3, for the system of selection of a kind of one dimension virtual address, S_i[0 in figure] represent the minimum bit value of S_i, S_i_1[0] the minimum bit value of expression S_i_1, if S_i is even number, S_i[0]=0, the virtual address that selection obtains is 00S_i and 01S_i, S_i_1[0]=1, selecting the virtual address obtaining is 10S_i_1 and 11S_i_1.In like manner, if S_i is odd number, S_i[0]=1, selecting the virtual address obtaining is 00S_i_1 and 01S_i_1, S_i_1[0]=0, selecting the virtual address obtaining is 10S_i, and 11S_i.Selection here obtains S_i and described virtual address xxh corresponding to S_i_1 is 00S_i and 01S_i and 10S_i_1 and 11S_i_1.Wherein the front two xx of xxh represents corresponding RAM, i.e. address in the corresponding RAM00 of 00S_i, the address in 01S_i, 10S_i_1 and 11S_i_1 difference corresponding RAM01, RAM10 and RAM11.Can calculate the index address addr1=h > > 1=S_i > > 1 in RAM00 by 00S_i, in like manner, can calculate the index address addr1=h > > 1=S_i > > 1 in RAM01 by 01S_i, calculate the index address addr1=h > > 1=S_i 1 > > 1 in RAM10 by 10S_i_1, calculate the index address addr1=h > > 1=S_i_1 > > 1 in RAM011 by 11S_i_1.
Obtaining two-dimentional input index and adding 1 input index (i, j), (i, j+1), (i+1, j) and (i+1, j+1) after, table look-up device can be according to described (i, j), (i, j+1), (i+1, j) and (i+1, j+1) selects to obtain corresponding virtual address.Obtaining after the virtual address that 2-d index is corresponding, described table look-up device calculates the index address in RAM corresponding to described virtual address according to two-dimensional address computing formula by described virtual address, wherein, (i, j), (i, j+1), (i+1, or (i+1 j), j+1) corresponding described virtual address is (xxm, xxn), xx represents corresponding RAM, described two-dimensional address computing formula is: addr2=((m > > 1) * k+n > > 1), wherein addr2 is described (i, j), (i, j+1), (i+1, or (i+1 j), j+1) corresponding index address, m > > 1 and n > > 1 represent that m and n move to right 1, k is the half of described two-dimensional look-up table width value.
Optionally, as shown in Figure 4, be a kind of two-dimensional virtual address selection method, the X[0 shown in figure] represent the minimum bit value of X, X_1 represents that X adds 1, if i and j are odd number, (i[0], j[0])=(1,1) choose (i_1 by selector switch, j_1) virtual address, obtaining is (00i_1,00j_1).In like manner, and (i[0], j_1[0])=(1,0) virtual address that selection obtains is (01i_1,01j), and (i_1[0], j[0])=(0,1) virtual address that selection obtains is (10i, 10j_1), and (i_1[0], j_1[0])=(0,0) virtual address that selection obtains is (111,11j).Certainly, i and j are that even number or one also can choose virtual address by the selector switch described in Fig. 4 for one of odd number for even number, here no longer describe in detail.Table look-up device is selecting to obtain (i, j), (i, j+1), (i+1, j) with (i+1, j+1) virtual address (xxm, xxn) is (00i_1,00j_1), (01i_1,01j), (10i_1,10j_1) with (111,11j), wherein (xxm, xxn) xx in represents corresponding RAM, i.e. (00i_1,00j_1), (01i_1,01j), (10i, address 10j_1) and in (111,11j) difference corresponding RAM00, RAM01, RAM10 and RAM11.Can be by virtual address (00i_1,00j_1) calculate index address addr2=((m > > 1) * k+n > > 1)=((i_1 > > 1) the * k+j_1 > > 1) in RAM00, in like manner, can be by (01i_1,01j) calculate index address addr2=((m > > 1) * k+n > > 1)=((i_1 > > 1) the * k+j > > 1) in RAM01, by (101,10j_1) calculate index address addr2=((m > > 1) * k+n > > 1)=((i > > 1) the * k+j_1 > > 1) in RAM10, by (111,11j) calculate index address addr2=((m > > 1) * k+n > > 1)=((i > > 1) the * k+j > > 1) in RAM011.
203, search according to described index address the look-up table of storing in the RAM of described correspondence, export the data in index address described in the look-up table of RAM of described correspondence.
Look-up table described here is to be split and formed by two-dimensional look-up table.In step 203, calculate after described index address, table look-up device can be searched the look-up table of storing in described corresponding RAM according to the index address addr1 of described correspondence, exports the data in index address described in the look-up table of described corresponding RAM; Or search the look-up table of storing in described corresponding RAM according to the index address addr2 of described correspondence, export the data in index address described in the look-up table of described corresponding RAM.
204, according to described input index and add the order of the data of exporting in corresponding RAM described in 1 input index selection.
Carrying out one dimension while searching, carrying out when searching, described table look-up device has been exported the data in index address in each RAM in step 204, obtaining after these data, table look-up device can be according to the order of the data of exporting in the table number of input and described S_i and the described corresponding RAM of S_i_1 selection; Wherein, select corresponding RAM according to the table number of described input, the order of the data of exporting in RAM corresponding to described S_i is the first, and the order of the data of exporting in RAM corresponding to described S_i_1 is second.
Optionally, as shown in Figure 5, a kind of one dimension output data selecting method, still suppose that S_i is even number here, the data of output have the data of address S_i > > 1 in RAM00 and RAM01, and the data of address S_i_1 > > 1 in RAM10 and RAM11, search device here and can input a table number, the data of exporting in each RAM are carried out to a selection, optionally, if being 0, described table number selects the data of exporting in RAM00 and RAM10, if being 1, described table number selects the data of exporting in RAM01 and RAM11.Suppose that table number is 0 here, because S_i is even number, S_i[0]=0, the order of the data of exporting in its corresponding RAM-RAM00 is the first, described S_i_1[0] order of the data exported in=1 RAM10 is second.If certainly S_i is odd number, S_i[0]=1, the order of the data of exporting in RAM10 is the first, S_i_1[0]=0, RAM, the order of the data of output is second in 00.
In the time carrying out two-dimensional seek, described table look-up device has been exported the data in index address in each RAM in step 204, obtaining after these data, table look-up device is according to described (i, j), (i, j+1), (i+1, j) and (i+1, j+1) selects the order of the data of exporting in described corresponding RAM; Wherein, described (i, the order of the data of j) exporting in corresponding RAM is first, described (i, the order of the data of j+1) exporting in corresponding RAM is the second, and the order of the data of exporting in the RAM of (i+1, j) correspondence is the 3rd, the order of the data of exporting in the RAM of described (i+1, j+1) correspondence is the 4th.
Optionally, as shown in Figure 6, be a kind of two dimension output data selecting method, still suppose that i and j are odd number here, (i[0], j[0])=(1,1) choose RAM11 by selector switch, the order of the data of exporting in RAM11 is first.In like manner, and (i[0], j_1[0])=(1,0) choose RAM10 by selector switch, the order of the data of exporting in RAM10 is the second, and (i_1[0], j[0])=(0,1) choose RAM01 by selector switch, the order of the data of exporting in RAM01 is the 3rd, and (i_1[0], j_1[0])=(0,0) choose RAM00 by selector switch, the order of the data of exporting in RAM00 is the 4th.Certainly, to be all even number or one also can select by the selector switch described in Fig. 6 the output order of a RAM for one of odd number for even number for i and j, here no longer describes in detail.
205, the data of exporting in corresponding RAM are carried out to interpolation according to described order and obtain final output valve.
The data of exporting in corresponding RAM are carried out to two-dimensional interpolation according to described order and obtain final output valve.If suppose, S_i is even number, and table look-up device carries out one dimension interpolation by the data of exporting in RAM00 and RAM10 successively and obtains final output valve.
The data of exporting in corresponding RAM are carried out to two-dimensional interpolation according to described order and obtain final output valve.If still suppose, i and j are odd number, and table look-up device carries out two-dimensional interpolation by the data of exporting in RAM11, RAM10, RAM01 and RAM00 successively and obtains final output valve.
Concrete, according to said method, if will carrying out one dimension, user searches, input one dimension index S_i=2, add 1 calculating, add 1 input index S_i_1=3, by the virtual address system of selection shown in Fig. 3, selecting the virtual address obtaining is 002,012,103,113.Then calculate the index address of corresponding RAM, the index address addr1=S_i > > 1=2 > > 1=1 of 002 corresponding RAM00, the in like manner index address addr1=S_i > > 1=2 > > 1=1 of 012 corresponding RAM01, the index address addr1=S_i_1 > > 1=3 > > 1=1 of 103 corresponding RAM10, the index address addr1=S_i_1 > > 1=3 > > 1=1 of 113 corresponding RAM11.Then search the data of address 1 in output RAM00, the data of address 1 in RAM01, the data of address 1 in RAM10, the data of address 1 in RAM11.According to the output data selecting method shown in Fig. 5, if table number is 0 data of selecting RAM00 and RAM10 output, and taking the data exported in RAM00 as first data, the data of exporting in RAM10 are the final output valve that arrives that second data carried out one dimension interpolation.
If carry out two-dimensional seek according to said method, user inputs two dimension input index (i, j)=(1,3), add 1 calculating to adding 1 input index (Isosorbide-5-Nitrae), (2,3), (2,4).By the virtual address system of selection described in Fig. 4, selecting the virtual address obtaining is (002,004), (012,013), (101,104) and (111,113).Then calculate the index address in the corresponding RAM of virtual address according to formula, (002,004) the index address addr2=in corresponding RAM00 ((2 > > 1) * 3+4 > > 1)=5, (012,013) index address 4 in corresponding RAM01, (101,104) index address 1 in index address 2 and (111,113) the corresponding RAM 11 in corresponding RAM10.Then search the data in address 5 in output RAM00, the data in RAM01 in address 4, the data in RAM10 in address 2, the data in RAM11 in address 1.Be finally first data by the output data selecting method shown in Fig. 6 according to the data of exporting in RAM11, in RAM 10, the data of output are second data, the data of exporting in RAM01 are the 3rd data, and the data of exporting in RAM00 are the final output valve that arrives that the 4th data are carried out two-dimensional interpolation.
It should be noted that, the interpolation algorithm of applying while carrying out one dimension interpolation and two-dimensional interpolation in the present invention is existing interpolation algorithm, as gets the interpolation algorithms such as arithmetic mean value.Application said method, carrying out one dimension while tabling look-up, by two output data finding carry out interpolation to final output valve; Carrying out two dimension while tabling look-up, by four output data finding carry out interpolation to final output valve; Like this can be more accurate than prior art.Here we can illustrate, what suppose look-up table storage is the data of searching of cosine-algorithm, user wants to search the value of cos0.5, therefore user inputs 0.5 and searches, if apply existing one dimension look-up method, it is input index 0 in look-up table time that user inputs 0.5 correspondence, and final is cos0=1 to output valve; If apply look-up method provided by the invention, it is input index 0 in look-up table time that user inputs 0.5 correspondence, and final is cos0+cos1=(1+cos 1)/2 to output valve; More accurate than existing lookup method.
Above-mentioned look-up method can be applied in the place that the arbitrary needs in communication system are tabled look-up, can a compatible peacekeeping two dimension search.For example, can be applied in digital pre-distortion system, in prior art, digital pre-distortion system in legacy network for be single signal frequency range, can apply (the Digital Pre-Distortion based on DPD, digital pre-distortion) the one dimension look-up table of algorithm carries out digital pre-distortion processing to one-segment signal, and along with the development of the communication technology, existing TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, TD SDMA) and LTE (Long Term Evolution, Long Term Evolution) normal employing two-band transmission in network, the digital pre-distortion system is here applied based on DPD (Digital Pre-Distortion, digital pre-distortion) the one dimension look-up table of algorithm carries out digital pre-distortion processing to one-segment signal.If the look-up method that provides of the application embodiment of the present invention here both can meet the application demand of two-band, application that again can compatible with single frequency range.
The embodiment of the present invention also provides a kind of table look-up device, for completing above-mentioned look-up method, as shown in Figure 7, described table look-up device comprises: add 1 computing unit 701, acquisition unit, address 702, searches output unit 703, order selected cell 704, interpolation computing unit 705.
Add 1 computing unit 701, obtain adding 1 input index for input index being carried out to add-one operation.
Carry out one dimension while searching when user inputs index S_i, described in add 1 computing unit 701, obtain adding 1 input index S_i_1 specifically for input index S_i being carried out to add-one operation.In the time that user inputs index (i, j) and carries out two-dimensional seek, described in add 1 computing unit 701, carry out add-one operation and obtain adding 1 input index (i, j+1), (i+1 specifically for inputting index (i, j), j) with (i+1, j+1).
Acquisition unit, address 702, for according to described input index with add 1 input index selection and obtain the index address of corresponding RAM.
Search output unit 703, search for the described index address calculating according to described address calculation 703 look-up table that the RAM of described correspondence stores, export the data in index address described in the look-up table of RAM of described correspondence.
Carrying out one dimension while searching, described in search output unit 703, specifically for search the look-up table of storing in described corresponding RAM according to the index address addr1 of described correspondence, export the data in index address addr1 described in the look-up table of described corresponding RAM; In the time carrying out two-dimensional seek, described in search output unit 704, specifically for search the look-up table of storing in described corresponding RAM according to the index address addr2 of described correspondence, export the data in index address addr2 described in the look-up table of described corresponding RAM.
Order selected cell 704, for adding the order of the data that corresponding RAM exports described in 1 input index and described input index selection described in adding described in basis that 1 computing unit 701 obtains.
Carrying out one dimension while searching, described order selected cell 704, specifically for selecting the order of the data of exporting in described corresponding RAM according to described S_i and S_i_1; Wherein, the order of the data of exporting in RAM corresponding to described S_i is the first, and the order of the data of exporting in RAM corresponding to described S_i_1 is second; In the time carrying out two-dimensional seek, described order selected cell 705, specifically for selecting the order of the data of exporting in described corresponding RAM according to described (i, j), (i, j+1), (i+1, j) and (i+1, j+1); Wherein, described (i, the order of the data of j) exporting in corresponding RAM is first, described (i, the order of the data of j+1) exporting in corresponding RAM is the second, and the order of the data of exporting in the RAM of (i+1, j) correspondence is the 3rd, the order of the data of exporting in the RAM of described (i+1, j+1) correspondence is the 4th.
Interpolation computing unit 705, the order of selecting according to described order selected cell 704 for the data that the described described corresponding RAM that searches output unit 703 is exported carries out interpolation and obtains final output valve.
Carrying out one dimension while searching, described interpolation computing unit 705, obtains final output valve specifically for the data of exporting in described corresponding RAM are carried out to one dimension interpolation according to described order.In the time carrying out two-dimensional seek, described interpolation computing unit 705, carries out two-dimensional interpolation by the data of exporting in corresponding RAM according to described order and obtains final output valve specifically for described.
Further, as shown in Figure 8, acquisition unit, described address 702 specifically comprises: address selection unit 7021, address calculation 7022.
Address selection unit 7021, for according to described input index with add 1 input index selection and obtain corresponding virtual address; Address calculation 7022, address calculation 7022, calculates the index address of RAM corresponding to described virtual address for the described virtual address of choosing according to described address selection unit 7021.
Carrying out one dimension while searching, described address selection unit 7021, specifically for selecting to obtain described S_i and virtual address corresponding to S_i_1 according to the parity of described S_i and S_i_1 and described S_i and S_i_1; Described address calculation 7022, specifically for calculating S_i described in RAM corresponding to described virtual address and index address corresponding to S_i_1 difference according to flat address computing formula by described virtual address; Wherein, the described virtual address that described S_i or described S_i_1 are corresponding is xxh, xx represents corresponding RAM, described flat address computing formula is: addr1=h > > 1, addr1 is the index address that described virtual address xxh is corresponding, and h > > 1 represents that h moves to right one.
In the time carrying out two-dimensional seek, described address selection unit 7021, specifically for according to described (i, j), (i, j+1), (i+1, j) and (i+1, j+1) select to obtain corresponding virtual address, in the time carrying out two-dimensional seek, described address calculation 7022, specifically for calculating the index address in RAM corresponding to described virtual address according to two-dimensional address computing formula by described virtual address, wherein, (i, j), (i, j+1), (i+1, or (i+1 j), j+1) corresponding described virtual address is (xxm, xxn), xx represents corresponding RAM, described two-dimensional address computing formula is: addr2=((m > > 1) * k+n > > 1), wherein addr2 is described virtual address (xxm, xxn) corresponding index address, m > > 1 and n > > 1 represent that m and n move to right 1, k is the half of described two-dimensional look-up table width value.
The device of searching of mentioning in the embodiment of the present invention is mainly integrated in FPGA (Field-Programmable Gate Array, be field programmable gate array) or ASIC (Application Specific Integrated Circuit, special IC) in.
The embodiment of the present invention provides a kind of look-up method and device, obtain adding 1 input index by input index being carried out to add-one operation, and according to described input index with add 1 input index selection and obtain the index address in corresponding RAM, and search the look-up table of storing in the RAM of described correspondence according to described index address, export the data in index address described in the look-up table of RAM of described correspondence; Then according to the order of the data of exporting in the described corresponding RAM selecting, the data of exporting in corresponding RAM are carried out to interpolation and obtain final output valve, according to above-mentioned look-up method, can input one dimension index carries out one dimension and searches, also can input 2-d index and carry out two dimension and table look-up, compatibility realizes that one dimension is searched and two-dimensional seek.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can complete by the relevant hardware of programmed instruction, aforesaid program can be stored in a computer read/write memory medium, this program, in the time carrying out, is carried out the step that comprises said method embodiment; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CDs.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited to this, any be familiar with those skilled in the art the present invention disclose technical scope in; the variation that can expect easily or replacement, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of described claim.

Claims (2)

1. a look-up method that one-segment signal and two-band signal is carried out pre-distortion in the communications field, is characterized in that, described method comprises:
In the time of input one dimension index S_i,
The described one dimension index S_i of input is carried out to add-one operation and obtain adding 1 input index S_i_1, described S_i_1 is S_i+1;
Select to obtain described S_i and virtual address corresponding to S_i_1 according to described S_i and S_i_1;
Calculate the index address in RAM corresponding to described virtual address according to flat address computing formula by described virtual address; Wherein, the described virtual address that described S_i or described S_i_1 are corresponding is xxh, xx represents corresponding RAM, described flat address computing formula is: addr1=h > > 1, addr1 is the index address that described virtual address xxh is corresponding, and h > > 1 represents that h moves to right one;
Search according to described index address addr1 the look-up table of storing in the RAM of described correspondence, export the data in index address addr1 described in the look-up table of RAM of described correspondence;
Select the order of the data of exporting in the RAM of described correspondence according to the table number of input and described S_i and S_i_1; Wherein, select corresponding RAM according to the table number of described input, the order of the data of exporting in RAM corresponding to described S_i is the first, and the order of the data of exporting in RAM corresponding to described S_i_1 is second;
The data of exporting in the RAM of described correspondence are carried out to one dimension interpolation according to described order and obtain final output valve;
In the time of input 2-d index (i, j),
The described 2-d index (i, j) of input is carried out to add-one operation and obtain adding 1 input index (i, j+1), (i+1, j) and (i+1, j+1);
Select to obtain corresponding virtual address according to described (i, j), (i, j+1), (i+1, j) and (i+1, j+1);
Calculate the index address in RAM corresponding to described virtual address according to two-dimensional address computing formula by described virtual address, wherein, (i, j), (i, j+1), (i+1, or (i+1 j), j+1) corresponding described virtual address is (xxm, xxn), xx represents corresponding RAM, described two-dimensional address computing formula is: addr2=((m > > 1) * k+n > > 1), wherein addr2 is described virtual address (xxm, xxn) corresponding index address, m > > 1 and n > > 1 represent that m and n move to right 1, k is the half of two-dimensional look-up table width value,
Search according to the index address addr2 of described correspondence the look-up table of storing in the RAM of described correspondence, export the data in index address addr2 described in the look-up table of RAM of described correspondence;
Select the order of the data of exporting in the RAM of described correspondence according to described (i, j), (i, j+1), (i+1, j) and (i+1, j+1); Wherein, described (i, the order of the data of j) exporting in corresponding RAM is first, described (i, the order of the data of j+1) exporting in corresponding RAM is the second, and the order of the data of exporting in the RAM of (i+1, j) correspondence is the 3rd, the order of the data of exporting in the RAM of described (i+1, j+1) correspondence is the 4th;
The data of exporting in the RAM of described correspondence are carried out to two-dimensional interpolation according to described order and obtain final output valve;
Wherein, described look-up table is that two-dimensional look-up table splits and forms according to (even, even) (even, strange) (strange, even) (strange, strange) according to the parity of 2-d index; 4 described look-up tables that fractionation forms are stored in respectively in 4 RAM, the address addr that stores data in the look-up table of described 4 RAM meets following formula: addr=((a > > 1) * k+b > > 1), wherein (a, b) be described 2-d index, a > > 1 and b > > 1 represent that a and b move to right 1, and k is the half of described two-dimensional look-up table width value.
2. a table look-up device that one-segment signal and two-band signal is carried out pre-distortion in the communications field, is characterized in that, in the time of input one dimension index S_i,
Add 1 computing unit, obtain adding 1 input index S_i_1 for the described one dimension index S_i of input is carried out to add-one operation, described S_i_1 is S_i+1;
Address acquisition unit, for selecting to obtain described S_i and virtual address corresponding to S_i_1 according to described S_i and S_i_1; And calculate the index address in RAM corresponding to described virtual address according to flat address computing formula by described virtual address; Wherein, the described virtual address that described S_i or described S_i_1 are corresponding is xxh, xx represents corresponding RAM, described flat address computing formula is: addr1=h > > 1, addr1 is the index address that described virtual address xxh is corresponding, and h > > 1 represents that h moves to right one;
Search output unit, the look-up table of storing for the RAM that searches described correspondence according to described index address addr1, exports the data in index address addr1 described in the look-up table of RAM of described correspondence;
Order selected cell, for selecting the order of the data that the RAM of described correspondence exports according to the table number of input and described S_i and S_i_1; Wherein, select corresponding RAM according to the table number of described input, the order of the data of exporting in RAM corresponding to described S_i is the first, and the order of the data of exporting in RAM corresponding to described S_i_1 is second;
Interpolation computing unit, the order of selecting according to described order selected cell for the data that the described described corresponding RAM that searches output unit is exported carries out interpolation and obtains final output valve;
In the time of input 2-d index (i, j),
Described 1 computing unit that adds, obtains adding 1 input index (i, j+1), (i+1, j) and (i+1, j+1) for the described 2-d index (i, j) of input is carried out to add-one operation;
Address acquisition unit, for selecting to obtain corresponding virtual address according to described (i, j), (i, j+1), (i+1, j) and (i+1, j+1), and for calculated the index address of RAM corresponding to described virtual address by described virtual address according to two-dimensional address computing formula, wherein, (i, j), (i, j+1), (i+1, or (i+1 j), j+1) corresponding described virtual address is (xxm, xxn), xx represents corresponding RAM, described two-dimensional address computing formula is: addr2=((m > > 1) * k+n > > 1), wherein addr2 is described virtual address (xxm, xxn) corresponding index address, m > > 1 and n > > 1 represent that m and n move to right 1, k is the half of two-dimensional look-up table width value,
Search output unit, the look-up table of storing for search the RAM of described correspondence according to the index address addr2 of described correspondence, exports the data in index address addr2 described in the look-up table of RAM of described correspondence;
Order selected cell, for selecting the order of the data of exporting in the RAM of described correspondence according to described (i, j), (i, j+1), (i+1, j) and (i+1, j+1); Wherein, described (i, the order of the data of j) exporting in corresponding RAM is first, described (i, the order of the data of j+1) exporting in corresponding RAM is the second, and the order of the data of exporting in the RAM of (i+1, j) correspondence is the 3rd, the order of the data of exporting in the RAM of described (i+1, j+1) correspondence is the 4th;
Interpolation computing unit, carries out two-dimensional interpolation for the data that the RAM of described described correspondence of searching output unit is exported according to described order and obtains final output valve;
Wherein, described look-up table is that two-dimensional look-up table splits and forms according to (even, even) (even, strange) (strange, even) (strange, strange) according to the parity of 2-d index; 4 described look-up tables that fractionation forms are stored in respectively in 4 RAM, the address addr that stores data in the look-up table of described 4 RAM meets following formula: addr=((a > > 1) * k+b > > 1), wherein (a, b) be described 2-d index, a > > 1 and b > > 1 represent that a and b move to right 1, and k is the half of described two-dimensional look-up table width value.
CN201210179018.3A 2012-06-01 2012-06-01 Table lookup method and device Active CN102722564B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210179018.3A CN102722564B (en) 2012-06-01 2012-06-01 Table lookup method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210179018.3A CN102722564B (en) 2012-06-01 2012-06-01 Table lookup method and device

Publications (2)

Publication Number Publication Date
CN102722564A CN102722564A (en) 2012-10-10
CN102722564B true CN102722564B (en) 2014-11-05

Family

ID=46948325

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210179018.3A Active CN102722564B (en) 2012-06-01 2012-06-01 Table lookup method and device

Country Status (1)

Country Link
CN (1) CN102722564B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020227905A1 (en) * 2019-05-13 2020-11-19 华为技术有限公司 Pre-distortion parameter updating apparatus and method, and pre-distortion processing system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212206A (en) * 2007-12-21 2008-07-02 北京创毅视讯科技有限公司 Method for handling nonlinear pre-distortion of amplifier
CN101278846A (en) * 2008-05-26 2008-10-08 汕头超声仪器研究所 Method for processing digital scan conversion of ultrasonic echo data
CN101551824A (en) * 2009-05-13 2009-10-07 重庆金美通信有限责任公司 FPGA-based high-speed search engine and search method
CN101867378A (en) * 2010-06-11 2010-10-20 清华大学 Horizontal operating method, horizontal operating device and LDPC (Low Density Parity Check) decoder in LDPC decoding

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7733978B2 (en) * 2006-05-26 2010-06-08 Industrial Technology Research Institute Apparatus and method of dynamically adapting the LUT spacing for linearizing a power amplifier

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212206A (en) * 2007-12-21 2008-07-02 北京创毅视讯科技有限公司 Method for handling nonlinear pre-distortion of amplifier
CN101278846A (en) * 2008-05-26 2008-10-08 汕头超声仪器研究所 Method for processing digital scan conversion of ultrasonic echo data
CN101551824A (en) * 2009-05-13 2009-10-07 重庆金美通信有限责任公司 FPGA-based high-speed search engine and search method
CN101867378A (en) * 2010-06-11 2010-10-20 清华大学 Horizontal operating method, horizontal operating device and LDPC (Low Density Parity Check) decoder in LDPC decoding

Also Published As

Publication number Publication date
CN102722564A (en) 2012-10-10

Similar Documents

Publication Publication Date Title
CN101061473B (en) Low-complexity nonlinear filters
CN102968503B (en) The data processing method of Database Systems and Database Systems
US11314845B2 (en) Interpolating a sample position value by interpolating surrounding interpolated positions
Morozov et al. Distributed contour trees
CN102043760B (en) Data processing method and system
CN105515997B (en) The higher efficiency range matching process of zero scope expansion is realized based on BF_TCAM
CN102419741A (en) In-place simultaneous prime factor algorithm-based 3780-point discrete Fourier transform processing device and method
Przyjalkowski et al. Bounds for smooth Fano weighted complete intersections
Speleers A family of smooth quasi-interpolants defined over Powell–Sabin triangulations
CN102799411B (en) Floating number summation circuit and its implementation
Xiao et al. Reduced memory architecture for CORDIC-based FFT
CN108021333A (en) The system of random read-write data, device and method
CN102982147B (en) A kind of method and apparatus improving data message integration efficiency
CN102722564B (en) Table lookup method and device
Revanna et al. A scalable FFT processor architecture for OFDM based communication systems
Lyche et al. Stable simplex spline bases for C 3 quintics on the Powell–Sabin 12-split
CN103034621A (en) Address mapping method and system of radix-2*K parallel FFT (fast Fourier transform) architecture
Dastjerdi et al. A meshless approximate solution of mixed Volterra–Fredholm integral equations
CN109697234B (en) Multi-attribute information query method, device, server and medium for entity
CN105302833A (en) Content based video retrieval mathematic model establishment method
Ferizi et al. Design and implementation of a fixed-point radix-4 FFT optimized for local positioning in wireless sensor networks
CN115544438A (en) Twiddle factor generation method and device in digital communication system and computer equipment
CN102789376B (en) Floating-point number adder circuit and implementation method thereof
Sun et al. A Surface Modeling Method by Using C^ 2 C 2 Piecewise Rational Spline Interpolation
Böhm et al. Constant coefficients in the radial Komatu–Loewner equation for multiple slits

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201202

Address after: Building 2, No. 3, Fuqian Road, Hailing District, Taizhou City, Jiangsu Province

Patentee after: Taizhou Haitong Asset Management Co.,Ltd.

Address before: Unit 2414-2416, main building, no.371, Wushan Road, Tianhe District, Guangzhou City, Guangdong Province

Patentee before: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd.

Effective date of registration: 20201202

Address after: Unit 2414-2416, main building, no.371, Wushan Road, Tianhe District, Guangzhou City, Guangdong Province

Patentee after: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right