CN101859325B - Method and device for searching and processing data table items - Google Patents

Method and device for searching and processing data table items Download PDF

Info

Publication number
CN101859325B
CN101859325B CN2010101948164A CN201010194816A CN101859325B CN 101859325 B CN101859325 B CN 101859325B CN 2010101948164 A CN2010101948164 A CN 2010101948164A CN 201010194816 A CN201010194816 A CN 201010194816A CN 101859325 B CN101859325 B CN 101859325B
Authority
CN
China
Prior art keywords
tag field
enable flag
sub
data table
table items
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.)
Expired - Fee Related
Application number
CN2010101948164A
Other languages
Chinese (zh)
Other versions
CN101859325A (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.)
Kunshan national inspection union Mdt InfoTech 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 CN2010101948164A priority Critical patent/CN101859325B/en
Publication of CN101859325A publication Critical patent/CN101859325A/en
Application granted granted Critical
Publication of CN101859325B publication Critical patent/CN101859325B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Near-Field Transmission Systems (AREA)

Abstract

The embodiment of the invention provides a method and a device for searching and processing data table items. The data table items comprise tag fields and data fields corresponding to tag bits in the tag fields. The method comprises the following steps of: searching enabling tag bits in the tag fields; and skipping to the data fields corresponding to the enabling tag bits to process codes. The embodiment of the invention does not need to execute the processing codes corresponding to all tag bits in the data table items by directly searching the enabling tag bits in the tag fields and executing the processing codes corresponding to the enabling tag bits, and the embodiment of the invention is implemented only by a piece of hardware instruction so as to effectively improve the work efficiency of a processor.

Description

