CN101551824A - FPGA-based high-speed search engine and search method - Google Patents
FPGA-based high-speed search engine and search method Download PDFInfo
- Publication number
- CN101551824A CN101551824A CNA2009101038325A CN200910103832A CN101551824A CN 101551824 A CN101551824 A CN 101551824A CN A2009101038325 A CNA2009101038325 A CN A2009101038325A CN 200910103832 A CN200910103832 A CN 200910103832A CN 101551824 A CN101551824 A CN 101551824A
- Authority
- CN
- China
- Prior art keywords
- search
- submodule
- data
- address
- ram
- 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
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The invention discloses a FPGA-based high-speed search engine and search method. The high-speed search engine includes a plurality of parallel search sub-modules, when the system emits the command for starting search, each parallel search sub-module simultaneously searches all the entries of the sub-module, and does not stop the search until receiving the command for stopping search or completing the traversal operation of entire entries. The invention has beneficial technical effects of: full utilization of abundant BlockRAM resource in the FPGA to achieve high-speed search engine; resolving the shortcomings in the small and medium-scale network devices, such as higher power consumption, larger volume and expensive price due to use of the NSE device and largely reduced performance due to software process modus; and the search engine having powerful performance, low power consumption, small size, very cheap price effectively reduced occupation of limited trigger and look-up table resources resource in the FPGA, thereby obtaining the balance of performance and resource occupation.
Description
Technical field
The present invention relates to the network service process field, relate in particular to a kind of high-speed search engine and searching method based on FPGA.
Background technology
In the designs that high speed exchange, traffic management and customer service QOS (Quality of Service) guarantee, can use a kind of network search engines (Network Search Engine, be abbreviated as NSE) device, though the NSE device has very powerful search processing power, but also there are shortcomings such as power consumption is higher, volume is big, cost an arm and a leg, especially the NSE device relates to many high-end technologies, one of high-tech product of normally external embargo, so, limited its application in some small-/medium-sized Intranet equipment or SOC system to a certain extent.In some low and middle-ends or medium or small scale network equipment such as mid-range-and-low-end routers product, in order to reduce cost and to reduce volume, people adopt the method for software search to realize the processing of data usually.Though adopt this method to reduce cost, also can significantly reduce the processing power of system simultaneously, therefore neither a kind of best approach.
FPGA (device able to programme) device is a kind of generic logic device, the influence of not only seldom can be under embargo or stopping production, and along with the development of FPGA technology, the cost of FPGA is more and more lower, performance is but become better and better, present fpga chip inside is mostly integrated BlockRAM in a large number, BlockRAM have that the monolithic capacity is little, low in energy consumption, running frequency is high and do not take advantages such as logical resource.Therefore, utilize the inner abundant BlockRAM resource of FPGA can realize that fully the user wants various functions and the algorithm of realizing, also is fit to be used for realizing high-speed search engine.This basic place of the present invention just.
Summary of the invention
The invention discloses a kind of high-speed search engine based on FPGA, this high-speed search engine comprise a plurality of parallel search submodules, matching content selector switch, two or, each is searched for submodule and is connected with data bus and address bus respectively; Each is searched for submodule and respectively the matched data that searches is sent into the matching content selector switch; System will begin search and the order that stops search is sent to and respectively searches for submodule, and each is searched for information that submodule will search occurrence and delivers to first or door, the information that search is finished send into second or.
The search submodule comprises: RAM, processor interface, search address generator, search counter, occurrence comparer:
Processor interface is connected with ppu data bus and address bus, finishes setting or modification to the search content, and ppu deposits data content in RAM by address, data and control general line or reads from RAM; RAM is used for preserving the search content, by data bus data is delivered to processor interface or output data to comparer; The search address generator is used for producing the read address of search address as RAM; The search counter is to finishing the clauses and subclauses counting of data search; Comparer is used for finishing the comparison of data content to be searched and RAM output data.
A kind of searching method of the high-speed search engine based on FPGA is: after system sends the beginning search command, whole clauses and subclauses that each parallel search submodule begins to search for this submodule simultaneously, up to receiving the order or stop search of stopping search, wait for search next time according to Search Results.
Described stopping search according to Search Results is meant that the search submodule finished the traversal work of whole clauses and subclauses in this module, sends search the finish command, waits for search next time; Perhaps wherein any one submodule has not searched the occurrence clauses and subclauses when finishing all clauses and subclauses search, promptly sends search the finish command, and the notice search engine has searched occurrence and waited for search next time.
After the search submodule receives the beginning search command that search engine sends, the search address generator begins counting, just stops counting after receiving the order that stops search, each clock period search address generator just adds 1, the count value of search address generator is as the address of reading of RAM, and the output content among the RAM is followed the address change of search address generator; The content that processor interface will be kept among the RAM is sent confession comparer and content to be searched comparison, searches the occurrence order if equate then send; When search address changes, whenever finish 1 data search, the search counter just adds 1, up to the search of finishing all data or receive till the order that stops search that search engine sends here; When Counter Value is increased to maximum (the maximum entry number that can preserve among the RAM), if also do not search the data that are complementary, then send search the finish command, notice search engine, search submodule have been finished all search of clauses and subclauses in this submodule; If when not finishing all data strip purpose search, the search submodule has found the coupling clauses and subclauses, comparer is sent search the finish command immediately, this moment, address generator then stopped to add 1 automatically, keep the current address, search counter automatic clear is waited for search next time.
When processor interface when being provided with or revise search content, search engine stops search automatically.
Useful technique effect of the present invention is: make full use of the high-speed search engine that the inner abundant BlockRAM resource of FPGA realizes, solved in medium or small scale network equipment because the power consumption of using the NSE device to bring is higher, volume is bigger, cost an arm and a leg, embargoed easily or stopped production and influenced and adopt the shortcomings such as the very big reduction of performance that software processing mode brings, and can make search engine accomplish that performance Strong is big, low in energy consumption, volume is little, price is very cheap, effectively reduce the taking of limited trigger in FPGA inside and look-up table resource, thus the balance of the performance of obtaining and resource occupation.
Description of drawings
Fig. 1, the theory diagram of search engine;
Fig. 2, search submodule logic diagram.
Specific implementation method
A kind of high-speed search engine based on FPGA of the present invention is made of a plurality of parallel search submodules, and is different with the RAM amount of capacity according to search quantity, and the quantity of search submodule can be different.Based on the theory diagram of the high-speed search engine of FPGA as shown in Figure 1: each search submodule is connected with data bus, address bus respectively, each is searched for submodule and starts search according to the order of system, and any one search submodule receives that system's order that stops search then stops search; Perhaps the traversal work of having finished whole clauses and subclauses of any one search submodule then stops search.
The search submodule can be finished the search of less clauses and subclauses, vary in size according to the size and the search terms bit wide of RAM capacity, and search is counted difference, and the sub-block searches clauses and subclauses can not wait from 8-128.With 128 of each submodules is example, and the traversal clock period that each submodule is finished whole clauses and subclauses is 128, if clock is 100MHz, this sub-block searches ability minimum is 800,000 times/second so.
If the search engine based on FPGA is made of 256 submodules, after system has sent the search startup command, these 256 submodules all begin to search for whole clauses and subclauses of this submodule simultaneously, up to receiving the order that stops search, have perhaps finished till the traversal work of whole clauses and subclauses.Because all module parallel searches, the search capability of this search engine is very powerful, calculates with maximum 128 clauses and subclauses to be searched of each submodule, can reach 200,000,000 times/second.
Figure 2 shows that the theory diagram of a search submodule, a search submodule comprises: RAM, processor interface, search address generator, search counter, occurrence comparer:
Processor interface is connected with ppu data bus and address bus, finishes setting or modification to the search content, and ppu deposits data content in RAM by address, data and control general line or reads from RAM; RAM is used for preserving the search content, by data bus data is delivered to processor interface or output data to comparer; The search address generator is used for producing the read address of search address as RAM; The search counter is to finishing the clauses and subclauses counting of data search; Comparer is used for finishing the comparison of data content to be searched and RAM output data.
When search engine after system sends the beginning search command, each submodule in the system is whole clauses and subclauses of this submodule of parallel search simultaneously all, up to stop search order or stop search according to Search Results of the system of receiving, wait for search next time;
Stopping search according to Search Results is meant that the search submodule finished in this module all traversal work of clauses and subclauses, sends search the finish command, waits for search next time; Perhaps wherein any one submodule has not searched the occurrence clauses and subclauses when finishing all clauses and subclauses search, promptly sends search the finish command, and the notice search engine has searched occurrence; Wait for search next time.
After the search submodule receives the beginning search command that search engine sends, the search address generator begins counting, just stops counting after receiving the order that stops search, each clock period search address generator just adds 1, the count value of search address generator is as the address of reading of RAM, and the output content among the RAM is followed the address change of search address generator; The content that processor interface will be kept among the RAM is sent confession comparer and content to be searched comparison, searches the occurrence order if equate then send; When search address changes, whenever finish 1 data search, the search counter just adds 1, up to the search of finishing all data or receive till the order that stops search that search engine sends here; When Counter Value is increased to maximum (the maximum entry number that can preserve among the RAM), if also do not search the data that are complementary, then send search the finish command, notice search engine, search submodule have been finished all search of clauses and subclauses in this submodule; If when not finishing all data strip purpose search, the search submodule has found the coupling clauses and subclauses, comparer is sent search the finish command immediately, this moment, address generator then stopped to add 1 automatically, keep the current address, search counter automatic clear is waited for search next time.
When processor interface when being provided with or revise search content, search engine stops search automatically.In order to avoid the correctness of influence search this moment.
Claims (6)
1, a kind of high-speed search engine based on FPGA, it is characterized in that: this high-speed search engine comprise a plurality of parallel search submodules, 1 matching content selector switch, two or, each is searched for submodule and is connected with search data bus and search address bus respectively; Each is searched for submodule the matched data that searches is sent into the matching content selector switch; System will begin search and the order that stops search is sent to and respectively searches for submodule, and each is searched for information that submodule will search occurrence and delivers to first or door, the information that search is finished send into second or.
2, the high-speed search engine based on FPGA according to claim 1 is characterized in that: described search submodule comprises: RAM, processor interface, search address generator, search counter, occurrence comparer:
Processor interface is connected with ppu data bus and address bus, finishes setting or modification to the search content, and ppu deposits data content in RAM by address, data and control general line or reads from RAM; RAM is used for preserving the search content, by data bus data is delivered to processor interface or output data to comparer; The search address generator is used for producing the read address of search address as RAM; The search counter is to finishing the clauses and subclauses counting of data search; Comparer is used for finishing the comparison of data content to be searched and RAM output data.
3, a kind of searching method of the high-speed search engine based on FPGA, it is characterized in that: after sending the order that begins to search for when system, whole clauses and subclauses that each parallel search submodule begins to search for this submodule simultaneously, up to stop search order or stop search of the system of receiving, wait for search next time according to Search Results.
4, the searching method of the high-speed search engine based on FPGA according to claim 3, it is characterized in that: described according to Search Results stop search for: the search submodule has been finished the traversal work of whole clauses and subclauses in this module, send search the finish command, wait for search next time; Perhaps wherein any one submodule has not searched the occurrence clauses and subclauses when finishing all clauses and subclauses search, promptly sends search the finish command, and the notice search engine has searched occurrence; Wait for search next time.
5, the searching method of the high-speed search engine based on FPGA according to claim 3, it is characterized in that: after the search submodule receives the beginning search command that search engine sends, the search address generator begins counting, just stops counting after receiving the order that stops search, each clock period search address generator just adds 1, the count value of search address generator is as the address of reading of RAM, and the output content among the RAM is followed the address change of search address generator; RAM sends confession comparer and content to be searched comparison according to the content that search address will be kept among the RAM, searches the occurrence order if equate then send; When search address changes, whenever finish 1 data search, the search counter just adds 1, up to the search of finishing all data or receive till the order that stops search that search engine sends here; When Counter Value is increased to maximum (the maximum entry number that can preserve among the RAM), if also do not search the data that are complementary, then send search the finish command, notice search engine, search submodule have been finished all search of clauses and subclauses in this submodule; If when not finishing all data strip purpose search, the search submodule has found the coupling clauses and subclauses, comparer is sent search the finish command immediately, this moment, address generator then stopped to add 1 automatically, keep the current address, search counter automatic clear is waited for search next time.
6, the searching method of the high-speed search engine based on FPGA according to claim 3 is characterized in that: when processor interface when being provided with or revise search content, search engine stops search automatically.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009101038325A CN101551824B (en) | 2009-05-13 | 2009-05-13 | FPGA-based high-speed search engine and search method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009101038325A CN101551824B (en) | 2009-05-13 | 2009-05-13 | FPGA-based high-speed search engine and search method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101551824A true CN101551824A (en) | 2009-10-07 |
CN101551824B CN101551824B (en) | 2011-06-08 |
Family
ID=41156071
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009101038325A Expired - Fee Related CN101551824B (en) | 2009-05-13 | 2009-05-13 | FPGA-based high-speed search engine and search method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101551824B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102722564A (en) * | 2012-06-01 | 2012-10-10 | 华为技术有限公司 | Table lookup method and device |
CN101741424B (en) * | 2009-12-24 | 2013-08-28 | 航天恒星科技有限公司 | Method for rapidly capturing multi-mode high dynamic spread spectrum signal |
CN108763421A (en) * | 2018-05-24 | 2018-11-06 | 湖南国科微电子股份有限公司 | A kind of data search method and system of logic-based circuit |
CN110046286A (en) * | 2018-01-16 | 2019-07-23 | 马维尔以色列(M.I.S.L.)有限公司 | Method and apparatus for search engine caching |
CN111224877A (en) * | 2019-12-10 | 2020-06-02 | 中国航空工业集团公司西安航空计算技术研究所 | VL query method and device of AFDX switch |
CN115022254A (en) * | 2022-06-02 | 2022-09-06 | 江苏新质信息科技有限公司 | Strategy matching searching method and device based on FPGA |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7058757B1 (en) * | 2003-07-15 | 2006-06-06 | Integrated Device Technology, Inc. | Content addressable memory (CAM) devices that support distributed CAM control and methods of operating same |
JP4992301B2 (en) * | 2006-06-05 | 2012-08-08 | 富士通株式会社 | Search processing method and apparatus |
CN101196928A (en) * | 2007-12-29 | 2008-06-11 | 杭州华三通信技术有限公司 | Contents searching method, system and engine distributing unit |
-
2009
- 2009-05-13 CN CN2009101038325A patent/CN101551824B/en not_active Expired - Fee Related
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101741424B (en) * | 2009-12-24 | 2013-08-28 | 航天恒星科技有限公司 | Method for rapidly capturing multi-mode high dynamic spread spectrum signal |
CN102722564A (en) * | 2012-06-01 | 2012-10-10 | 华为技术有限公司 | Table lookup method and device |
CN102722564B (en) * | 2012-06-01 | 2014-11-05 | 华为技术有限公司 | Table lookup method and device |
CN110046286A (en) * | 2018-01-16 | 2019-07-23 | 马维尔以色列(M.I.S.L.)有限公司 | Method and apparatus for search engine caching |
CN108763421A (en) * | 2018-05-24 | 2018-11-06 | 湖南国科微电子股份有限公司 | A kind of data search method and system of logic-based circuit |
CN108763421B (en) * | 2018-05-24 | 2021-11-12 | 湖南国科微电子股份有限公司 | Data searching method and system based on logic circuit |
CN111224877A (en) * | 2019-12-10 | 2020-06-02 | 中国航空工业集团公司西安航空计算技术研究所 | VL query method and device of AFDX switch |
CN115022254A (en) * | 2022-06-02 | 2022-09-06 | 江苏新质信息科技有限公司 | Strategy matching searching method and device based on FPGA |
Also Published As
Publication number | Publication date |
---|---|
CN101551824B (en) | 2011-06-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101551824B (en) | FPGA-based high-speed search engine and search method | |
CN103198043B (en) | A kind of improved AHB to APB bus bridge and control method thereof | |
CN102291301B (en) | Message characteristic matching method and device | |
CN103004132B (en) | Use microplate for the technology of Clock gating | |
CN101706762A (en) | Intelligent type signal transfer system | |
CN101692647A (en) | Tunnel forwarding system in which IPv4 packets are encapsulated by IPv6 head in router | |
CN102521356B (en) | Regular expression matching equipment and method on basis of deterministic finite automaton | |
CN104025520A (en) | Lookup table creation method and query method, and controller, forwarding device and system therefor | |
CN101304342B (en) | Enhancement type Ethernet interface apparatus | |
CN101196928A (en) | Contents searching method, system and engine distributing unit | |
CN110417609A (en) | A kind of statistical method of network flow, device, electronic equipment and storage medium | |
CN103268347A (en) | System and method for mobile internet searching system based on messages | |
CN101741737A (en) | Maintenance method and device of route table | |
CN105162622A (en) | Storage method and system | |
CN103530263B (en) | Based on the 1553B remote terminal device of FPGA/MCU structure | |
Sun et al. | A 28nm 2D/3D unified sparse convolution accelerator with block-wise neighbor searcher for large-scaled voxel-based point cloud network | |
CN106602726A (en) | Power efficiency monitoring terminal and method thereof | |
Zhou et al. | Task-binding based branch-and-bound algorithm for NoC mapping | |
CN202145277U (en) | CAN bus communication control system | |
CN105262705A (en) | Method for reducing on-chip network static power consumption on the basis of on-duty buffer memory | |
Yuan et al. | Optimized design of UART IP soft core based on DMA mode | |
CN204028891U (en) | A kind of dsp chip reads the circuit of two panels A/D chip data continuously | |
CN201667071U (en) | Signal transfer system | |
CN102684677B (en) | Delay-based dual-rail precharge logic input converter | |
CN202694559U (en) | Carrier concentrator |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20110608 Termination date: 20150513 |
|
EXPY | Termination of patent right or utility model |