CN101021814A - Storage and polling method and storage controller and polling system - Google Patents

Storage and polling method and storage controller and polling system Download PDF

Info

Publication number
CN101021814A
CN101021814A CNA2007100875126A CN200710087512A CN101021814A CN 101021814 A CN101021814 A CN 101021814A CN A2007100875126 A CNA2007100875126 A CN A2007100875126A CN 200710087512 A CN200710087512 A CN 200710087512A CN 101021814 A CN101021814 A CN 101021814A
Authority
CN
China
Prior art keywords
bank
list item
query requests
memory
different
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.)
Granted
Application number
CNA2007100875126A
Other languages
Chinese (zh)
Other versions
CN100578469C (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN200710087512A priority Critical patent/CN100578469C/en
Publication of CN101021814A publication Critical patent/CN101021814A/en
Application granted granted Critical
Publication of CN100578469C publication Critical patent/CN100578469C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

The invention discloses a storing method including choosing different storages for different table-items in the dynamic random access memory, and it stores the different table-items in the described storages of the dynamic random access memory. The invention provides a method for inquiring based on the above storing method, including: it classifiably stores the inquiries of table-items, and it polls the classified inquiries by scheduling method, and it determines the storages in the dynamic random access memory and identifies the address of table-items in their storages according to the lookup index of the inquiries, and it inquires table-items according to the descried address. Accordingly, the invention also provides a storage controller and inquiry system.

Description

Storage, querying method and memory controller and inquiry system
Technical field
The present invention relates to the data management technique field, be specifically related to storage, querying method and memory controller and the inquiry system of list item.
Background technology
A large amount of dynamic RAM DRAM (Dynamic RandomAccess Memory) that use are as the list item storage medium in the communication facilities at present, and for example haploidy number is according to synchronization of rate dynamic storage SDRSDRAM (Single Data Rate Synchronous Dynamic Random Access Memory), Double Data Rate synchronous dynamic random access memory DDR SDRAM (Double Data Rate SynchronousDynamic Random Access Memory) etc.Comprise a plurality of memory bank bank among the dynamic RAM DRAM, contain storage unit among the memory bank bank, be used for storage item.Here said list item is meant certain the delegation's content in the table, and a list item can take continuous several storage unit of DRAM.
Existing list item storage means is according to the table item index storage item.The table item index here is meant the address of the bank stored unit of the shared DRAM of list item, if a list item takies a plurality of storage unit, table item index can be a lowest address wherein so.
Seeing also Fig. 1, is existing storage means process flow diagram, comprising:
A1, all list items that will show all are stored among the bank among the DRAM;
Determine the bank stored element address of DRAM according to table item index after, all list items of certain table all are stored among the bank among the DRAM.
A2, in each bank of DRAM the same table of repeated storage.
After all list items of certain table are stored in a bank, repeated storage in other each bank again.For example certain DDR SDRAM contains 4 bank, then all stores same table at bank1 to bank4.
Therefore, for same list item, in a plurality of bank, be repeated storage, such storage means has been wasted the storage space of bank.
When DRAM being carried out the list item inquiry, because DRAM is for requiring the tRC time at least at interval between twice read operation of different rows among the same bank, so search efficiency is restricted.The tRC time is meant the time interval between two adjacent activation ACTIVE orders among the same bank.For example certain DDR SDRAM contains 4 bank, during tRC=60 nanosecond (ns), to requiring 60 times nanosecond at least at interval between twice read operation of same bank.When adopting at random look-up method, the several times read operation all corresponds to same bank continuously, at this moment looks into once table and will spend 60 times nanosecond at least, and the performance of tabling look-up like this is exactly about 16M time/second, and efficiency ratio is lower.Therefore, the method for general at present many bank of employing rotation visit is carried out read operation in turn in each bank.
Being example to contain 4 bank among certain DRAM still, seeing also Fig. 2, is existing querying method process flow diagram, comprising:
B1, query requests is distributed to each memory bank bank in order;
After receiving query requests, first query requests is distributed to bank1 inquires about, second query requests is distributed to bank2 inquires about, other by that analogy, after query requests was distributed to bank4, next query requests was distributed to bank1 again and inquires about.
B2, determine the memory address of list item in bank that to search according to the lookup table index in the query requests;
Contain lookup table index in the query requests, lookup table index is the address of the bank stored unit of the shared DRAM of list item just, therefore can determine the memory address of list item in bank that need search.
B3, in bank, inquire about list item according to memory address;
During concrete inquiry, read contents in table according to the memory address of storage unit.
B4, output Query Result.
Adopting the method for many bank rotation visit can allow continuous several times table look-up carried out in turn in 4 bank, can finish 4 times table lookup operation so at most in the cycle of one 60 nanosecond.Because between the Active of the different bank operation is the requirement that does not have tRC, have only the requirement of tRRD time, the tRRD time is meant is carrying out two time intervals between the ACTIVE order between the different bank, and this time interval is smaller.So at this moment, search efficiency can reach 4 times of the said look-up method at random in front, about promptly 60M time/second.
Though the method ratio of existing many bank of employing rotation visit is look-up method efficient height at random, but because of searching on the method basis that is based on the same list item of each bank repeated storage, so it is still lower for the DRAM operating factor of memory space, for example during 4 bank rotation visits, operating factor of memory space only is 25%.
Summary of the invention
The technical matters that the embodiment of the invention will solve provides a kind of storage, querying method and memory controller and inquiry system, can save storage space, improves the storage space utilization factor.
For solving the problems of the technologies described above, the embodiment of the invention is achieved through the following technical solutions:
The embodiment of the invention provides a kind of storage means, comprising: the different bank of selecting different list items to store in dynamic RAM; Described different list items are stored into the memory bank of the dynamic RAM of described selection.
The embodiment of the invention provides a kind of querying method, comprising: the list item query requests that receives the inquiry list item; The storage mode of described list item is: different described list items is stored in the different bank of dynamic RAM; With described list item query requests classification; Dispatch the query requests of described classification by polling mode; According to the lookup table index in the query requests determine list item under in dynamic RAM memory bank and definite list item in the memory address of affiliated memory bank, and according to described memory address inquiry list item.
The embodiment of the invention provides a kind of memory controller, is used for the described different bank of selecting different list items to store at dynamic RAM, and described different list items is configured to the memory bank of described selection.
The embodiment of the invention provides a kind of inquiry system, comprising: scheduling unit, dispatch the query requests of described classification after the query requests classification and storage that is used for receiving by polling mode; Query unit, be used for the list item of dynamic RAM storage is inquired about, different list items are stored in the different bank of dynamic RAM, described query unit is determined memory bank under list item is in described dynamic RAM and the definite list item memory address at affiliated memory bank according to the lookup table index in the described query requests of scheduling unit scheduling, and inquires about list item according to described memory address in the memory bank of described dynamic RAM.
From above embodiment of the invention technical scheme as can be seen:
Existing storage means is repeated storage for same list item in a plurality of memory bank bank, has wasted storage space, and the memory bank of the embodiment of the invention by selecting different list items in dynamic RAM, to store; Store described different list items the different bank of the dynamic RAM of described selection into, thereby different list items are stored among the different memory bank bank, saved storage space, can also reduce the time that the list item storage is spent;
Search on the existing method basis of querying method based on the same list item of each bank repeated storage, still lower for the DRAM operating factor of memory space, and the querying method that the embodiment of the invention provides, based on searching on the storage means basis of different list items being stored into different bank, by with the query requests classification and storage; Dispatch the query requests of described classification by polling mode; According to the lookup table index in the query requests determine list item under in dynamic RAM memory bank and definite list item in the memory address of affiliated memory bank, and according to described memory address inquiry list item, thereby also can utilize the efficient way of many bank rotation visit, improve the storage space utilization factor of DRAM.
Description of drawings
Fig. 1 is a prior art storage means process flow diagram;
Fig. 2 is a prior art querying method process flow diagram;
Fig. 3 is an embodiment of the invention storage means process flow diagram;
Fig. 4 is the embodiment of the invention one a querying method process flow diagram;
Fig. 5 is the embodiment of the invention two querying method process flow diagrams;
Fig. 6 is an embodiment of the invention memory controller structural representation;
Fig. 7 is an embodiment of the invention inquiry system structural representation.
Embodiment
Existing list item storage means is that all list items with certain table all are stored among the bank among the DRAM, and the table that each bank repeated storage is identical, the embodiment of the invention provides a kind of storage means, list item repeatedly is not stored among the different bank among the DRAM, storage space can be saved, and the time that list item is stored and renewal is spent can be reduced.
Below introducing the storage means of the embodiment of the invention, see also Fig. 3, is embodiment of the invention storage means process flow diagram, comprising:
C1, the different bank of selecting different list items in dynamic RAM, to store;
The different bank of selecting different list items in dynamic RAM, to store, each different list item that can be a table selects to be stored in memory banks different in the dynamic RAM, what also can be that wherein several different list items select storage is same memory bank, and other list items are selected to be stored in the different memory banks separately.
Containing 4 bank with DRAM is that example describes.At first, with the minimum double figures value of table item index label as the bank of the DRAM that selects, be minimum two and be the bank selection position, for example minimum double figures value is the corresponding bank1 of 00 expression, minimum double figures value is the corresponding bank2 of 01 expression, minimum double figures value is the corresponding bank3 of 10 expressions, and minimum double figures value is the corresponding bank4 of 11 expressions.Then, adopt all or part of numerical value of the remaining figure place of table item index as bank stored element address.
C2, described different list items are stored into the memory bank of the dynamic RAM of described selection.
Select memory bank bank that different list items store and corresponding bank stored element address in DRAM after, the corresponding list item that will show according to these memory unit addresses stores in the storage unit of corresponding bank.
Like this, just the different list items of a table are stored among the different bank.At this moment, the list item of storing among each bank all is unduplicated, compare with the prior art storage means and just to have saved storage space, can store more contents in table, and also can guarantee to be distributed among a plurality of bank for the less list item of capacity, in addition, because only need write once during for the storage of list item, so can also reduce the list item storage and upgrade the time that is spent.
Need to prove that embodiment of the invention storage means can combine application with existing storage means, promptly can the same list item of repeated storage in some bank.
Need to prove that also just containing 4 bank with DRAM here is that example describes but is not limited thereto, for example DRAM contains 8 bank, then can adopt 3 bits to select bank.In addition, corresponding selection bank and correspondence do not limit as the position of the numerical value of bank stored element address in the table item index, can be any positions in table item index.
Based on the storage means of the invention described above embodiment, below introduce the querying method of the embodiment of the invention.
Because the storage means of list item changes, the querying method of the corresponding embodiment of the invention changes with respect to existing querying method.It is that example describes that the querying method of the following embodiment of the invention contains 4 bank with DRAM.
Seeing also Fig. 4, is the embodiment of the invention one querying method process flow diagram, comprising:
D1, be the query requests Allotment Serial Number;
After receiving query requests, be the query requests Allotment Serial Number by the order that receives.The general recycle design Allotment Serial Number that adopts.The scope of sequence number is selected according to concrete needs.
D2, query requests is put into the respective request formation according to the lookup table index in the query requests;
Contain lookup table index in the query requests, according to the minimum double figures value of the lookup table index in the query requests query requests is put into corresponding request queue, the request queue number is definite according to memory bank bank number, and corresponding one by one with memory bank bank.For example minimum two of lookup table index is the bank selection position, its numerical value is that the 00 list item corresponding stored of representing to search is at bank1, put into request queue 1, minimum double figures value is that the 01 list item corresponding stored of representing to search is at bank2, put into request queue 2, minimum double figures value be the 10 list item corresponding stored that need search of expression at bank3, put into request queue 3, minimum double figures value be the 11 list item corresponding stored that need search of expression at bank4, put into request queue 4.
D3, by the formation of polling mode dispatch request, and take out contained query requests in the request queue;
4 request queues are dispatched by polling mode, first dispatch request formation 1, the dispatch request formation 2 again, by that analogy, dispatch out and take out contained query requests after the request queue from request queue.From the request queue of dispatching out, take out a query requests at every turn.Because the query requests in 4 formations is corresponding one by one with 4 bank when carrying out table lookup operation, so also be equivalent to use the efficient way of many bank rotation visit.First query requests taking-up in the request queue 1 soon is distributed to bank1 and inquires about, then first query requests taking-up in the request queue 2 being distributed to bank2 inquires about, other by that analogy, if there is not query requests in the request queue, then dispatch next request queue, when first query requests in the request queue 4 is taken out be distributed to bank4 after, again second query requests in the request queue 1 taken out and is distributed to bank1 and inquires about, follow-uply analogize.
Memory bank bank and the memory address in corresponding bank among D4, the pairing DRAM of list item that determines to search according to the lookup table index in the query requests;
After taking out query requests, can be according to the memory bank bank among the definite pairing DRAM of list item that need search of minimum 2 bit value of the lookup table index in the query requests, for example minimum double figures value is that the 00 list item corresponding stored of representing to search is at bank1, minimum double figures value is that the 01 list item corresponding stored of representing to search is at bank2, minimum double figures value be the 10 list item corresponding stored that need search of expression at bank3, minimum double figures value is that the list item corresponding stored that need search of 11 expressions are at bank4.The list item that all or part of numeric representation of the remaining figure place of lookup table index is searched is in corresponding bank stored element address.
D5, in corresponding bank, inquire about list item according to described memory address.
Memory bank bank among the pairing DRAM of the list item that definite need are searched and behind corresponding stored element address then can read contents in table according to the storage unit of described memory unit address in corresponding bank.
D6, to Query Result by the sequence number back output Query Result that reorders.
After obtaining Query Result, reorder.Reorder can for: the buffer zone of certain space is set, and certain cache-time is set.After sequencing unit obtains Query Result, earlier Query Result is stored in the buffer zone, when the cache-time that is provided with has arrived or cushion space or when being about to exhaust, from buffer zone, select earlier current maximum sequence number, in being no more than half scope of whole serial number range, the difference with this maximum sequence number selects smallest sequence number then, then with the Query Result output of this smallest sequence number.For example the whole serial number range of Fen Peiing is 0 to 99, totally 100 sequence numbers, then half of whole serial number range is 50, if the maximum sequence number of current buffer zone is 98,98-50=48 then, then being no more than half scope of whole serial number range with the difference of this maximum sequence number is 48 to 98, selects the smallest sequence number that drops in this scope in buffer zone.If 0,50,98 these three sequence numbers are arranged in the current buffer zone, that should select 50 as smallest sequence number, and should not select 0 as smallest sequence number.
Need to prove that just containing 4 bank with DRAM here is that example describes but is not limited thereto, for example DRAM contains 8 bank, then can adopt the corresponding bank of 3 bit value.In addition, corresponding bank and correspondence do not limit as the position of the numerical value of bank stored element address in the lookup table index, can be any positions in table item index.And, can also adopt the mode of bank grouping, one group of bank of this moment is equivalent to an original bank, for example minimum double figures value be the list item corresponding stored that need search of 00 expression in first group of bank, other are by that analogy.
Also need to prove, present embodiment step D2 is query requests is put into respective request formation illustrated, but be not limited to this, can also store corresponding query requests by other modes, for example can the query requests of the different bank of correspondence be put into different memory areas by marking off several memory blocks.The memory block number is definite according to memory bank bank number, and corresponding one by one with memory bank bank.
Can find that the querying method of the embodiment of the invention is based on searching on the storage means basis that different list items is configured to different bank, thereby also can utilize the efficient way of many bank rotation visit, improve the storage space utilization factor of DRAM.
Seeing also Fig. 5, is the embodiment of the invention two querying method process flow diagrams, and comparing with embodiment one has increased a high-speed cache Cache mechanism.Increase cache mechanism, mainly be for fear of the query requests kind more after a little while, and correspondence is searched memory bank and evenly caused the performance loss of tabling look-up inadequately.Comprise among Fig. 5:
E1, be the query requests Allotment Serial Number;
After receiving query requests, be the query requests Allotment Serial Number by the order that receives.The general recycle design Allotment Serial Number that adopts.The scope of sequence number is selected according to concrete needs.
E2, in high-speed cache Cache, inquire about according to the lookup table index in the query requests;
Query Result before storing in Cache then can arrive first according to lookup table index and search the relevant entries content among the Cache.If in Cache, can find the list item that contains same index, then enter step e 7 and directly send this Query Result and sequence number to sequencing unit and reorder; If in Cache, can not find the list item that contains same index, enter step e 3.
E3, query requests is put into the respective request formation according to the lookup table index in the query requests;
Contain lookup table index in the query requests, according to the minimum double figures value of the lookup table index in the query requests query requests is put into corresponding request queue, the request queue number is definite according to memory bank bank number, and corresponding one by one with memory bank bank.For example the minimum double figures value of lookup table index is that the 00 list item corresponding stored of representing to search is at bank1, put into request queue 1, minimum double figures value is that the 01 list item corresponding stored of representing to search is at bank2, put into request queue 2, minimum double figures value is that the 10 list item corresponding stored of representing to search are at bank3, put into request queue 3, minimum double figures value be the 11 list item corresponding stored that need search of expression at bank4, put into request queue 4.
E4, by the formation of polling mode dispatch request, and take out contained query requests in the request queue;
4 request queues are dispatched by polling mode, first dispatch request formation 1, the dispatch request formation 2 again, by that analogy, dispatch out and take out contained query requests after the request queue from request queue.From the request queue of dispatching out, take out a query requests at every turn.Because the query requests in 4 formations is corresponding one by one with 4 bank when carrying out table lookup operation, so also be equivalent to use the efficient way of many bank rotation visit.First query requests taking-up in the request queue 1 soon is distributed to bank1 and inquires about, then first query requests taking-up in the request queue 2 being distributed to bank2 inquires about, other by that analogy, if there is not query requests in the request queue, then dispatch next request queue, when first query requests in the request queue 4 is taken out be distributed to bank4 after, again second query requests in the request queue 1 taken out and is distributed to bank1 and inquires about, follow-uply analogize.
Memory bank bank and the memory address in corresponding bank among E5, the pairing DRAM of list item that determines to search according to the lookup table index in the query requests;
After taking out query requests, can be according to the memory bank bank among the definite pairing DRAM of list item that need search of minimum 2 bit value of the lookup table index in the query requests, for example minimum double figures value is that the 00 list item corresponding stored of representing to search is at bank1, minimum double figures value is that the 01 list item corresponding stored of representing to search is at bank2, minimum double figures value be the 10 list item corresponding stored that need search of expression at bank3, minimum double figures value is that the list item corresponding stored that need search of 11 expressions are at bank4.The list item that all or part of numeric representation of the remaining figure place of lookup table index is searched is in corresponding bank stored element address.
E6, in corresponding bank, inquire about list item according to described memory address.
Memory bank bank among the pairing DRAM of the list item that definite need are searched and behind corresponding stored element address then can read contents in table according to the storage unit of described memory unit address in corresponding bank.
E7, to Query Result by the sequence number back output Query Result that reorders, and Query Result deposited among the high-speed cache Cache.
After obtaining Query Result, reorder.Reorder can for: the buffer zone of certain space is set, and certain cache-time is set.After sequencing unit obtains Query Result, earlier Query Result is stored in the buffer zone, when the cache-time that is provided with has arrived or cushion space or when being about to exhaust, from buffer zone, select earlier current maximum sequence number, in being no more than half scope of whole serial number range, the difference with this maximum sequence number selects smallest sequence number then, then with the Query Result output of this smallest sequence number.Simultaneously, Query Result is deposited among the Cache.Result for directly searching in Cache in the step e 2 does not then need to deposit among the Cache once more.
Need to prove, the Cache search procedure of this embodiment step e 2 is arranged on the distribution of step e 1 sequence number and step e 3 query requests are put between these two steps of request queue, in fact also the Cache finding step can be arranged on other position, for example be arranged on step e 4 and take out after the query requests contained in the request queue.
Exhaust the problem that stylish Query Result can't deposit Cache in for solving the Cache space, eliminate the method for old Query Result in the time of can taking new Query Result to enter, for the Query Result among each Cache is provided with a timer, being used for writing down this Query Result has at Cache and how long is not inquired about, and then deletes this Query Result after the time of record surpasses certain hour.In addition, also can adopt the Query Result among the Cache is carried out regularly aging method, a common timing time promptly is set, arrive timing at every turn, then delete all Query Results among the Cache, the operation of once deleting all Query Results among the Cache such as every 10ms.Certainly, also these two kinds of processing modes can be combined.
Present embodiment adopts after the Cache mechanism, for the less situation of query requests kind, for example query requests concentrates on corresponding bank1 substantially, and the query requests of corresponding other bank is when fewer, except first query requests, the result might be directly found in the subsequent query request in Cache so, can guarantee so also can reach than higher search efficiency under the less situation of query requests kind.
Also need to prove, when if the list item of having stored among the DRAM is stored again, search the list item that whether has same index among the Cache simultaneously, if exist, then upgrade this contents in table among the Cache simultaneously, can guarantee that like this content of storing among Query Result and the DRAM among the Cache is consistent.
When embodiment of the invention storage means is introduced in the front, mention embodiment of the invention storage means and can combine application with existing storage means, promptly can the same list item of repeated storage in some bank, so corresponding, in the querying method of the embodiment of the invention one and enforcement two, can also use in conjunction with the querying method of prior art according to this kind list item storage condition.
For repeated storage a plurality of bank of same list item, or do not have the single bank of repeated storage list item, regard independently bank group respectively as.Then that request queue is no longer corresponding one by one with each bank, but corresponding one by one with each bank group.The same list item that has been repeated storage among bank1 and the bank2 for example belongs to bank group 1, and bank3 does not have the repeated storage list item, belongs to bank group 2, and bank4 does not have the repeated storage list item, belongs to bank group 3.The minimum double figures value of lookup table index is that the list item corresponding stored that 00 expression need be searched organizes 1 at bank, puts into request queue 1, and minimum double figures value is that the list item corresponding stored that 01 expression need be searched organizes 2 at bank, puts into request queue 2, and other by that analogy.Two levels of relative set then on the scheduling link of query requests, first level uses some bit value of lookup table index to select the corresponding request queue of bank group, second level is under the situation of same list item that contained repeated storage of each bank in the bank group, query requests in the request queue is distributed to the operation that conducts interviews among each bank in this bank group in turn, only contain the situation that single bank and bank do not have the repeated storage list item for bank group, handle by the embodiment of the invention one and the two described methods of implementing.As can be seen, the querying method of the embodiment of the invention one and enforcement two is used in conjunction with the querying method of prior art, can improve the query requests kind performance of tabling look-up more after a little while, and prior art has also improved the dram space utilization factor relatively.
Above-mentioned storage means and the querying method of having introduced the embodiment of the invention, corresponding, the embodiment of the invention provides a kind of memory controller and inquiry system.
Seeing also Fig. 6, is embodiment of the invention memory controller structural representation.
Memory controller comprises bank selection unit 101 and list item dispensing unit 102.Bank selection unit 101 is used for the different bank of selecting different list items to store at dynamic RAM according to table item index; List item dispensing unit 102 is used for according to table item index different list items being configured to the respective stored address of the memory bank of described bank selection unit 101 selecting.
The part position of table item index is the bank selection position, the memory bank of the corresponding list item storage of its numerical value; The memory address of the corresponding list item of all or part of numerical value in described memory bank of the remaining bit of described table item index except that the bank selection position.For example dynamic RAM contains 4 memory banks, the minimum double figures value of table item index is 00 expression corresponding stored body 1, minimum double figures value is 01 expression corresponding stored body 2, and minimum double figures value is 10 expression corresponding stored bodies 3, and minimum double figures value is 11 expression corresponding stored bodies 4.Then, adopt all or part of numerical value of the remaining figure place of table item index as each memory bank stored element address.
The different bank of different list item storages is selected in bank selection unit 101 according to the numerical value of the bank selection position of table item index, list item dispensing unit 102, is configured to different list items in the storage unit of memory bank of described selection as each memory bank stored element address according to all or part of numerical value of the remaining bit of table item index except that the bank selection position.
Need to prove, memory controller also can be as required with the list item repeated configuration in different bank.
Need to prove that also just containing 4 memory banks with dynamic RAM here is that example describes but is not limited thereto, for example dynamic RAM contains 8 memory banks, then can adopt 3 bit value corresponding stored bodies in table item index.
The embodiment of the invention also provides a kind of inquiry system, sees also Fig. 7, is embodiment of the invention inquiry system structural representation.
This inquiry system comprises scheduling unit 60 and query unit 70.
Scheduling unit 60 is dispatched the query requests of described classification by polling mode after the query requests classification and storage that is used for receiving.Contain lookup table index in the query requests, scheduling unit 60 is put into corresponding request queue according to the minimum double figures value of the lookup table index in the query requests with query requests, the request queue number is definite according to the memory bank number of dynamic RAM, and corresponding one by one with memory bank.For example the minimum double figures value of lookup table index is the memory bank 1 of the 00 list item corresponding stored that need search of expression at dynamic RAM, put into request queue 1, minimum double figures value be the 01 list item corresponding stored that need search of expression at memory bank 2, put into request queue 2, other by that analogy.Need to prove, can also store corresponding query requests, for example can the query requests of corresponding different bank be put into different memory areas by marking off several memory blocks by other modes.The memory block number is definite according to the memory bank number, and corresponding one by one with memory bank.
Scheduling unit 60 after each request queue, is dispatched the query requests of described classification with the query requests classification and storage by polling mode.Elder generation's dispatch request formation 1, the dispatch request formation 2 again, by that analogy, take out contained query requests after dispatching out request queue from request queue.From the request queue of dispatching out, take out a query requests at every turn.
Need to prove, if in the part memory bank of dynamic RAM repeated storage same list item, then for repeated storage a plurality of memory banks of same list item, or do not have the single memory bank of repeated storage list item, can regard independently set of memory banks respectively as.At this moment, request queue is no longer corresponding one by one with each memory bank, but corresponding one by one with each set of memory banks.Scheduling unit 60 two levels of relative set then on the scheduling link of query requests, first level uses some bit value of lookup table index to select the request queue of set of memory banks correspondence, second level is distributed to the operation that conducts interviews in each memory bank in this set of memory banks under the situation of same list item that contained repeated storage of each memory bank in the set of memory banks in turn with the query requests in the request queue.
Query unit 70, be used for the list item of dynamic RAM storage is inquired about, different list items are stored in the different bank of dynamic RAM, query unit 70 be used for according to the lookup table index of described query requests determine list item under in described dynamic RAM memory bank and definite list item in the memory address of affiliated memory bank, and in the memory bank of dynamic RAM, inquire about list item according to described memory address.For example can determine the memory bank of the pairing dynamic RAM of list item that need search according to the minimum double figures value of the lookup table index in the query requests, minimum double figures value is the memory bank 1 of the 00 list item corresponding stored that need search of expression at dynamic RAM, minimum double figures value be the 01 list item corresponding stored that need search of expression at memory bank 2, other are by that analogy.The list item that all or part of numeric representation of the remaining figure place of lookup table index is searched is in corresponding stored body stored element address.Just can in the memory bank of correspondence, inquire about list item according to described memory address.
This inquiry system further comprises sequence number allocation units 80 and sequencing unit 81.Sequence number allocation units 80 are used to send scheduling unit 60 to behind the query requests Allotment Serial Number of described reception and carry out classification and storage; Sequencing unit 81 is used to obtain that the described sequence number according to query requests sorts behind the Query Result of query unit 70, and exports after ordering.Ordering is specifically as follows, when the cache-time that is provided with has arrived or cushion space or when being about to exhaust, from buffer zone, select earlier current maximum sequence number, in being no more than half scope of whole serial number range, the difference with this maximum sequence number selects smallest sequence number then, then with the Query Result output of this smallest sequence number.
This inquiry system further comprises Cache 90 and pre-verification certificate unit 91.Cache 90 is used for the Query Result of storing queries unit 70; Pre-verification certificate unit 91, in Cache 90, inquire about list item according to the lookup table index of described query requests after being used for receiving the query requests of Allotment Serial Number, if do not inquire corresponding list item, send query requests to scheduling unit 60, if find corresponding list item, then send this Query Result and sequence number to sequencing unit 81 and reorder.
In sum, existing storage means is for same list item, in a plurality of memory bank bank is repeated storage, wasted storage space, and storage means that the embodiment of the invention provides and dynamic RAM, by the memory bank of selecting different list items in dynamic RAM, to store; Described different list items are stored into the memory bank of the dynamic RAM of described selection, thereby different list items are stored among the different memory bank bank, the list item of storing in each memory bank all is unduplicated, thereby saved storage space, can also reduce the time that list item storage and renewal are spent;
Search on the existing method basis of querying method based on the same list item of each bank repeated storage, still lower for the DRAM operating factor of memory space, and querying method that the embodiment of the invention provides and inquiry system, based on searching on the storage means basis of different list items being stored into different bank, by with the query requests classification and storage; Dispatch the query requests of described classification by polling mode; According to the lookup table index in the query requests determine list item under in dynamic RAM memory bank and definite list item in the memory address of affiliated memory bank, and according to described memory address inquiry list item, thereby also can utilize the efficient way of many bank rotation visit, improve the storage space utilization factor of DRAM;
Further, the technical scheme that the embodiment of the invention provides has also increased cache mechanism, by high-speed cache Cache storing queries result, can arrive first according to lookup table index after the reception query requests and search the relevant entries content among the Cache.If in Cache, can find the list item that contains same index, then directly send this Query Result and sequence number to sequencing unit and reorder; If in Cache, can not find the list item that contains same index, again query requests to be classified, thereby can avoid the query requests kind more after a little while, correspondence is searched the performance loss of tabling look-up that memory bank evenly causes inadequately, has also improved search efficiency;
Further, the embodiment of the invention also provides a kind of querying method in conjunction with prior art, for repeated storage a plurality of bank of same list item, or there is not a single bank of repeated storage list item, regard independently bank group respectively as, then that request queue is no longer corresponding one by one with each bank, but corresponding one by one with each bank group.Two levels of relative set then on the scheduling link of query requests, first level uses some bit value of lookup table index to select the corresponding request queue of bank group, second level is under the situation of same list item that contained repeated storage of each bank in the bank group, query requests in the request queue is distributed to the operation that conducts interviews among each bank in this bank group in turn, thereby can improve the query requests kind performance of tabling look-up more after a little while, prior art has also improved the dram space utilization factor relatively.
More than storage, querying method and memory controller and inquiry system that the embodiment of the invention provided are described in detail, used specific case herein the principle and the embodiment of the embodiment of the invention are set forth, the explanation of above embodiment just is used to help to understand the method and the core concept thereof of the embodiment of the invention; Simultaneously, for one of ordinary skill in the art, according to the thought of the embodiment of the invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as the restriction to the embodiment of the invention.

Claims (13)

1, a kind of storage means is characterized in that, comprising:
The different bank of selecting different list items in dynamic RAM, to store;
Described different list items are stored into the memory bank of the dynamic RAM of described selection.
2, storage means according to claim 1 is characterized in that:
The part position of the table item index of described list item is the bank selection position;
The different bank that the different list items of described selection are stored in dynamic RAM is specially:
The different bank of selecting different list items in dynamic RAM, to store according to the numerical value of the described bank selection position of described table item index;
The described memory bank that stores different list items the dynamic RAM of described selection into is specially:
Determine the memory address of described different list item in the memory bank of described selection according to all or part of numerical value that removes the remaining bit of described bank selection position in the described table item index, and store according to described memory address.
3, a kind of querying method is characterized in that, comprising:
Receive the list item query requests of inquiry list item;
The storage mode of described list item is: different described list items is stored in the different bank of dynamic RAM;
With described list item query requests classification;
Dispatch the query requests of described classification by polling mode;
According to the lookup table index in the query requests determine list item under in dynamic RAM memory bank and definite list item in the memory address of affiliated memory bank, and according to described memory address inquiry list item.
4, querying method according to claim 3 is characterized in that, the part position of described lookup table index is the bank selection position;
Describedly determine that according to the lookup table index in the query requests memory bank and the definite list item of list item under in dynamic RAM is specially in the memory address of affiliated memory bank:
Determine memory bank under list item is in dynamic RAM according to the numerical value of the described bank selection position of the lookup table index in the query requests;
Determine the memory address of list item according to all or part of numerical value that removes the remaining bit of described bank selection position in the lookup table index in the described query requests at affiliated memory bank.
5, according to claim 3 or 4 described querying methods, it is characterized in that:
Described with the concrete finger of list item query requests classification, according to the lookup table index in the query requests with query requests deposit in memory bank or with the set of memory banks corresponding queues.
6, according to claim 3 or 4 described querying methods, it is characterized in that:
Further comprise before described, be described query requests Allotment Serial Number list item query requests classification and storage;
Further comprise after described, will inquire about the result that list item obtains according to the described sequence number of query requests and sort according to memory address inquiry list item.
7, querying method according to claim 5 is characterized in that:
If query requests is when depositing in the set of memory banks corresponding queues, and the same list item of memory bank repeated storage in this set of memory banks, then described query requests of dispatching described classification by polling mode is specially: the query requests in this formation is distributed to each memory bank in the set of memory banks in turn.
8, querying method according to claim 3 is characterized in that, and is described according to further comprising after the memory address inquiry list item: will inquire about the Query Result that list item obtains and deposit Cache in;
Described will further comprising before the list item query requests classification and storage: inquire about list item according to the lookup table index in the query requests at Cache, and determine not inquire corresponding list item.
9, a kind of memory controller is characterized in that:
Be used for the different bank of selecting different list items to store, and described different list items be configured to the memory bank of described selection at dynamic RAM.
10, memory controller according to claim 9 is characterized in that, further comprises:
The bank selection unit is used for the different bank of selecting different list items to store at dynamic RAM according to the numerical value of the bank selection position of table item index;
The list item dispensing unit is used for determining the memory address of described different list item in the memory bank of described selection according to table item index except that all or part of numerical value of the remaining bit of described bank selection position, and stores according to described memory address.
11, a kind of inquiry system is characterized in that, comprising:
Scheduling unit is dispatched the query requests of described classification by polling mode after the query requests classification and storage that is used for receiving;
Query unit, be used for the list item of dynamic RAM storage is inquired about, different list items are stored in the different bank of dynamic RAM, described query unit is determined memory bank under list item is in described dynamic RAM and the definite list item memory address at affiliated memory bank according to the lookup table index in the described query requests of scheduling unit scheduling, and inquires about list item according to described memory address in the memory bank of described dynamic RAM.
12, inquiry system according to claim 11 is characterized in that, further comprises:
The sequence number allocation units are used to send described scheduling unit to behind the query requests Allotment Serial Number of described reception and carry out classification and storage;
Sequencing unit, being used to obtain behind the Query Result of described query unit according to described sequence number allocation units is that the described sequence number that query requests is distributed sorts.
13, according to claim 11 or 12 described inquiry systems, it is characterized in that, further comprise:
Cache is used to store the Query Result of described query unit;
Pre-verification certificate unit inquires about list item according to the lookup table index of described query requests at Cache after being used for receiving query requests, if do not inquire corresponding list item, sends query requests to described scheduling unit.
CN200710087512A 2007-03-16 2007-03-16 Storage and polling method and storage controller and polling system Active CN100578469C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200710087512A CN100578469C (en) 2007-03-16 2007-03-16 Storage and polling method and storage controller and polling system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200710087512A CN100578469C (en) 2007-03-16 2007-03-16 Storage and polling method and storage controller and polling system

Publications (2)

Publication Number Publication Date
CN101021814A true CN101021814A (en) 2007-08-22
CN100578469C CN100578469C (en) 2010-01-06

Family

ID=38709587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200710087512A Active CN100578469C (en) 2007-03-16 2007-03-16 Storage and polling method and storage controller and polling system

Country Status (1)

Country Link
CN (1) CN100578469C (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010127536A1 (en) * 2009-05-04 2010-11-11 中兴通讯股份有限公司 Table creating and searching method used by network processor
CN101562041B (en) * 2009-04-30 2011-06-01 华为技术有限公司 Method, device and network device for realizing SDRAM table search
CN102340445A (en) * 2010-07-26 2012-02-01 杭州华三通信技术有限公司 Table entry processing method and device for message forwarding flow
CN102681946A (en) * 2012-05-11 2012-09-19 龙芯中科技术有限公司 Memory access method and device
CN103377154A (en) * 2012-04-25 2013-10-30 无锡江南计算技术研究所 Access-memory control device and method of memorizer, processor and north-bridge chip
CN103823762A (en) * 2012-11-19 2014-05-28 华为技术有限公司 Random memory table look-up method, random memory table look-up device and random memory table look-up system
CN104125461A (en) * 2013-04-27 2014-10-29 深圳市振华微电子有限公司 Large-size image compression processing system and method
CN107450829A (en) * 2017-06-27 2017-12-08 武汉逸飞激光设备有限公司 Touch-screen single page plane display method, touch-screen and programmable logic controller (PLC)
CN107888513A (en) * 2017-10-23 2018-04-06 深圳市楠菲微电子有限公司 Caching method and device for exchange chip
CN111431798A (en) * 2020-03-31 2020-07-17 新华三信息安全技术有限公司 Route switching method and device
CN114356418A (en) * 2022-03-10 2022-04-15 之江实验室 Intelligent table entry controller and control method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521155B (en) * 2011-12-12 2014-09-10 盛科网络(苏州)有限公司 Method and device for realizing table item dynamic allocation on physical storage

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101562041B (en) * 2009-04-30 2011-06-01 华为技术有限公司 Method, device and network device for realizing SDRAM table search
WO2010127536A1 (en) * 2009-05-04 2010-11-11 中兴通讯股份有限公司 Table creating and searching method used by network processor
CN102340445B (en) * 2010-07-26 2014-09-24 杭州华三通信技术有限公司 Table entry processing method and device for message forwarding flow
CN102340445A (en) * 2010-07-26 2012-02-01 杭州华三通信技术有限公司 Table entry processing method and device for message forwarding flow
CN103377154B (en) * 2012-04-25 2016-04-13 无锡江南计算技术研究所 The memory access control device of storer and method, processor and north bridge chips
CN103377154A (en) * 2012-04-25 2013-10-30 无锡江南计算技术研究所 Access-memory control device and method of memorizer, processor and north-bridge chip
CN102681946B (en) * 2012-05-11 2015-03-11 龙芯中科技术有限公司 Memory access method and device
CN102681946A (en) * 2012-05-11 2012-09-19 龙芯中科技术有限公司 Memory access method and device
CN103823762A (en) * 2012-11-19 2014-05-28 华为技术有限公司 Random memory table look-up method, random memory table look-up device and random memory table look-up system
CN103823762B (en) * 2012-11-19 2016-08-31 华为技术有限公司 The random look-up method of memorizer, device and system
CN104125461A (en) * 2013-04-27 2014-10-29 深圳市振华微电子有限公司 Large-size image compression processing system and method
CN107450829A (en) * 2017-06-27 2017-12-08 武汉逸飞激光设备有限公司 Touch-screen single page plane display method, touch-screen and programmable logic controller (PLC)
CN107450829B (en) * 2017-06-27 2021-06-15 武汉逸飞激光设备有限公司 Single-page display method of touch screen, touch screen and programmable logic controller
CN107888513A (en) * 2017-10-23 2018-04-06 深圳市楠菲微电子有限公司 Caching method and device for exchange chip
CN111431798A (en) * 2020-03-31 2020-07-17 新华三信息安全技术有限公司 Route switching method and device
CN111431798B (en) * 2020-03-31 2022-07-12 新华三信息安全技术有限公司 Route switching method and device
CN114356418A (en) * 2022-03-10 2022-04-15 之江实验室 Intelligent table entry controller and control method

Also Published As

Publication number Publication date
CN100578469C (en) 2010-01-06

Similar Documents

Publication Publication Date Title
CN100578469C (en) Storage and polling method and storage controller and polling system
CN100410949C (en) Data bank system and method for controlling data bank data
CN101604337B (en) Apparatus and method for hash table storage, searching
CN104090847B (en) Address distribution method of solid-state storage device
KR101502896B1 (en) Distributed memory cluster control apparatus and method using map reduce
CN105117355B (en) Memory, storage system and its data processing method
CN104572676B (en) A kind of inter-library paging query method for multiple database table
CN100399301C (en) Mass storage device and method for dynamically managing a mass storage device
CN104899297B (en) Create the method with the hybrid index of storage perception
CN102446139B (en) Method and device for data storage
CN1279729C (en) Distributed paralled IP route searching method based on TCAM
CN101159619B (en) Fast adding method, device and switching arrangement of ARP table
CN101373445B (en) Method and apparatus for scheduling memory
CN105320608A (en) Memory controller and method for controlling a memory device to process access requests
CN100505676C (en) Centralized scheduling controller for intelligent multi buffer management and dynamic scheduting method
CN102867071A (en) Management method for massive network management historical data
CN101916227A (en) RLDRAM SIO storage access control method and device
CN103440207A (en) Caching method and caching device
CN108959113A (en) Method and system for flash memory perception heap memory management
US20030121030A1 (en) Method for implementing dual link list structure to enable fast link-list pointer updates
CN110096225A (en) For the dynamic allocation of the memory of the packet transaction instruction catalogue in the network equipment
CN103425435A (en) Disk storage method and disk storage system
CN104615684A (en) Mass data communication concurrent processing method and system
CN101610197A (en) A kind of buffer management method and system thereof
CN101753580B (en) Packet processing chip and data storage and forwarding method thereof

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