A kind of data table items search disposal route and device
Technical field
The present invention relates to network equipment field, what relate in particular to a kind of data table items in the network equipment searches disposal route and device.
Background technology
Current processor generally all has tables look-up and the function of deal with data list item, and some processor is comparatively strict to the requirement of this function, needs and can search at a high speed and the deal with data list item, such as network processing unit.Generally comprise in a kind of typical data table items structure tag field and with this tag field in the corresponding data field of marker bit; When if certain marker bit of tag field enables when " 1 " (this field for), will go the corresponding data field reading of data line code of going forward side by side to handle.
The existing a plurality of if statements of the general employing of the pairing C Language Processing of data table items process code of searching, promptly certain marker bit is 1 in the if tag field, just handles corresponding operation.Processing when present various processor all is false for the if IF block mainly comprises following dual mode:
1, utilize the jump statement to jump to next bar instruction of the last item instruction in the if IF block;
2, still continue to carry out all operations behind the if, but all execution results do not come into force.
But jump statement in above-mentioned technological 1 is owing to exist risk; The careful usefulness of all clear and definite notifying program person in the processor of a lot of frameworks; And the poor efficiency of the execution of instruction in above-mentioned technological 2 equals the pairing processing code of all marker bits in the data table items is all carried out one time.In addition, on hardware was realized, above-mentioned each if operation all can corresponding hardware instruction, and this is a kind of waste to the processor instruction execution route, also can cause processor to carry out the reduction of efficient.
Summary of the invention
What the embodiment of the invention provided a kind of data table items searches disposal route and device, is used for improving processor and is carrying out the operational paradigm of searching processing procedure of data table items.
On the one hand; The embodiment of the invention has proposed a kind of method of searching processing of data table items; Said data table items comprise tag field and with said tag field in the corresponding data field of marker bit; Said method takies a hardware instruction, and said method comprises: search the enable flag position in the said tag field; Jump to the pairing data field in said enable flag position and carry out code process.
On the other hand; The embodiment of the invention has also proposed a kind of treating apparatus of searching of data table items; Said data table items comprise tag field and with said tag field in the corresponding data field of marker bit; Said device comprises: search the unit, be used for searching the enable flag position of said tag field; The redirect performance element is used to jump to the pairing data field in said enable flag position and carries out code process.
On the other hand, the embodiment of the invention has also proposed a kind of processor, comprises aforesaid device.
The embodiment of the invention is through directly searching the enable flag position in the tag field and carry out this pairing processing code in enable flag position, and the embodiment of the invention only need utilize a hardware instruction to realize.Make the embodiment of the invention need not carry out the pairing processing code of all marker bits in the data table items, effectively improved the work efficiency of processor.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; The accompanying drawing of required use is done to introduce simply in will describing embodiment below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work property, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the structural representation of a kind of typical data table items in the existing processor;
The schematic flow sheet of the method for searching processing of a kind of data table items that Fig. 2 provides for the embodiment of the invention;
The schematic flow sheet of the method for searching processing of the another kind of data table items that Fig. 3 provides for the embodiment of the invention;
Fig. 4 searches the processed instruction schematic flow sheet for a kind of data table items of the embodiment of the invention;
The schematic flow sheet of the method for searching processing of the another kind of data table items that Fig. 5 provides for the embodiment of the invention;
The structural representation of searching treating apparatus of a kind of data table items that Fig. 6 provides for the embodiment of the invention;
The structural representation of searching treating apparatus of the another kind of data table items that Fig. 7 provides for the embodiment of the invention;
The structural representation of searching treating apparatus of the another kind of data table items that Fig. 8 provides for the embodiment of the invention;
The structural representation of a kind of processor that Fig. 9 provides for the embodiment of the invention.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Be illustrated in figure 1 as the structural representation of a kind of typical data table items in the existing processor; This data table items is 32 a data table items; Wherein the marker bit in the tag field is respectively F1-F8; Be respectively Field_1-Field_8 with the corresponding data field of marker bit, when certain marker bit enabled in the tag field, processor will go corresponding data field to obtain data to carry out code process; Such as when F1 and F3 enable, processor can go Field_1 and Field_3 to obtain data to carry out code process.
Be illustrated in figure 2 as the schematic flow sheet of the method for searching processing of a kind of data table items that the embodiment of the invention provides, this method comprises:
S201: search the enable flag position in the said tag field;
Need not carry out the pairing processing code of all marker bits in the tag field in the present embodiment, but directly find the enable flag position in this tag field, and then carry out this pairing processing code in enable flag position.The mode of directly searching the enable flag position in the present embodiment can have multiple, does not limit at this.
S202: jump to the pairing data field in said enable flag position and carry out code process.
It is to be noted; In embodiments of the present invention; Be after finding an enable flag position through S201, to jump to this pairing data field in enable flag position at once and carry out code process, after finishing dealing with; Continue to search next enable flag position again, till all pairing processing code in enable flag position all obtain handling in tag field.
The embodiment of the invention is through directly searching the enable flag position in the tag field and carry out this pairing processing code in enable flag position, and the embodiment of the invention only need utilize a hardware instruction to realize.Make the embodiment of the invention need not carry out the pairing processing code of all marker bits in the data table items, effectively improved the work efficiency of processor.
Be illustrated in figure 3 as the schematic flow sheet of the method for searching processing of the another kind of data table items that the embodiment of the invention provides, come the embodiment of the invention is described below in conjunction with Fig. 1 and Fig. 3, this method comprises:
S301: the tag field in the data table items is carried out the value that shifting function influences carry flag carry-flag;
Data table items generally is stored in the internal memory, when system need operate this data table items, can it be read in the register, and then operate.The embodiment of the invention is carried out associative operation after promptly can data table items shown in Figure 1 being read in one 32 registers that perhaps capacity is bigger again.
On concrete the realization, S301 can realize through processor, such as; Data table items is stored in the internal memory of processor, when needs carried out shifting function, processor read this data table items in one register; Then through arithmetic logical unti in the processor (Arithmetic Logic Unit, the shift unit (Shift) in ALU) is accomplished shifting function, when ALU accomplishes a shifting function; Last position that is moved out of will be kept among the Carry-flag of flag register; With data table items shown in Figure 1 is example, and a shifting function described in the embodiment of the invention is meant the single job of the some marker bits in the tag field being shifted out data table items; Such as 9bit that F1 is moved to left, or with the F2 10bit etc. that moves to left.Because the embodiment of the invention needs in the judgment data list item value of each marker bit on the tag field; Therefore can utilize the shifting function of tag field to influence the value of Carry-flag, and then judge the value on certain marker bit in this tag field according to the value of Carry-flag.
In addition, it is pointed out that among the S301 that the value that the shifting function to tag field is actually whole data table items moves to left or right-shift operation; With data table items shown in Figure 1 is example; If move to left, the 9bit position just can make tag field have influence on the value of Carry-flag because F1 in the 23bit position, therefore need move to left one 32 data at least; And since F8 in the 16bit position, the scope that therefore moves to left should be between 9bit-16bit; If move to right, because F8 is in the 16bit position, 17 the bit positions that therefore need move to right at least just can make F8 begin to have influence on the value of Carry-flag, and since F1 in the 23bit position, the scope that therefore moves to right should be between 17bit-24bit.It is pointed out that also that in order not change the structure of raw data list item do not have write back operations after each shifting function, each shifting function all is on the basis of raw data list item, to carry out.
S302: the value according to carry-flag finds the enable flag position on direction of displacement in the tag field.
Can know by S301 since can influence after the displacement value of Carry-flag, be example therefore with moving to left of data table items among Fig. 1, if the scope that moves to left between 9bit-16bit the time, the value that the interior value of Carry-flag just is followed successively by on the F1-F8 marker bit is replaced.Therefore only need to judge the value of Carry-flag, promptly know the value on the respective markers position in the tag field.
Specifically, be when tag field shifts out said data table items by turn, judge the state of carry-flag, if be 1, the then current marker bit that shifts out said data table items is the enable flag position, gets into S303 and carries out code process; If be 0, then continue the marker bit that does not shift out in the said tag field is carried out the state that shifting function influences carry-flag.
In order to carry out the skip operation of follow-up shifting function and S303 on the basis of realizing to be shifted in front; When tag field shifts out said data table items by turn, can and note the current position number of marker bit in said tag field that shifts out said data table items in the present embodiment with current PC pointer pop down.This position number is the number that shows that marker bit puts in order in tag field, is respectively 1-8 such as the position number of the marker bit F1-F8 among Fig. 1.
Moving to left with tag field shown in Figure 1 is example, when F1 moves to left nine displacements when going out said data table items, is about to current PC pointer pop down, and notes position number 1, and then judge the value of carry-flag:
If be 0, then jump to call stack PC place, the marker bit that does not shift out on the basis of the current marker bit that shifts out data table items, continuing data table items carries out the value that shifting function influences carry-flag;
If be 1, then jump to the PC+1 place and carry out this processing code, promptly carry out S303.
S303: jump to the pairing data field in enable flag position and carry out code process.
It is to be noted; After executing this S303; Can move the return instruction and return S301; Owing to, therefore can begin to continue to seek next enable flag position through PC pointer pop down aforementioned, all dispose up to all pairing processing code in enable flag position from above-mentioned enable flag position.
The embodiment of the invention utilizes shifting function to come whole marker bits are judged; And then only carry out the processing code at enable flag position place; Avoided carrying out the processing code of all marker bits; And the shifting function of the embodiment of the invention only need take a hardware instruction in realization and can realize, has therefore improved the efficient of the actual execution of processor.
Come the foregoing description is further described through a concrete instruction flow below, be illustrated in figure 4 as the embodiment of the invention a kind of data table items search the processed instruction schematic flow sheet, this instruction flow can comprise
S401: judge whether this cue mark f equals false, if then get into S402; If, then do not get into S405;
It is to be noted that the initial value of mark f is false when carrying out this instruction for the first time.
S402: tagging f equals ture;
S403: the initial data (a) of initialization tag field shifting scope and end data (b); With data table items shown in Figure 1 is example, a=9 after the initialization, b=16;
S404: the current position number c that shifts out data table items of initialization makes c=0;
S405: be pressed into the current PC pointer in the function call stack;
S406: whether judge a greater than b, if greater than would get into S407; If less than, then get into S408;
S407: remove the operation mark, make f equal false, and entering S411 finishes whole instruction;
S408: the shift unit that uses ALU is with the register data a position that moves to left;
S409: a and c are added 1 on the original basis;
S410: judge that whether the carry-flag position is true, if be true, then gets into S411; If, then get into S412 for not;
S411: jump to instruction place of call stack PC+c position, execute instruction back operation return instruction and return S401; If through S407 and get into S411 and since this moment c the position of last instruction inlet of this instruction group of value more than 1, just equal to have jumped out whole instruction group so carry out S411 at this moment, this instruction is through with.
S412: jump to call stack PC, promptly move the return instruction and return S401.
The embodiment of the invention utilizes shifting function to come whole marker bits are judged; And then only carry out the processing code at enable flag position place; Avoided carrying out the processing code of all marker bits; And the shifting function of the embodiment of the invention only need take a hardware instruction in realization and can realize, has therefore improved the efficient of the actual execution of processor.
Be illustrated in figure 5 as the schematic flow sheet of the method for searching processing of the another kind of data table items that the embodiment of the invention provides, this method comprises:
S501: it is the individual sub-tag field of n that said tag field is divided equally, and n is the integer more than or equal to 1;
In the present embodiment; Can do whole tag field as a whole; Also can it be divided equally and be a plurality of sub-tag fields; With Fig. 1 is example, and such as can tag field being divided into 2 sub-tag field: F1-F4 and F5-F8, each sub-tag field all comprises 4 marker bits in the present embodiment.
S502: each sub-tag field is carried out many bits relatively obtain an output valve A;
Many bits in the present embodiment are meant relatively according to a plurality of marker bits in the sub-tag field and obtain an output valve A that this output valve A can represent residing position in this sub-tag field, first enable flag position.In concrete the realization; Can in the inner process chip of processor, realize a hardware logic; Such as being called MCMP (Multi Compare) logic; The input of this MCMP logic is the binary coding of a certain width, and output valve A is a numeral, represents first non-0 position in this input binary coding.See also table 1, it is for being 4 when being binary coding when input coding, the output result of this MCMP logic:
The input of MCMP logic The output of MCMP logic
0000 0
0001 4
0010 3
0011 3
0100 2
0101 2
0110 2
0111 2
1000 1
1001 1
1010 1
1011 1
1100 1
1101 1
1110 1
1111 1
Table 1
S503: obtain the enable flag position in said each sub-tag field according to output valve A.
S504: jump to the pairing data field in enable flag position and carry out code process.
It is to be noted; In embodiments of the present invention; Be after finding an enable flag position through S503, to jump to this pairing data field in enable flag position at once and carry out code process, after finishing dealing with; Continue again to search the next enable flag position in the above-mentioned tag field, till all pairing processing code in enable flag position all obtain handling in each sub-tag field.
For realize above-mentioned redirect and enable flag position continue search, also can carry out many bits relatively before current PC pointer pop down just.
Below in conjunction with Fig. 1 above-mentioned S502-S504 is done further detailed description:
Tag field among Fig. 1 is divided into: the first sub-tag field (F1-F4), the second sub-tag field F5-F8, suppose that F2, F3 and F7 are the enable flag position.
Then at first the first sub-tag field (0110) is carried out many bits relatively,, can obtain output valve A=2 according to table 1; Thereby confirm that F2 is the enable flag position, corresponding processing code is carried out in the position that then jumps to PC+X+2, and (X is an accumulator register, and its initial value is 0; Whenever change a sub-tag field, X can add the figure place of this sub-tag field, is 4 in the present embodiment); Simultaneously, with the F2 zero clearing; After executing above-mentioned processing code, operation return instruction continues the first sub-tag field (0010) is carried out many bits relatively; According to table 1; Can obtain output valve A=3 this moment, thereby confirm that F3 is the enable flag position, corresponding processing code is carried out in the position that then jumps to PC+0+3; Simultaneously, with the F3 zero clearing; Move the return instruction then, continue the first sub-tag field (0000) is carried out many bits relatively, according to table 1; Obtain output valve A=0; Then begin the second sub-tag field (0010) is carried out many bits relatively, obtain output valve A=3, thereby confirm that F7 is the enable flag position; Corresponding processing code is carried out in the position that then jumps to PC+4+3 (PC+7), then with the F7 zero clearing; Move return instruction once more, again the second sub-tag field (0000) is carried out many bits relatively, obtain output valve A=0,, then finish the processing of searching of this data table items because all sub-tag fields were all judged and finished this moment.
It is thus clear that; Among the pairing embodiment of Fig. 3; No matter employing moves to left or right-shift operation, all need carry out 8 times, and only need just can find out above-mentioned 3 enable flag positions 5 times in the embodiment of the invention; Become 8 if MCMP is imported width, then the embodiment of the invention only need be carried out and just can find above-mentioned 3 enable flag positions for 4 times.Many bits of embodiment of the invention comparative approach also only need take a hardware instruction in addition; Therefore the embodiment of the invention not only can only be carried out the processing code at place, enable flag position; Execution command is simplified, has further improved the efficient of the actual execution of processor.
Be illustrated in figure 6 as the structural representation of searching treating apparatus of a kind of data table items that the embodiment of the invention provides, state in the present embodiment data table items comprise tag field and with said tag field in the corresponding data field of marker bit.This device comprises: search unit 610 and redirect performance element 620, wherein:
Search unit 610 and be used for searching the enable flag position of tag field.
Need not carry out the pairing processing code of all marker bits in the tag field in the present embodiment; But directly find the enable flag position in this tag field, and then carry out this pairing processing code in enable flag position through redirect processing unit 620 through searching unit 610.The mode of directly searching the enable flag position in the present embodiment can have multiple, does not limit at this.
Redirect processing unit 620 is used to jump to the pairing data field in enable flag position and carries out code process.
It is to be noted; In embodiments of the present invention; Be that redirect processing unit 620 jumps to this pairing data field in enable flag position at once and carries out code process, after finishing dealing with after searching unit 610 and finding an enable flag position; Search unit 610 and continue to search next enable flag position again, till all pairing processing code in enable flag position all obtain handling in tag field.
The embodiment of the invention is through directly searching the enable flag position in the tag field and carry out this pairing processing code in enable flag position, and the embodiment of the invention only need utilize a hardware instruction to realize.Make the embodiment of the invention need not carry out the pairing processing code of all marker bits in the data table items, effectively improved the work efficiency of processor.
Be illustrated in figure 7 as the structural representation of searching treating apparatus of the another kind of data table items that the embodiment of the invention provides; This device comprises: search unit 710 and redirect performance element 720, wherein search unit 710 and comprise that again shift module 711 and enable flag search module 712.
Shift module 711 is used for tag field is carried out the value that shifting function influences carry flag carry-flag.
The value that the shifting function of 711 pairs of tag fields of shift module is actually whole data table items in the embodiment of the invention moves to left or right-shift operation; With data table items shown in Figure 1 is example; If move to left, the 9bit position just can make tag field have influence on the value of Carry-flag because F 1 in the 23bit position, therefore need move to left one 32 data at least; And since F8 in the 16bit position, the scope that therefore moves to left should be between 9bit-16bit; If move to right, because F8 is in the 16bit position, 17 the bit positions that therefore need move to right at least just can make F8 begin to have influence on the value of Carry-flag, and since F1 in the 23bit position, the scope that therefore moves to right should be between 17bit-24bit.It is pointed out that also that in order not change the structure of raw data list item do not have write back operations after each shifting function, each shifting function all is on the basis of raw data list item, to carry out.
Enable flag is searched module 712 and is used for finding the enable flag position of said tag field on direction of displacement according to the value of carry-flag.
Since can influence after the displacement value of Carry-flag, be example therefore with moving to left of data table items among Fig. 1, if the scope that moves to left between 9bit-16bit the time, the value that the interior value of Carry-flag just is followed successively by on the F1-F8 marker bit is replaced.Therefore only need to judge the value of Carry-flag, promptly know the value on the respective markers position in the tag field.
Specifically; Enable flag is searched module 712 and specifically can be used for: when shift module 711 shifts out said data table items by turn with tag field; Judge the state of carry-flag; If be 1, confirm that then the current marker bit that shifts out said data table items is the enable flag position, makes redirect performance element 720 to carry out relevant treatment according to this enable flag position; If be 0, then notify shift module 711 that the marker bit that does not shift out in the said tag field is carried out the value that shifting function influences carry-flag.
Similar among the embodiment of redirect performance element 720 and Fig. 6 correspondence, repeat no more once more.
It is to be noted; Redirect performance element 720 is after executing a pairing processing code in enable flag position; Search module 712 and can begin from above-mentioned enable flag position to continue to seek next enable flag position, all dispose up to all pairing processing code in enable flag position.
The embodiment of the invention utilizes shifting function to come whole marker bits are judged; And then only carry out the processing code at enable flag position place; Avoided carrying out the processing code of all marker bits; And the shifting function of the embodiment of the invention only need take a hardware instruction in realization and can realize, has therefore improved the efficient of the actual execution of processor.
Be illustrated in figure 8 as the structural representation of searching treating apparatus of the another kind of data table items that the embodiment of the invention provides; This device comprises: search unit 810 and redirect performance element 820, wherein search unit 810 and comprise segmentation module 811, many bits comparison module 812 and enable flag acquisition module 813 again.
Segmentation module 811 is used for tag field is divided into n sub-tag field, and n is the integer more than or equal to 1.
In the present embodiment; Can be with whole tag field as 1 integral body, also can it be divided equally and be a plurality of sub-tag fields, be example with Fig. 1; Such as can tag field being divided into 2 sub-tag field: F1-F4 and F5-F8, each word mark field all comprises 4 marker bits in the present embodiment.
Many bits comparison module 812 is used for that each sub-tag field is carried out many bits and relatively obtains an output valve A.Many bits in the present embodiment are meant relatively according to a plurality of marker bits in the sub-tag field and obtain an output valve A that this output valve A can represent residing position in this sub-tag field, first enable flag position.
Enable flag acquisition module 813 is used for obtaining the enable flag position in each sub-tag field according to output valve A.
Such as, many bits comparison module 812 specifically is used for: t sub-tag field carried out many bits relatively obtain an output valve A;
Enable flag acquisition module 813 specifically is used for: judge whether output valve A is 0, if be 0, then notify 812 couples of t+1 of many bits comparison module sub-tag fields to carry out many bits relatively; If be not 0; Confirm that then said t the A position in the sub-tag field is the enable flag position; Carry out handled with reinforming redirect performance element 820 after this position zero clearing, notify many bits comparison module 812 to continue t sub-tag field carried out many bits relatively after redirect performance element 820 is finished dealing with.The detailed process of searching processing about the comparison of many bits can repeat no more at this referring to the pairing embodiment of Fig. 5.
Many bits comparative approach of the embodiment of the invention also only need take a hardware instruction; And the embodiment of the invention not only can only be carried out the processing code at place, enable flag position; Execution command is simplified, has further improved the efficient of the actual execution of processor.
Be illustrated in figure 9 as the structural representation of a kind of processor that the embodiment of the invention provides; This processor 900 comprises searches treating apparatus 910; This is searched treating apparatus and can comprise like any one device among Fig. 6, Fig. 7 or the corresponding embodiment of Fig. 8, just no longer this processor has been given unnecessary details at this.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method; Can instruct relevant hardware to accomplish through computer program; Described program can be stored in the computer read/write memory medium; This program can comprise the flow process like the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-OnlyMemory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
Above-described specific embodiment; The object of the invention, technical scheme and beneficial effect have been carried out further explain, and institute it should be understood that the above is merely specific embodiment of the present invention; And be not used in qualification protection scope of the present invention; All within spirit of the present invention and principle, any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (9)

