Binary Search Engine for Longest Prefix Match
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional search engines, such as TCAMs and AVL trees, face limitations in power consumption, layout area, and latency for implementing Longest Prefix Match (LPM) operations, particularly for IPv4 and IPv6 address look-ups with wildcard searches.
Innovation Solution
A binary search engine (BSE) with a novel data configuration and indexing method, utilizing a binary search tree structure where nodes are arranged in levels with valid and free nodes, allowing for efficient addition, deletion, and search operations, and enabling parallel operation of multiple instances for improved performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If TCAM is used for LPM implementation, then search latency is reduced, but power consumption and layout area increase significantly
Solution Approach 1:
The patent uses SRAM to store binary search tree nodes as a copy of the data structure, allowing the search engine to perform LPM operations using standard SRAM cells rather than power-hungry TCAM cells. The binary search tree structure enables efficient searching with fewer memory accesses compared to traditional CAM approaches.
Solution Approach 2:
The patent replaces the ternary content-addressable memory mechanism with a binary search tree data structure implemented in SRAM. This substitution uses standard memory cells with read/write capabilities instead of specialized TCAM cells, significantly reducing power consumption while maintaining search functionality through algorithmic optimization.
2Speed
If TCAM is used for LPM implementation, then search latency is reduced, but layout area becomes too large
Solution Approach 1:
The patent implements a binary search tree in SRAM, using standard memory cells to store node data and pointers. This approach requires significantly less area per entry compared to TCAM, allowing the same number of LPM entries to be stored in a much smaller footprint while maintaining fast search performance through the tree structure.
Solution Approach 2:
The patent changes the fundamental parameters of the search structure from TCAM's parallel comparison approach to a binary search tree's hierarchical navigation approach. This parameter change reduces the area per entry by using standard SRAM cells with fewer transistors per storage element, while the tree structure compensates for the loss of parallelism through reduced search depth.
3Ease of operation
If AVL tree is used for search operations, then search capability is provided, but height is limited and overhead is high due to left and right pointers
Solution Approach 1:
The patent segments the binary search tree into fixed-height levels, with each level containing a specific number of nodes. This segmentation allows the use of simplified indexing schemes where node positions can be calculated directly from level and position within level, eliminating the need for explicit left and right pointers and reducing memory overhead.
Solution Approach 2:
The patent uses compact node representations in the binary search tree that store only essential information (data and level position) rather than maintaining full pointer structures. This approach uses minimal memory per node, effectively replacing expensive pointer overhead with inexpensive index calculations.
4Ease of operation
If AVL tree is used for search operations, then search capability is provided, but add and delete latency is very high due to firmware operations
Solution Approach 1:
The patent implements the binary search tree with data structures and indexing schemes that enable self-contained add and delete operations at the hardware level. The fixed-level structure and compact node representations allow these operations to be performed directly by the search engine logic without requiring firmware intervention, dramatically reducing modification latency.
Data Source
AI summary
Longest Prefix Match (LPM) is implemented using a binary tree based search algorithm. Masked entries are stored in a plurality of binary search engines, wherein each of the binary search engines stores masked entries of a corresponding mask length. A search value is applied to each of the binary search engines in parallel. The search value is masked within each of the binary search engines, thereby creating a plurality of masked search values, each having a masked length equal to the mask length of the corresponding binary search engine. Each of the masked search values is compared with the masked entries of the corresponding binary search engine. An LPM result is selected from the binary search engine that detects a match, and has the longest corresponding mask length. Alternately, each binary search engine stores masked entries of N mask lengths, and N consecutive comparisons are performed to identify the LPM.


