CN102385589A - Method for establishing multiple look-up tables and data acquisition method by using multiple look-up tables - Google Patents
Method for establishing multiple look-up tables and data acquisition method by using multiple look-up tables Download PDFInfo
- Publication number
- CN102385589A CN102385589A CN2010102713541A CN201010271354A CN102385589A CN 102385589 A CN102385589 A CN 102385589A CN 2010102713541 A CN2010102713541 A CN 2010102713541A CN 201010271354 A CN201010271354 A CN 201010271354A CN 102385589 A CN102385589 A CN 102385589A
- Authority
- CN
- China
- Prior art keywords
- input data
- data
- question blank
- deleted
- error
- 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.)
- Pending
Links
Images
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a method for establishing multiple look-up tables and a data acquisition method by using the multiple look-up tables. The method comprises steps of firstly distinguishing input data into a plurality of groups, respectively providing a plurality of input data and a plurality of corresponding output data for each group to establish a plurality of corresponding look-up tables, then selectively deleting bits of the input data in each look-up table in one or the plurality of groups, and recording the bit-deleted input data and the corresponding output data in the look-up tables corresponding to the groups.
Description
Technical field
The invention relates to a kind of data capture method, and particularly relevant for a kind of method for building up of multi-retrieving table and utilize the data capture method of multi-retrieving table.
Background technology
In digital circuit, have often and need carry out translation operation, yet this computing is often complicated and consuming time, also can take sizable system resource data.In order to reduce the burden of system, generally can adopt the mode of tabling look-up to replace by the direct computing of processor.It promptly is the result with after possible its conversion of input data in advance calculating that what is called is tabled look-up; And with the stores of question blank (Look-up table) in device's memory; Then in the time need carrying out this translation operation, can obtain the transformation result of these data by the mode of obtaining corresponding data in the question blank to identical data; And reduce time and the cost that the processor repetitive operation is consumed, and then save system resource.
Yet when using question blank, if the scope of its data movement is big more, the size of the question blank that need use is also big more, so just can provide than the complete operation result; If require the degree of accuracy of operation result again, then also need increase the size of question blank.Above-mentioned two kinds of situations can make that all question blank takies more system resource.For instance, if input data and output data are all 16, then its question blank possibly take the memory headroom up to hundreds of K position, the complete corresponding input signal of ability and the output signal of better quality is provided.From the above, tradition is used the system that mode is limited for internal memory or the memory access burden is bigger of question blank, still has certain restriction.
Summary of the invention
The object of the present invention is to provide a kind of method for building up of multi-retrieving table and utilize the data capture method of multi-retrieving table; By data being recorded in a plurality of question blanks; And optionally delete input section data position in the question blank, and the size of reduction question blank.
For realizing that the object of the invention proposes a kind of method for building up of multi-retrieving table, be used to provide electronic installation inquiry one input data pairing output data.The method is that to distinguish many input data be a plurality of groups, to this group respectively many input data and many corresponding output datas thereof is provided respectively, to set up corresponding a plurality of question blanks.To each question blank in one or more group, optionally delete at least one position of wherein importing data, and input data and the corresponding output data thereof that the position deleted in record are in the pairing question blank of this group.
Distinguishing these input data comprises for the step of this group:
According to a numeric distribution of these input data, distinguishing the input data to be this group.
To each question blank in one or more groups, optionally delete wherein at least one position of these input data, and record has deleted that the input data of position and corresponding output data thereof comprise in the step of this pairing question blank of group:
Carry out multiple position to these input data in this group and delete simulation, this deletes that simulation is front end position, position, rear end or its combination of deleting different numbers in this of this input data;
Calculate respectively this position and delete in the simulation, deleted an error of position and these input data of not deleting;
According to this error, the bits number of these input data is deleted in decision at last; And
Record has deleted that input data and the corresponding output data thereof of position are in the pairing question blank of this group.
According to this error, decision deletes that at last the step of the bits number of these input data comprises:
To the multiple combination of this question blank carried out the position deletes simulation, calculate respectively should combination in a total error of all question blanks; And
One initial error of the difference error that respectively should make up or this total error and this input data is compared, and Select Error and the immediate combination of this initial error decide the bits number of deleting these input data at last.
After respectively this deletes the step of simulating front end position, position, rear end or its combination of different numbers in this that delete these input data, more comprise:
Calculate after respectively this deletes that the position of different numbers is deleted in simulation, the input data and the corresponding required form size of output data thereof of position deleted in record.
According to this error, decision deletes that at last the step of the bits number of these input data comprises:
This this error and threshold ratio of deleting simulation is respectively deleted simulation with Select Error less than at least one position of this threshold value; And
The form size that simulation is required is deleted in more selected this at least one position, and the bits number of these input data is deleted in decision according to this at last.
Being directed against the respectively input data of this group, optionally delete after at least one the step wherein, more comprise:
The form size of question blank of input data and the corresponding output data thereof of position has been deleted in calculating in order to record; And
According to the form size of this question blank respectively, calculate the corresponding a plurality of addresses of input data in this question blank.
The pairing address of input data of this question blank is to set up continuously or independently.
To the input data of this group respectively, optionally delete at least one position wherein, and record has deleted that input data and the corresponding output data thereof of position after the step of this pairing question blank of group, more comprise:
Calculate a respectively correction term of this output data, and be recorded in corresponding question blank.
For realizing that the object of the invention also provides a kind of data capture method that utilizes the multi-retrieving table, be used to provide electronic installation to obtain the pairing output data of input data.The method comprises provides a plurality of question blanks, and wherein each question blank is to many input data dividing into a plurality of groups, optionally delete wherein at least one position, and the input data and many corresponding output datas thereof of position has been deleted in record.Then, receive the input data, obtain in the question blank output data corresponding to these input data.
Provide the step of a plurality of question blanks more to comprise:
A respectively correction term of this output data is provided.
The step of obtaining in this question blank corresponding to the output data of these input data more comprises:
Obtain this corresponding correction term of this output data, and in order to revise the output data of obtaining by this question blank.
Describe the present invention below in conjunction with accompanying drawing and specific embodiment, but not as to qualification of the present invention.
Description of drawings
Fig. 1 (a) and Fig. 1 (b) are the design example figure of the cosine conversion query table that illustrates according to embodiments of the invention;
Fig. 2 is the method for building up process flow diagram of the multi-retrieving table that illustrates according to one embodiment of the invention;
Fig. 3 is the method for building up process flow diagram of the multi-retrieving table that illustrates according to another embodiment of the present invention;
Fig. 4 is the example figure of the multi-retrieving table of the division arithmetic that illustrates according to embodiments of the invention;
Fig. 5 (a) and Fig. 5 (b) are the example figure of the multi-retrieving table of the divider that illustrates according to embodiments of the invention;
Fig. 6 is the method for building up process flow diagram of the multi-retrieving table that illustrated according to an embodiment more of the present invention;
Fig. 7 is the example figure of the N position search window that illustrates according to embodiments of the invention;
Fig. 8 is the example figure that the linearity that illustrates according to embodiments of the invention is changeed the question blank of logarithm;
Fig. 9 is the data capture method process flow diagram that utilizes the multi-retrieving table that illustrates according to embodiments of the invention.
Wherein, Reference numeral
700,800: search window
710,720: raw data
810: the input data
820: multiplexer
830: the first question blanks
840: the second question blanks
850: multiplier
860: totalizer
870: logarithm value
S210 ~ S230: each step of the method for building up of the multi-retrieving table of an embodiment
S310 ~ S360: each step of the method for building up of the multi-retrieving table of another embodiment
S610 ~ S650: each step of the method for building up of the multi-retrieving table of an embodiment again
S910 ~ S950: each step of the data capture method that utilizes the multi-retrieving table of an embodiment
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer, below in conjunction with accompanying drawing and embodiment, to the method for building up of multi-retrieving table of the present invention and utilize the data capture method of multi-retrieving table to be further elaborated.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
The method for building up of multi-retrieving table of the present invention and utilize the data capture method of multi-retrieving table is to the distribution character of input value data, it is divided into a plurality of groups, and be recorded in the different question blanks.And to each question blank, the present invention attempts under the prerequisite that does not influence data accuracy, suitably deletes the input section data position that is recorded in the question blank, and only writes down these input data and pairing output datas thereof.
Convert example into cosine, Fig. 1 (a) and Fig. 1 (b) are the design example figure of the cosine conversion query table that illustrated according to an embodiment.Wherein n=1 ~ N (N=1024) is integer input, and cos (j2 π n/N) is output, and in Fig. 1 (a) and Fig. 1 (b), except C1 is the floating point values of cos (j2 π n/N), C2 ~ C4 all is 16 bit value of cos (j2 π n/N).Can know by Fig. 1 (a), if in question blank all operation results of record input data, then can obtain one with the quite consistent step curve C2 of floating-point cosine function curve C 1.Yet the input data n major part that supposing the system is obtained is all less than 500, and on behalf of the input data n that exceeds this scope, this just to be simplified, so as to the question blank of reduction record data.Can know by Fig. 1 (b); In the question blank still record to keep Fig. 1 (a) input data n be all operation results of 1 ~ 500; Therefore the curve C 3 of the I/O data in this is interval is still quite consistent with cosine function curve C 1, yet the curve C 4 of the I/O data of (being n=501 ~ 1024) is more inconsistent with cosine function curve C 1 outside this interval.
Table 1 is listed the difference of above-mentioned two kinds of question blanks design.Wherein, for being designed to the single question blank more consistent with the cosine function curve, its mean square deviation (mean square error, MSE) preferable (46dB), but its form size up to 130 * 16; Relatively, for being designed to and the more inconsistent dual question blank of cosine function curve, its mean square deviation (43dB) similar with single question blank, but its form size can be reduced to 52 * 16.Hence one can see that, the size that the method for employing multi-retrieving table can effectively be reduced question blank really, and then the usage space of saving internal memory.
Table 1
According to the notion of above-mentioned example, the present invention proposes a kind of method for building up of multi-retrieving table.Fig. 2 is the method for building up process flow diagram of the multi-retrieving table that illustrates according to one embodiment of the invention.Please with reference to Fig. 2, the method for present embodiment is to be used to set up question blank, and for the pairing output data of electronic installation inquiry input data, its detailed step is following:
At first, by electronic installation many input blocks are divided into a plurality of groups (step S210).In one embodiment, electronic installation for example is to distinguish group according to the numeric distribution of input data; And in another embodiment, electronic installation also can decide the number and the size of the group of distinguishing according to the attribute of output data, the size of internal memory, the factors such as speed of processor, and present embodiment does not limit its scope.
Then, to each group many input data and corresponding many output datas (step S220) thereof are provided respectively by electronic installation.Said input data can be produced by electronic installation automatically, and its corresponding output data also can be carried out translation operation and produces to the input data in advance by electronic installation.For example; Said output data can be the result who the input data is carried out one sine function/cosine function (sin/cos) computing gained; Also can be the result who the input data is carried out a division arithmetic or logarithm operation gained; And the size of these input data and output data for example is 16 or other identical or different size, and present embodiment does not limit its scope.
Afterwards, electronic installation is optionally deleted at least one position in its input data promptly at least one question blank in the above-mentioned group, and input data and the corresponding output data thereof that the position deleted in record are in the pairing question blank of this group (step S230).At length say; The possibility of result of many functional operation understands certain special value of some convergence, understand in the not obvious or input data set of some variation in a certain scope; And present embodiment is promptly to these specific parts; Appropriateness is deleted the figure place (also reducing total stroke count of the I/O data of required record indirectly) of the input data that in question blank, write down, so as to reaching the purpose of reduction question blank size.
In view of the above; When electronic installation receives input data; Can obtain pairing output data by the question blank of above-mentioned foundation; And because the size of question blank has been reduced and the figure place of importing data is also deleted, so the data volume that electronic installation need be searched in question blank also can reduce, and can accelerate the speed that data are obtained.
Be noted that in order to make the unlikely due numerical value originally that too departs from of the data of deleting behind the position, present embodiment also carries out the simulation that delete multiple position to each question blank; And calculate the error that adopts every kind of modeling scheme; And can in the permissible scope of computing accuracy, filter out the modeling scheme that can delete that bits number is maximum, delete the figure place and the stroke count of data in the question blank according to this; And reach reduction question blank size, specify with the next embodiment that lifts again.
Fig. 3 is the method for building up process flow diagram of the multi-retrieving table that illustrates according to another embodiment of the present invention.Please with reference to Fig. 3, the method for present embodiment is to be used to set up question blank, and for the pairing output data of electronic installation inquiry input data, its detailed step is following:
At first, by electronic installation many input blocks are divided into a plurality of groups (step S310).Then, to each group many input data and corresponding many output datas (step S320) thereof are provided respectively by electronic installation.The content of above-mentioned steps S310 and S320 is same or similar with the content of the step S210 of previous embodiment and S220, so repeat no more at this.
Yet; Different with previous embodiment is; The electronic installation of present embodiment is after distinguishing the input data; Be further to carry out multiple position to the input data in each group to delete simulation, these delete that simulation is front end position, position, rear end or its combination (step S330) of the different numbers of deletion from a plurality of positions of input data.For instance; Suppose that former input data are 16; 5 positions comprising its integral part of record; And 11 positions of writing down its fraction part, position then provided by the invention deletes that simulation can be with 1 ~ 2 position deletion of 1 ~ 2 position or the rear and front end of 1 ~ 2 position of input data front ends (being integral part), rear end (being fraction part), so as to the figure place of reduction input data.
For instance, Fig. 4 is the example of the multi-retrieving table of the division arithmetic that illustrates according to present embodiment.Please with reference to Fig. 4, suppose that the size of each input data and output data is 16 in the question blank, and comprising 1 sign bits (sign bit), 4 integer-bit, and 11 decimal places.As shown in Figure 4, if will in question blank, write down 16 complete bit data, the form size of required use is up to 2
15* 16.If can delete 2 integer-bit and 2 decimal places wherein, then can the form size be reduced to 2
11* 16.
Table 2 item is listed mean square deviation summation and form size, the wherein N that scheme is deleted in various positions
IAnd N
FInteger-bit and the number of decimal place behind the position deleted in representative respectively, and the operational formula of its mean square deviation summation (MSE) is following:
Wherein, x
-1The floating point values reciprocal of representative input data x,
Then represent x
-1Quantized value.Can know by table 2, the figure place of deleting the more, the whole error of question blank is bigger, but its size then can be reduced the more.
Table 2
(N I,N F) | MSE(dB) | Size (16bits) |
(3,11) | -56.5645 | 16384 |
(2,11) | -36.6489 | 8192 |
(1,11) | -18.745 | 4096 |
(4,10) | -36.8381 | 16384 |
(3,10) | -34.331 | 8192 |
(2,10) | -33.7464 | 4096 |
(1,10) | -18.6785 | 2048 |
(4,9) | -29.0342 | 8192 |
(3,9) | -29.0309 | 4096 |
(2,9) | -28.3438 | 2048 |
(1,9) | -18.3568 | 1024 |
After simulation is deleted in the position that decision institute will carry out, then then calculate various positions and delete in the simulation by electronic installation, deleted the position and the input data do not deleted between error (step S340).Wherein, the error of said input data for example is mean square deviation (Mean Square Error, the MSE) summation between the input data of many corresponding (delete position before and after).
Delete the error of simulation according to above-mentioned various positions, can determine last practiced position to delete modeling scheme, and the bits number (step S350) of input data is deleted in decision at last.The position of wherein, carrying out at last deletes that modeling scheme is to divide other error to decide according to question blank whole error or question blank.
At length say; If will decide the position of in each question blank, carrying out to delete scheme according to the whole error of all question blanks; Then can delete the multiple combination of simulation to the position of all question blanks; Calculate the total error of all question blanks in the various combinations; Then the initial error of this total error with the input data compared afterwards, delete scheme to the practiced position of each question blank at last, and will delete the bits number of importing data at last and select total error and the immediate combination of initial error to decide.
On the other hand; If will decide the position of in each question blank, carrying out to delete scheme according to all other errors of question blanks branch; Then only need to delete the simulation, select the bits number that the error reckling decides the input data of deleting at last in this question blank from the position that each question blank carried out.
At last, electronic installation is promptly deleted scheme according to the position that is determined, deletes the position of input data, and record deleted the input data of position and corresponding output data corresponding question blank (step S360) of group under it thereof, and the foundation of completion multi-retrieving table.
By said method; Present embodiment can be directed against each question blank; Appropriateness is deleted the figure place of its corresponding input data of record; And reduce total stroke count of the I/O data of required record in each question blank, the size that therefore can in the permissible scope of data accuracy, reduce question blank indirectly.Carry out the practical application mode that makes trade-offs between usefulness and the size at question blank with next act one instance explanation said method.
Fig. 5 (a) and Fig. 5 (b) are the example figure of the multi-retrieving table of the divider that illustrates according to present embodiment.Please with reference to Fig. 5 (a) and Fig. 5 (b), present embodiment is to be example with the divider, and the mode of setting up of input data and its multi-retrieving table through between the output data of division arithmetic gained is described.Wherein, present embodiment is that 16 input data x is divided into 4 groups, and its distinguishing rule is following:
x’=x×2
11 (2)
if?x’<=2
5-1
//Table?1
address=x’
elseif?x’<=2
8-1
//Table?2
address=(x’-2
5)>>1
elseif?x’<=2
11-1
//Table?3
address=(x’-2
8)>>4
else
//Table?4
address=(x’-2
11)>>7
In order directly to import the address that data are used as question blank, the data x ' in (2) is multiplied by 2 with input data x (comprising 11 decimal places)
11, so as to converting data x into integer, following for the explanation of above-mentioned Table 1 ~ 4:
About Table 1: present embodiment is that the output data of hypothesis divider adds that by 1 sign bits 6 integer-bit and 9 decimal places form, and this also represents the maximal value of divider should be less than 2
6, the scope that corresponds to the input data can be known: if the input data are less than 2
-6-1, its output can be quantified as (N
I, N
F)=(7,9) maximal value that can represent.Therefore will import data less than 2
-6-1 value is distinguished at same question blank, as long as the input data drop on this scope, can in this question blank, inquire about corresponding output data.(because x has and is multiplied by 211 earlier, the initial conditions of therefore seeing in (2) is 2
-6* 2
11-1=2
5-1)
About Table 2 and Table 3: between 2
-6And the input data between 1 can be divided into two parts, wherein between 2
-6With 2
-3-1 part is Table 2, and between 2
-3With 2
0-1 part then is Table 3.Analog result according to delete the position can be learnt between 2
-6With 2
-3-1 input data must be kept the accuracy of its output data, therefore only delete 1 decimal place; In like manner, can know that according to analog result the input data are between 2
-3With 2
0Can delete more input position at-1 o'clock.
About Tabl e 4: the input data in this form only comprise integer-bit, and comprise under the situation of integer in the input data, and the accuracy of the output data that it is corresponding receives deletes that the influence of decimal digits purpose is less, so decimal place can be deleted in a large number.
The position of above-mentioned each question blank deletes that analog result is shown in table 3, and the numeral in its bracket is represented integer-bit, decimal place and next step decimal bit of deleting of the input data of being distinguished at the beginning respectively.
Table 3
?Table?1 | ?Table?2 | Table?3 | Table?4 | MSE(dB) | Size (16bits) |
?(0,5,0) | ?(0,8,0) | (0,11,0) | (4,11,0) | -64.9281 | 32737 |
?(0,5,0) | ?(0,8,0) | (0,11,0) | (4,11,7) | -38.609 | 2257 |
?(0,5,0) | ?(0,8,0) | (0,11,4) | (4,11,7) | -31.0597 | 577 |
?(0,5,0) | ?(0,8,0) | (0,11,4) | (2,11,7) | -30.2356 | 385 |
?(0,5,0) | ?(0,8,1) | (0,11,4) | (2,11,7) | -28.9486 | 273 |
?(0,5,0) | ?(0,8,2) | (0,11,4) | (2,11,7) | -25.4082 | 217 |
Can know by table 3, delete that at Table 21 position, Table 3 delete 4 positions, and Table 4 deletes under the situation of 7 positions that its error (28.9486) is compared with other analog result and changed not quite.Scheme then can the overall dimensions (Total Size) of question blank be reduced to 273 * 16 shown in Fig. 5 (b) by 32737 * 16 shown in Fig. 5 (a) if select this position to delete.
Be noted that; Select the position of each question blank to delete the scheme except above-mentioned according to error; Present embodiment also comprises that the factor with the systematic memory space adds the judgment criterion that scheme is deleted in the position; To filter out the question blank size can be that scheme is deleted in the position of system's support, specifies with the next embodiment that lifts again.
Fig. 6 is the method for building up process flow diagram of the multi-retrieving table that illustrated according to an embodiment more of the present invention.Please with reference to Fig. 6, the method for present embodiment is to be used to set up question blank, and for the pairing output data of electronic installation inquiry input data, its detailed step is following:
At first, by electronic installation many input blocks are divided into a plurality of groups (step S610).Then, to each group many input data and corresponding many output datas (step S620) thereof are provided respectively by electronic installation.Then, electronic installation can further carry out multiple position to the input data in each group and delete simulation, and these delete that simulation is front end position, position, rear end or its combination (step S630) of the different numbers of deletion from a plurality of positions of input data.The content of above-mentioned steps S610 ~ S630 is same or similar with the content of the step S310 ~ S330 of previous embodiment, so repeat no more at this.
Yet; Different with previous embodiment is; The electronic installation of present embodiment also comprises after calculating each deletes the position of deleting different numbers in the simulation being used for writing down input data and the corresponding required form size (step S640) of output data thereof of having deleted the position after simulation is deleted in the position of each question blank of decision.
And when determining that modeling scheme is deleted in the last position of selecting; Then be earlier each to be deleted that the error of simulation and preset threshold value compare; Delete simulation (step S650) with Select Error less than the position of threshold value (being in the error tolerance interval); Relatively these delete the form size that simulation is required more afterwards, and the bits number (step S660) of input data is deleted in decision according to this at last.
For instance, table 4 is to list out its three kinds of positions respectively to the Table 2 ~ 4 in the aforementioned table 3 to delete Simulation result.If preset error threshold be-15dB, then can select (0,8,0) and delete modeling scheme with the position of (0,8,1) for Table 2, its form size relatively again, that then can select size less (112) deletes modeling scheme (0,8,1).In like manner, can select (0,11,4) respectively for Table 3 and 4 of Table and delete modeling scheme with the position of (2,11,7).
Table 4
Table?2 | MSE(dB) | Size (16bits) |
(0,8,0) | -65.2988 | 224 |
(0,8,1) | -15.1960 | 112 |
(0,8,2) | -7.4788 | 56 |
Table?3 | MSE(dB) | Size (16bits) |
(0,11,0) | -64.8281 | 1792 |
(0,11,2) | -39.1220 | 448 |
(0,11,4) | -2535257 | 112 |
Table?4 | MSE(dB) | Size (16bits) |
(4,11,0) | -64.9538 | 30720 |
(2,11,0) | -37.3120 | 6144 |
(2,11,7) | -34.0092 | 48 |
What need explanation is by the question blank method for building up of the foregoing description, can effectively reduce the size of question blank, and reduce the stroke count of the I/O data of required storage.And because the stroke count of input data reduces, relatively write down the mode of this input data address and also can simplify.At length say, electronic installation is deleted the position and set up corresponding question blank to the input data of each group after, can calculate the form size of each question blank of having deleted input data and the corresponding output data thereof of position in order to record.And according to the input data threshold value and delete the position, the input data can calculate the pairing address of input data in these question blanks.Wherein, electronic installation can independently be set up corresponding address to the input data in each question blank, also can be contacted in the address of input data in these question blanks, makes that the address of input data is continuous.
In another embodiment, the method for building up of multi-retrieving table also can be applicable to logarithm operation.Wherein, logarithm operation has a special rules, that is, suppose a numerical value A
1Logarithm value be B
1, B wherein
1=10log
10A
1If a numerical value A is arranged
2Binary sequence be numerical value A
1To position of right translation (that is numerical value A
2Be numerical value A
1Half the), its logarithm value B then
2Can be directly from numerical value A
1Logarithm value be B
1Push away, and need not additional records logarithm value B in question blank
2, its formula is following:
According to above-mentioned rule; Present embodiment i.e. search window that width is the N position of slip in the binary sequence of a raw data; And thus the highest significant position of binary sequence (Most Significant Bit, MSB) sweep to least significant bit (LSB) (Least Significant Bit, LSB); So as to searching numerical value in the binary sequence is 1 the 1st position, and wherein N is a positive integer.
Fig. 7 is the N position search window that is illustrated according to an embodiment.Please with reference to Fig. 7, suppose that raw data 710 has L position, and search window 700 has N position, wherein L, N are positive integer, and N is less than L.Wherein, search window 700 for example is that to begin to search numerical value wherein be 1 the 1st position for highest significant position from the binary sequence of raw data 710.When search window 700 when to sweep to numerical value be the 1st position of 1, be about to the input data of the numerical value of N position in this search window 700, and be recorded in one first question blank as these raw data 710 correspondences.Be noted that; If search window 700 when the least significant bit (LSB) of the binary sequence of sweeping to raw data 720, do not sweep to yet any numerical value be 1 the position; Then need last N numerical value separate records with this raw data 720 in one second question blank, so that the question blank of being set up can correspond to the numerical value of this raw data 720.
Fig. 8 is the example that changes the question blank of logarithm according to the linearity that an embodiment is illustrated.Please with reference to Fig. 8, present embodiment is that two question blanks (i.e. first question blank 830 and second question blank 840) that adopt aforesaid way to set up are inquired about the logarithm value of importing data 810.Wherein, present embodiment is to utilize electronic installation width of slip on the binary sequence of input data 810 to be the search window 800 of N position, is 1 position with the numerical value of searching the 1st appearance on the binary sequence.Wherein, If it is 1 position that electronic installation searches numerical value; Be about to this numerical value and be 1 the 1st position with and subsequent the numerical value of N-1 position be input to multiplexer 820, multiplexer 820 promptly can select to use first question blank 830 to obtain the logarithm value of the N position of being swept to by search window 800 at this moment.In addition, electronic installation is when position of 1 searching numerical value, comprises that also the figure place M that search window 800 is slided on binary sequence 810 exports multiplier 850 to, (is 10log and by multiplier 850 this figure place M is multiplied by 3.01171875
10Approximate value after 2 quantifications) after, export operation result to totalizer 860, the output data of by totalizer 860 multiplexer 820 being obtained from first question blank 830 again adds the operation result of multiplier 850, and the logarithm value 870 of input-output data 810.
On the other hand; If it is 1 position that electronic installation does not search numerical value; Then can not arrive multiplexer 820 by input value (or input value is 0 the 1st position), promptly can select to use second question blank 840 to obtain the logarithm value of the N position of being swept to by search window 800 this moment.In addition; Electronic installation is when position of 1 not searching numerical value; Can not export the figure place M (or exporting 0) that search window 800 slides, so totalizer 860 only can obtain the output data that multiplexer 820 obtains from second question blank 840, and the logarithm value 870 of input-output data 810.
To the inquiry mode of above-mentioned linearity commentaries on classics logarithm, present embodiment also provides corresponding data capture method.Fig. 9 is the data capture method process flow diagram that utilizes the multi-retrieving table that is illustrated according to an embodiment.Please with reference to Fig. 9, the method for present embodiment is to be used to set up question blank, and for the pairing output data of electronic installation inquiry input data, its detailed step is following:
At first; By electronic installation a plurality of question blanks are provided; Wherein each question blank is to delete at least one position in its a plurality of positions to having divided into one of them many input data of a plurality of groups, and input data and corresponding many output datas (step S910) thereof behind the position deleted in record.Wherein, above-mentioned steps for example is the figure place that the size according to a search window is deleted the input data, and record has deleted that input data and corresponding output data thereof behind the position is in the question blank of correspondence.In addition, this step also comprises the input data that can't search corresponding position to this search window, sets up a question blank in addition and stores this a little input data and corresponding output data thereof.
Then, receive input data (step S920), so as to from described question blank, obtaining output data corresponding to these input data by electronic installation.Saying that at length electronic installation is the search window that on the binary sequence of the input data that received, slides, is 1 the 1st position (step S930) to search numerical value, and wherein search window has a plurality of positions of a preset number.
To search numerical value be 1 the 1st position if having; Then electronic installation can utilize a plurality of position in this search window as a data query; And obtain in the said question blank corresponding output data; And add the correction term that the figure place of being slided by search window is calculated, with as the said last output datas that corresponded to of input data (step S940).Wherein, described correction term for example is that the figure place that search window slides is multiplied by 3.01171875 (is 10log
10Approximate value after 2 quantifications).
Otherwise; If do not search numerical value is 1 the 1st position; Then the electronic installation a plurality of position that can utilize binary sequence rearmost end number to equal preset number is used as data query; And obtain in the said question blank corresponding output data, with as the said last output datas that corresponded to of input data (step S950).
It should be noted that; Above-mentioned electronic installation is when the slip search window is the 1st position of 1 to search numerical value on binary sequence; Can be that highest significant position by binary sequence slides into least significant bit (LSB), be 1 the 1st position so as to searching numerical value, and present embodiment does not limit its scope.
In sum; The method for building up of the multi-retrieving table of present embodiment and to utilize the data capture method of multi-retrieving table be that numeric distribution, attribute or system environments to the I/O data is divided into a plurality of groups with data; To set up corresponding a plurality of question blanks; And optionally delete input section data position in each question blank, thereby the size of reduction question blank.Whereby, present embodiment can reduce the required memory space of record queries table, and can accelerate processor obtains data in question blank speed.
Certainly; The present invention also can have other various embodiments; Under the situation that does not deviate from spirit of the present invention and essence thereof; Those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.
Claims (12)
1. the method for building up of a multi-retrieving table is used for the data operation of a processor, it is characterized in that, comprises the following steps:
Distinguishing many input data is a plurality of groups;
To this group respectively many input data and many corresponding output datas thereof are provided respectively, to set up corresponding a plurality of question blanks;
To each question blank in one or more groups, optionally delete at least one position of these input data wherein, and input data and the corresponding output data thereof that the position deleted in record are in the pairing question blank of this group.
2. the method for building up of multi-retrieving table according to claim 1 is characterized in that, distinguishes these input data and comprises for the step of this group:
According to a numeric distribution of these input data, distinguishing the input data to be this group.
3. the method for building up of multi-retrieving table according to claim 1; It is characterized in that; To each question blank in one or more groups; Optionally delete wherein at least one position of these input data, and record has deleted that the input data of position and corresponding output data thereof comprise in the step of this pairing question blank of group:
Carry out multiple position to these input data in this group and delete simulation, this deletes that simulation is front end position, position, rear end or its combination of deleting different numbers in this of this input data;
Calculate respectively this position and delete in the simulation, deleted an error of position and these input data of not deleting;
According to this error, the bits number of these input data is deleted in decision at last; And
Record has deleted that input data and the corresponding output data thereof of position are in the pairing question blank of this group.
4. the method for building up of multi-retrieving table according to claim 3 is characterized in that, according to this error, decision deletes that at last the step of the bits number of these input data comprises:
To the multiple combination of this question blank carried out the position deletes simulation, calculate respectively should combination in a total error of all question blanks; And
One initial error of the difference error that respectively should make up or this total error and this input data is compared, and Select Error and the immediate combination of this initial error decide the bits number of deleting these input data at last.
5. the method for building up of multi-retrieving table according to claim 1 is characterized in that, after respectively this deletes the step of simulating front end position, position, rear end or its combination of different numbers in this that delete these input data, more comprises:
Calculate after respectively this deletes that the position of different numbers is deleted in simulation, the input data and the corresponding required form size of output data thereof of position deleted in record.
6. the method for building up of multi-retrieving table according to claim 5 is characterized in that, according to this error, decision deletes that at last the step of the bits number of these input data comprises:
This this error and threshold ratio of deleting simulation is respectively deleted simulation with Select Error less than at least one position of this threshold value; And
The form size that simulation is required is deleted in more selected this at least one position, and the bits number of these input data is deleted in decision according to this at last.
7. the method for building up of multi-retrieving table according to claim 1 is characterized in that, being directed against the respectively input data of this group, optionally deletes after at least one the step wherein, more comprises:
The form size of question blank of input data and the corresponding output data thereof of position has been deleted in calculating in order to record; And
According to the form size of this question blank respectively, calculate the corresponding a plurality of addresses of input data in this question blank.
8. according to the method for building up of claim 7 a described multi-retrieving table, it is characterized in that the pairing address of input data of this question blank is to set up continuously or independently.
9. the method for building up of multi-retrieving table according to claim 1; It is characterized in that; Be directed against the respectively input data of this group; Optionally delete at least one position wherein, and record has deleted that input data and the corresponding output data thereof of position after the step of this pairing question blank of group, more comprise:
Calculate a respectively correction term of this output data, and be recorded in corresponding question blank.
10. data capture method that utilizes the multi-retrieving table is used for the data operation of a processor, it is characterized in that, comprises the following steps:
A plurality of question blanks are provided, and wherein respectively this question blank is to many input data dividing into a plurality of groups, optionally delete at least one position wherein, and the input data and many corresponding output datas thereof of position has been deleted in record;
Receive and to import data; And
Obtain in this question blank output data corresponding to these input data.
11. the data capture method that utilizes the multi-retrieving table according to claim 10 is characterized in that, provides the step of a plurality of question blanks more to comprise:
A respectively correction term of this output data is provided.
12. the data capture method that utilizes the multi-retrieving table according to claim 11 is characterized in that, the step of obtaining in this question blank corresponding to the output data of these input data more comprises:
Obtain this corresponding correction term of this output data, and in order to revise the output data of obtaining by this question blank.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010102713541A CN102385589A (en) | 2010-08-31 | 2010-08-31 | Method for establishing multiple look-up tables and data acquisition method by using multiple look-up tables |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010102713541A CN102385589A (en) | 2010-08-31 | 2010-08-31 | Method for establishing multiple look-up tables and data acquisition method by using multiple look-up tables |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102385589A true CN102385589A (en) | 2012-03-21 |
Family
ID=45825009
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2010102713541A Pending CN102385589A (en) | 2010-08-31 | 2010-08-31 | Method for establishing multiple look-up tables and data acquisition method by using multiple look-up tables |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102385589A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106802897A (en) * | 2015-11-26 | 2017-06-06 | 北京国双科技有限公司 | Lookup table data synchronous method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6900747B2 (en) * | 2002-11-11 | 2005-05-31 | Samsung Electronics, Co., Ltd. | Method of compressing lookup table for reducing memory, non-linear function generating apparatus having lookup table compressed using the method, and non-linear function generating method |
US20050254706A1 (en) * | 2004-05-13 | 2005-11-17 | Bailey James R | Method of an image processor for transforming a n-bit data packet to a m-bit data packet using a lookup table |
US20090024643A1 (en) * | 2005-07-22 | 2009-01-22 | X-Engines, Inc | Multi-Level Compressed Look-up Tables Formed by Logical Operations to Compress Selected Index Bits |
CN101595471A (en) * | 2005-06-03 | 2009-12-02 | 奥姆尼图雷有限公司 | Add segmentation criteria to the data set increment |
-
2010
- 2010-08-31 CN CN2010102713541A patent/CN102385589A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6900747B2 (en) * | 2002-11-11 | 2005-05-31 | Samsung Electronics, Co., Ltd. | Method of compressing lookup table for reducing memory, non-linear function generating apparatus having lookup table compressed using the method, and non-linear function generating method |
US20050254706A1 (en) * | 2004-05-13 | 2005-11-17 | Bailey James R | Method of an image processor for transforming a n-bit data packet to a m-bit data packet using a lookup table |
CN101595471A (en) * | 2005-06-03 | 2009-12-02 | 奥姆尼图雷有限公司 | Add segmentation criteria to the data set increment |
US20090024643A1 (en) * | 2005-07-22 | 2009-01-22 | X-Engines, Inc | Multi-Level Compressed Look-up Tables Formed by Logical Operations to Compress Selected Index Bits |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106802897A (en) * | 2015-11-26 | 2017-06-06 | 北京国双科技有限公司 | Lookup table data synchronous method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103514201B (en) | Method and device for querying data in non-relational database | |
CN102129458B (en) | Method and device for storing relational database | |
CN110688393B (en) | Query statement optimization method and device, computer equipment and storage medium | |
US20110010509A1 (en) | System and method of sorting and calculating statistics on large data sets with a known value range | |
CN102411616B (en) | Method and system for storing data and data management method | |
CN104765731A (en) | Database query optimization method and equipment | |
US20200185058A1 (en) | Gene sequencing data compression preprocessing, compression and decompression method, system, and computer-readable medium | |
CN112953550A (en) | Data compression method, electronic device and storage medium | |
CN103002061A (en) | Method and device for mutual conversion of long domain names and short domain names | |
CN104123375A (en) | Data search method and system | |
US20140052727A1 (en) | Data processing for database aggregation operation | |
CN103514291A (en) | Method for displaying tree structure data in text | |
CN101499065A (en) | Table item compression method and device based on FA, table item matching method and device | |
CN102880615A (en) | Data storage method and device | |
US10235401B2 (en) | Method and system for handling binary large objects | |
CN106021579A (en) | Compression method of historical database | |
CN108133005B (en) | Environment model simulation method based on memory database, terminal equipment and storage medium | |
CN115698978A (en) | Efficient scanning through full bitmap indexing of columnar storage formats | |
CN102385589A (en) | Method for establishing multiple look-up tables and data acquisition method by using multiple look-up tables | |
CN108628892B (en) | Method and device for storing ordered data, electronic equipment and readable storage medium | |
CN104679721A (en) | Operation method of FFT (Fast Fourier Transformation) processor | |
CN109542912B (en) | Interval data storage method, device, server and storage medium | |
CN108647243B (en) | Industrial big data storage method based on time series | |
CN114048238B (en) | Storage method and device for industrial equipment time sequence data and electronic equipment | |
CN116521733A (en) | Data query method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20120321 |