1. the method for searching processing of a data table items is characterized in that, said data table items comprise tag field and with said tag field in the corresponding data field of marker bit, said method takies a hardware instruction, said method comprises:
Search the enable flag position in the said tag field;
Jump to the pairing data field in said enable flag position and carry out code process;
Said enable flag position of searching in the said tag field comprises:
Said tag field is divided into n sub-tag field, and n is the integer more than or equal to 1;
Each sub-tag field is carried out many bits relatively obtain an output valve A;
Obtain the enable flag position in said each sub-tag field according to said output valve A.
2. the method for claim 1 is characterized in that, said enable flag position of searching in the said tag field comprises:
Said tag field is carried out the value that shifting function influences carry flag carry-flag;
Value according to carry-flag finds the enable flag position on direction of displacement in the said tag field.
3. method as claimed in claim 2 is characterized in that, said value according to carry-flag finds that the enable flag position on direction of displacement comprises in the said tag field:
When tag field shifts out said data table items by turn; Judge the value of carry-flag; If be 1; The then current marker bit that shifts out said data table items is the enable flag position, if be 0, then continues the marker bit that does not shift out in the said tag field is carried out the value that shifting function influences carry-flag.
4. the method for claim 1 is characterized in that, saidly each sub-tag field is carried out many bits relatively obtains an output valve A, and the enable flag position that obtains in said each sub-tag field according to said output valve A comprises:
T sub-tag field carried out many bits relatively obtain an output valve A;
Judge whether output valve A is 0,, then t+1 sub-tag field carried out many bits relatively if be 0; If be not 0, the A position in the then said sub-tag field is the enable flag position, with again t sub-tag field being carried out many bits relatively after this position zero clearing.
A data table items search treating apparatus, it is characterized in that, said data table items comprise tag field and with said tag field in the corresponding data field of marker bit, said device comprises:
Search the unit, be used for searching the enable flag position of said tag field;
The redirect performance element is used to jump to the pairing data field in said enable flag position and carries out code process;
The said unit of searching comprises:
Segmentation module is used for said tag field is divided into n sub-tag field, and n is the integer more than or equal to 1;
Many bits comparison module is used for that each sub-tag field is carried out many bits and relatively obtains an output valve A;
The enable flag acquisition module is used for obtaining the enable flag position in said each sub-tag field according to said output valve A.
6. device as claimed in claim 5, the said unit of searching comprises:
Shift module is used for said tag field is carried out the value that shifting function influences carry flag carry-flag;
Enable flag is searched module, is used for finding the enable flag position of said tag field on direction of displacement according to the value of carry-flag.
7. device as claimed in claim 6, said enable flag are searched module and specifically are used for:
When tag field shifts out said data table items by turn, judge the value of carry-flag, if be 1, confirm that then the current marker bit that shifts out said data table items is the enable flag position; If be 0, then notify shift module that the marker bit that does not shift out in the said tag field is carried out the value that shifting function influences carry-flag.
8. device as claimed in claim 5 is characterized in that,
Said many bits comparison module specifically is used for: t sub-tag field carried out many bits relatively obtain an output valve A;
Said enable flag acquisition module specifically is used for: judge whether output valve A is 0, if be 0, then notify said many bits comparison module that t+1 sub-tag field carried out many bits relatively; If be not 0, confirm that then said t the A position in the sub-tag field is the enable flag position, with reinforming said many bits comparison module after this position zero clearing said t sub-tag field carried out many bits relatively.
9. a processor is characterized in that, comprises arbitrary described device like claim 5-8.
CN2010101948164A 2010-06-07 2010-06-07 Method and device for searching and processing data table items Expired - Fee Related CN101859325B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101948164A CN101859325B (en) 2010-06-07 2010-06-07 Method and device for searching and processing data table items

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101948164A CN101859325B (en) 2010-06-07 2010-06-07 Method and device for searching and processing data table items

Publications (2)

Publication Number Publication Date
CN101859325A CN101859325A (en) 2010-10-13
CN101859325B true CN101859325B (en) 2012-07-11

Family

ID=42945237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101948164A Expired - Fee Related CN101859325B (en) 2010-06-07 2010-06-07 Method and device for searching and processing data table items

Country Status (1)

Country Link
CN (1) CN101859325B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102566975A (en) * 2010-12-27 2012-07-11 北京国睿中数科技股份有限公司 Device, method and processor for processing branch skipping of skipping path
CN102255749B (en) * 2011-06-27 2017-12-15 中兴通讯股份有限公司 A kind of exception message catching method and device for triggering network equipment failure
CN114025347B (en) * 2021-11-03 2023-12-01 苏州欧清电子有限公司 Encryption method, device and equipment of Bluetooth equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1335958A (en) * 1999-09-07 2002-02-13 皇家菲利浦电子有限公司 Variable-instruction-length processing
CN1359061A (en) * 2000-12-14 2002-07-17 摩托罗拉公司 Method and device for medifying bit field in memory buffer
CN1627253A (en) * 2003-12-12 2005-06-15 上海奇码数字信息有限公司 Conditioned control management device and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7958181B2 (en) * 2006-09-21 2011-06-07 Intel Corporation Method and apparatus for performing logical compare operations

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1335958A (en) * 1999-09-07 2002-02-13 皇家菲利浦电子有限公司 Variable-instruction-length processing
CN1359061A (en) * 2000-12-14 2002-07-17 摩托罗拉公司 Method and device for medifying bit field in memory buffer
CN1627253A (en) * 2003-12-12 2005-06-15 上海奇码数字信息有限公司 Conditioned control management device and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
蒋本珊.计算机组成原理 第3章 指令系统.《计算机组成原理》.2008, *

Also Published As

Publication number Publication date
CN101859325A (en) 2010-10-13

Similar Documents

Publication Publication Date Title
KR101710116B1 (en) Processor, Apparatus and Method for memory management
CN111656367A (en) System and architecture for neural network accelerator
KR100638703B1 (en) Cellular engine for a data processing system
US4675809A (en) Data processing system for floating point data having a variable length exponent part
CN100555216C (en) A kind of data processing method and processor
CN102682116A (en) Method and device for processing table items based on Hash table
US20130159665A1 (en) Specialized vector instruction and datapath for matrix multiplication
CN102298352B (en) Specific processor system structure for high-performance programmable controller and implementation method of dedicated processor system structure
CN101162471B (en) Method and device for insert sorting
KR20070032723A (en) Conditional commands for single command, multiple data execution engines
CN101794214A (en) Register renaming system using multi-block physical register mapping table and method thereof
CN101859325B (en) Method and device for searching and processing data table items
CN107851010B (en) Mixed-width SIMD operations with even and odd element operations using register pairs for wide data elements
CN105608214B (en) The method that fast search is carried out to the number-plate number of deploying to ensure effective monitoring and control of illegal activities
CN102567258B (en) Multi-dimensional DMA (direct memory access) transmitting device and method
CN101539852B (en) Processor, information processing apparatus and method for executing conditional storage instruction
US6301651B1 (en) Method and apparatus for folding a plurality of instructions
CN105550220B (en) A kind of method and device of the access of heterogeneous system
KR101756820B1 (en) Reconfigurable processor and method for processing nested loop
US11061674B2 (en) DSP slice configured to forward operands to associated DSP slices
CN106095393A (en) The system and method for partial write result is merged during retraction phase
CN108874491A (en) The method and device of information load
CN101470600B (en) Method and apparatus for processing very long instruction word
Appiah et al. Magnetic bubble sort algorithm
CN103425625A (en) Minicore-based reconfigurable processor and method of processing multiple data using the same

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: 20170713

Address after: 510640 Guangdong City, Tianhe District Province, No. five, road, public education building, unit 371-1, unit 2401

Patentee after: Guangdong Gaohang Intellectual Property Operation Co., Ltd.

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

Patentee before: Huawei Technologies Co., Ltd.

Effective date of registration: 20170713

Address after: 510640 Guangdong City, Tianhe District Province, No. five, road, public education building, unit 371-1, unit 2401

Patentee after: Guangdong Gaohang Intellectual Property Operation Co., Ltd.

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

Patentee before: Huawei Technologies Co., Ltd.

TR01 Transfer of patent right
CB03 Change of inventor or designer information

Inventor after: Cha Jianghua

Inventor before: Han Bing

Inventor after: Cha Jianghua

Inventor before: Han Bing

CB03 Change of inventor or designer information
TR01 Transfer of patent right

Effective date of registration: 20170904

Address after: 246000 Anhui County of Huaining province Anqing City Ma Miao Zhen Fenglin neighborhood check mouth Group No. 26

Patentee after: Cha Jianghua

Address before: 510640 Guangdong City, Tianhe District Province, No. five, road, public education building, unit 371-1, unit 2401

Patentee before: Guangdong Gaohang Intellectual Property Operation Co., Ltd.

Effective date of registration: 20170904

Address after: 246000 Anhui County of Huaining province Anqing City Ma Miao Zhen Fenglin neighborhood check mouth Group No. 26

Patentee after: Cha Jianghua

Address before: 510640 Guangdong City, Tianhe District Province, No. five, road, public education building, unit 371-1, unit 2401

Patentee before: Guangdong Gaohang Intellectual Property Operation Co., Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20180615

Address after: 215300 room 902, science and Technology Plaza, Qianjin East Road, Kunshan economic and Technological Development Zone, Jiangsu

Patentee after: Kunshan national inspection union Mdt InfoTech Ltd

Address before: 246000 Anhui Anqing Huaining County Mazhen Temple Fenglin neighborhood committee zuzui group 26

Patentee before: Cha Jianghua

Effective date of registration: 20180615

Address after: 215300 room 902, science and Technology Plaza, Qianjin East Road, Kunshan economic and Technological Development Zone, Jiangsu

Patentee after: Kunshan national inspection union Mdt InfoTech Ltd

Address before: 246000 Anhui Anqing Huaining County Mazhen Temple Fenglin neighborhood committee zuzui group 26

Patentee before: Cha Jianghua

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120711

Termination date: 20190607

CF01 Termination of patent right due to non-payment of annual fee