LIST SEARCH
Patent Information
- Application Number
- DE102024127408
- Authority / Receiving Office
- DE · DE
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-19
- Filing Date
- 2024-09-23
- Publication Date
- 2025-03-27
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Cross-reference to related applications
[0001] This non-provisional patent application claims the benefit of the filing date of U.S. Provisional Patent Application Serial No. 63 / 585,185, filed September 25, 2023, which is incorporated herein by reference. General state of the art
[0002] Searching an unsorted list or array containing unique values can be a time-consuming task. A linear search requires serially searching each entry in the unsorted list to find a matching entry. A binary search is not possible because the list is unsorted. A hash-based search requires a hash function, additional storage for a hash table, a rehashing approach, and additional data structures.
[0003] For these and other reasons, there is a need for the present invention. Short description
[0004] Some examples of the present disclosure relate to a system. The system includes a memory and control logic communicatively coupled to the memory. The memory stores a list of items in first words and second words corresponding to the first words, such that each first word stores a first portion of each of two different list items and each corresponding second word stores a second portion of each of the two different list items. The control logic is configured to compare a first portion of a search item to the first portion of each list item in each first word. The control logic is configured to determine that the first word is a matching first word in response to the first portion of the search item matching a first portion in a first word.The control logic is configured to compare a second portion of the search item with the second portion of each list item stored in every second word corresponding to each matching first word. The control logic is configured to determine that the search item matches the list item in response to the second portion of the search item matching a second portion of a list item in a second word.
[0005] Other examples of the present disclosure relate to a system. The system includes a memory and control logic communicatively coupled to the memory. The memory stores a list of items in at least first words and second words corresponding to the first words, such that each first word stores a first portion of each of at least two different list items and each corresponding second word stores a second portion of each of the at least two different list items. The control logic is configured to receive a search item and split the search item into at least a first portion and a second portion. The control logic is configured to compare the first portion of the search item to each first portion of each list item in each first word.The control logic is configured to determine that the first word is a matching first word in response to the first portion of the search item matching a first portion in a first word. The control logic is configured to compare the second portion of the search item to every second portion of each list item stored in every second word that corresponds to each matching first word. The control logic is configured to determine that the search item matches the list item in response to at least the second portion of the search item matching a second portion of a list item in a second word.
[0006] Still other examples of the present disclosure relate to a method. The method includes storing a list of items in at least first words and second words corresponding to the first words in a memory such that each first word stores a first portion of each of at least two different list items and each corresponding second word stores a second portion of each of the at least two different list items. The method includes receiving a search item and splitting the search item into at least a first portion and a second portion. The method includes comparing the first portion of the search item to each first portion of each list item in each first word.The method includes, in response to the first portion of the search item matching a first portion in a first word, determining that the first word is a matching first word. The method includes comparing the second portion of the search item to every second portion of each list item stored in every second word that corresponds to each matching first word. The method includes, in response to at least the second portion of the search item matching a second portion of a list item in a second word, determining that the search item matches the list item. Brief description of the drawings Fig. 1 is a block diagram illustrating an example of a list stored in memory. Fig. Figure 2 is a block diagram illustrating another example of a list stored in memory. Fig. Figure 3 is a block diagram illustrating another example of a list stored in memory. Fig. Figure 4 is a block diagram illustrating another example of a list stored in memory. Fig. 5A and Fig. 5B are block diagrams illustrating an example of a system for performing a search operation on the data stored in the memory of Fig. 2 stored list. Fig. 6 is a block diagram illustrating an example of a system for performing a search operation on the data stored in the memory of Fig. 3 stored list. Fig. 7 is a block diagram illustrating an example of a system for performing a search operation on the data stored in the memory of Fig. 4 stored list. Fig. 8A-8C are flowcharts illustrating an example of a method for performing a search operation. Fig. Figure 9 is a block diagram illustrating an example of a state machine for performing a search operation. Fig. 10 is a block diagram illustrating an example of a processing system for performing a search operation. Detailed description
[0007] In the following detailed description, reference is made to the accompanying drawings, which form a part hereof, and in which is shown by way of illustration specific examples in which the disclosure may be practiced. It is understood that other examples may be utilized and structural or logical changes may be made without departing from the scope of the present disclosure. The following detailed description, therefore, is not to be taken in a limiting sense, and the scope of the present disclosure is defined by the appended claims. It is to be understood that features of the various examples described herein may be partially or fully combined with one another, unless expressly stated otherwise.
[0008] Fig. 1 is a block diagram illustrating an example of an element list stored in a memory 100. The memory 100 stores the element list including elements 0 to N-1 in words 1020 to 102 N-1 , where "N" is any suitable number of elements. Each word (or row) of memory 100 may be defined as the width of the memory subsystem (e.g., 16 bits, 32 bits, 48 bits, 64 bits, etc.), such that each element 0 through N-1 is stored in a word (or row) of memory. The element list may be unsorted and may include any suitable data, such as Bluetooth addresses. Memory 100 may comprise any suitable machine-readable storage medium, such as random access memory (RAM), electrically erasable programmable read-only memory (EEPROM), a storage drive, an optical disk, and the like.
[0009] Fig. Figure 2 is a block diagram illustrating another example of a list stored in a memory 200. In this example, each element 0 to N-1 in the list is divided into a first section 102 0 0 up to 102 N-1_0 or a second section 102 0_1 up to 102 N-1_1 In this example, if the element list contains an odd number of elements N, a dummy (e.g., empty) element can be added to the list, so that element N-1 is a dummy element. Memory 200 stores the element list, including elements 0 to N-1, in first words 2020 to 202 X-1 and second words 202 X until 202 N-1 that correspond to the first words (e.g. the second word corresponds to 202 X the first word 2020, the second word corresponds to 202 X+1 the first word 2021, etc.). In some examples, the second words 202 X until 202 N-1in the memory 200 immediately after the first words 2020 to 202 X-1 saved. Every first word 2020 to 202 X-1 saves the first section 102 0_0 up to 102 N-1_0 each of two different list elements. For example, the word 2020 of memory 200 stores the first section 102 0_0 of the element 0 in a first part (e.g. the lower half) of the word and the first section 102 1_0 of element 1 in a second part (e.g., the upper half) of the word, the word 2021 of the memory 200 stores the first section 102 2_0 of element 2 in the first part of the word and the first section 102 3_0 of element 3 in the second part of the word, etc. and stores the word 202 X-1 of the memory 200 the first section 102 N-2_0 of the element N-2 in the first part of the word and the first section 102 N-1_0 of the element N-1 in the second part of the word.
[0010] Every second word 202 X until 202 N-1 saves the second section 102 0_1 up to 102 N-1_1 each of two different list elements. For example, the word 202 stores X of the memory 200 the second section 102 0_1 of the element 0 in the first part of the word and the second section 102 1_1 of element 1 in the second part of the word, stores the word 202 X+1 of the memory 200 the second section 102 2_1 of element 2 in the first part of the word and the second section 102 3_1 of element 3 in the second part of the word, etc. and stores the word 202 N-1 of the memory 200 the second section 102 N-2_1 of the element N-2 in the first part of the word and the second section 102 N-1_1 of the element N-1 in the second part of the word.
[0011] By storing the first sections of each element 0 to N-1 in the first words 2020 to 202 X-1 and the second sections of each element 0 to N-1 in the second words 202 X until 202 N-1 the time to search the element list stored in the memory 200 compared to the time to search the same in the memory 100 of Fig. 1 stored element list can be significantly reduced, as explained below with reference to the Fig. 5A and Fig. 5B. In some examples, the time to search the item list stored in memory 200 may be improved by a factor of N by comparing a portion of a search item value with corresponding portions of multiple list items simultaneously, rather than comparing each individual list item value with a single complete search item value. The time to search the item list is improved by a factor of N because most comparisons fail and the remaining portion(s) of the search item value do not need to be compared.
[0012] Fig. Figure 3 is a block diagram illustrating another example of a list stored in a memory 300. In this example, each element 0 to N-1 in the list is divided into a first section 102 0_0 up to 102 N-1_0 , a second section 102 0_1 up to 102 N-1_1 or a third section 1020_2 up to 102 N-1_2 Although not all of the first sections 102 0_0 up to 102 N-1_0 , second sections 102 0_1 up to 102 N-1_1 and a third section 102 0_2 up to 102 N-1_2 in Fig. 3 are specifically marked, it becomes clear that each first section 102 0_0 up to 102 N-1_0 , second section 102 0_1 up to 102 N-1_1 and third section 102 0_2 up to 102 N-1_2 a first section of elements 0 to N-1, a second section of elements 0 to N-1, and a third section of elements 0 to N-1, respectively. In this example, if the element list includes a number of elements N that is not divisible by 3, one or two dummy (e.g., empty) elements (e.g., element N-1, element N-2) can be added to the list so that the number of elements N is divisible by 3.
[0013] The memory 300 stores the element list including elements 0 to N-1 in first words 3020 to 302 X-1 , second words 302 X up to 302 Y-1 , which correspond to the first words, and third words 302 Y up to 302 N-1 , which correspond to the second words and correspond to the first words. In some examples, the second words 302X to 302Y-1 are stored in the memory 300 immediately after the first words 302O to 302X-1, and the third words 302Y to 302N-1 are stored in the memory 300 immediately after the second words 302X to 302Y-1. For example, the third word 302 Y and the second word 302 X the first word 3020, the third word 302 Y+1 and the second word 302 X+1 the first word 3021 etc. Every first word 3020 to 302 X-1 saves the first section 102 0_0 up to 102 N- 1_0each of three different list elements. For example, word 3020 of memory 300 stores the first section 102 0_0 of the element 0 in a first part (e.g. the lower third) of the word, the first section 102 1_0 of element 1 in a second part (e.g. the middle third) of the word and the first section 102 2_0 of element 2 in a third part (e.g., the upper third) of the word; the word 3021 of the memory 300 stores the first section 102 3_0 of element 3 in the first part of the word, the first section 102 4_0 of element 4 in the second part of the word and the first section 102 5_0 of element 5 in the third part of the word, etc.; and stores the word 302 X-1 of the memory 300 the first section 102 N-3_0 of the element N-3 in the first part of the word, the first section 102 N-2_0of the element N-2 in the second part of the word and the first section 102 N-1_0 of the element N-1 in the third part of the word.
[0014] Every second word 302 X up to 302 Y-1 saves the second section 102 0_1 up to 102 N-1_1 each of three different list elements. For example, the word 302 stores X of the memory 300 the second section 102 0_1 of the element 0 in the first part of the word, the second section 102 1_1 of element 1 in the second part of the word and the second section 102 2_1 of element 2 in the third part of the word; stores the word 302 X+1 of the memory 300 the second section 102 3_1 of element 3 in the first part of the word, the second section 102 4_1 of element 4 in the second part of the word and the second section 102 5_1of element 5 in the third part of the word, etc.; and stores the word 302 Y-1 of the memory 300 the second section 102 N-3_1 of the element N-3 in the first part of the word, the second section 102 N-2_1 of the element N-2 in the second part of the word and the second section 102 N-1_1 of the element N-1 in the third part of the word.
[0015] Every third word 302 Y up to 302 N-1 saves the third section 102 0_2 up to 102 N-1_2 each of three different list elements. For example, the word 302 stores Y of the memory 300 the third section 102 0_2 of the element 0 in the first part of the word, the third section 102 1_2 of element 1 in the second part of the word and the third section 102 2_2 of element 2 in the third part of the word; stores the word 302 Y+1 of the memory 300 the third section 102 3_2of element 3 in the first part of the word, the third section 102 4_2 of element 4 in the second part of the word and the third section 102 5_2 of element 5 in the third part of the word, etc.; and stores the word 302 N-1 of the memory 300 the third section 102 N-3_2 of the element N-3 in the first part of the word, the second section 102 N-2_2 of the element N-2 in the second part of the word and the second section 102 N-1_2 of the element N-1 in the third part of the word.
[0016] By storing the first sections of each element 0 to N-1 in the first words 3020 to 302 X-1 , the second sections of each element 0 to N-1 in the second words 302 X up to 302 Y-1 and the third sections of each element 0 to N-1 in the third words 302 Y up to 302 N-1the time to search the element list stored in the memory 300 compared to the time to search the same in the memory 100 of Fig. 1 stored element list can be significantly reduced, as explained below with reference to Fig. 6 is described.
[0017] Fig. Figure 4 is a block diagram illustrating another example of a list stored in a memory 400. In this example, each element 0 to N-1 in the list is divided into a first section 102 0_0 up to 102 N-1_0 , a second section 102 0_1 up to 102 N-1_1 , a third section 102 0_2 up to 102 N-1_2 or a fourth section 102 0_3 up to 102 N-1_3 Although not all of the first sections 102 0_0 up to 102 N-1_0 , second sections 102 0_1 up to 102 N-1_1 , third sections 102 0_2 up to 102 N-1_2and fourth sections 102 0_3 up to 102 N-1_3 in Fig. 4 are specifically marked, it becomes clear that each first section 102 0_0 up to 102 N-1_0 , second section 102 0_1 up to 102 N-1_1 , third section 102 0_2 up to 102 N-1_2 and fourth section 102 0_3 up to 102 N-1_3 a first section of elements 0 to N-1, a second section of elements 0 to N-1, a third section of elements 0 to N-1, and a fourth section of elements 0 to N-1, respectively. In this example, if the element list includes a number N of elements that is not divisible by 4, one, two, or three dummy (e.g., empty) elements (e.g., element N-1, element N-2, element N-3) can be added to the list so that the number N of elements is divisible by 4.
[0018] The memory 400 stores the element list including elements 0 to N-1 in first words 4020 to 402 X-1 , second words 402 X up to 402 Y-1 , which correspond to the first words, third words 402 Y up to 402 Z-1 , which correspond to the second words and correspond to the first words, and fourth words 402 Z up to 402 N-1 , which correspond to the third words and the first words and second words. In some examples, the second words are 402 X up to 402 Y-1 in the memory 400 immediately after the first words 4020 to 402 X-1 stored, the third words 402 Y up to 402 Z-1 in the memory 400 immediately after the second words 402 X up to 402 Y-1 stored and the fourth words 402 Z up to 402 N-1 in the memory 400 immediately after the third words 402 Y up to 402Z-1 stored. Every first word 4020 to 402 X-1 saves the first section 102 0_0 up to 102 N-1_0 each of four different list elements. For example, word 4020 of memory 400 stores the first section 102 0_0 of the element 0 in a first part (e.g. the lower quarter) of the word, the first section 102 1_0 of element 1 in a second part (e.g. the middle-lower quarter) of the word, the first section 102 2_0 of element 2 in a third part (e.g. the middle-upper quarter) of the word and the first section 102 3_0 of element 3 in a fourth part (e.g., the upper quarter) of the word; the word 4021 of the memory 400 stores the first section 102 4_0 of element 4 in the first part of the word, the first section 102 5_0 of element 5 in the second part of the word, the first section 102 6_0of element 6 in the third part of the word and the first section 102 7_0 of element 7 in the fourth part of the word, etc.; and stores the word 402 X-1 of the memory 400 the first section 102 N-4_0 of the element N-4 in the first part of the word, the first section 102 N-3_0 of the element N-3 in the second part of the word, the first section 102 N-2_0 of the element N-2 in the third part of the word and the first section 102 N-1_0 of the element N-1 in the fourth part of the word.
[0019] Every second word 402 X up to 402 Y-1 saves the second section 102 0_1 up to 102 N-1_1 each of four different list items. For example, the word 402 X of the memory 400 the second section 102 0_1 of the element 0 in the first part of the word, the second section 102 1_1of element 1 in the second part of the word, the second section 102 2_1 of element 2 in the third part of the word and the second section 102 3_1 of element 3 in the fourth part of the word; stores the word 402 X+1 of the memory 400 the second section 102 4_1 of element 4 in the first part of the word, the second section 102 5_1 of element 5 in the second part of the word, the second section 102 6_1 of element 6 in the third part of the word and the second section 102 7_1 of element 7 in the fourth part of the word, etc.; and stores the word 402 Y-1 of the memory 400 the second section 102 N-4_1 of the element N-4 in the first part of the word, the second section 102 N-3_1 of the element N-3 in the second part of the word, the second section 102 N-2_1 of the element N-2 in the third part of the word and the second section 102 N-1_1of the element N-1 in the fourth part of the word.
[0020] Every third word 402 Y up to 402 Z-1 saves the third section 102 0_2 up to 102 N-1_2 each of four different list items. For example, the word 402 Y of the memory 400 the third section 102 0_2 of the element 0 in the first part of the word, the third section 102 1_2 of element 1 in the second part of the word, the third section 102 2_2 of element 2 in the third part of the word and the third section 102 3_2 of element 3 in the fourth part of the word; stores the word 402 Y+1 of the memory 400 the third section 102 4_2 of element 4 in the first part of the word, the third section 102 5_2 of element 5 in the second part of the word, the third section 102 6_2 of element 6 in the third part of the word and the third section 1027_2 of element 7 in the fourth part of the word, etc.; and stores the word 402 Z-1 of the memory 400 the third section 102 N-4_2 of the element N-4 in the first part of the word, the third section 102 N-3_2 of the element N-3 in the second part of the word, the third section 102 N-2_2 of the element N-2 in the third part of the word and the third section 102 N-1_2 of the element N-1 in the fourth part of the word.
[0021] Every fourth word 402z to 402 N-1 saves the fourth section 102 0_3 up to 102 N-1_3 each of four different list items. For example, the word 402 Z of the memory 400 the fourth section 102 0_3 of the element 0 in the first part of the word, the fourth section 102 1_3 of element 1 in the second part of the word, the fourth section 102 2_3of element 2 in the third part of the word and the fourth section 102 3_3 of element 3 in the fourth part of the word; stores the word 402 Z+1 of the memory 400 the fourth section 102 4_3 of element 4 in the first part of the word, the fourth section 102 5_3 of element 5 in the second part of the word, the fourth section 102 6_3 of element 6 in the third part of the word and the fourth section 102 7_3 of element 7 in the fourth part of the word, etc.; and stores the word 402 N-1 of the memory 400 the fourth section 102 N-4_3 of the element N-4 in the first part of the word, the fourth section 102 N-3_3 of the element N-3 in the second part of the word, the fourth section 102 N-2_3 of the element N-2 in the third part of the word and the fourth section 102 N-1_3 of the element N-1 in the fourth part of the word.
[0022] By storing the first sections of each element 0 to N-1 in the first words 4020 to 402 X-1 , the second sections of each element 0 to N-1 in the second words 402 X up to 402 Y-1 , the third sections of each element 0 to N-1 in the third words 402 Y up to 402 Z-1 and the fourth sections of each element 0 to N-1 in the fourth words 402 Z up to 402 N-1 the time to search the element list stored in the memory 400 compared to the time to search the same in the memory 100 of Fig. 1 stored element list can be significantly reduced, as explained below with reference to Fig. 7 is described.
[0023] Fig. 5A and Fig. 5B are block diagrams illustrating an example of a system 500 for performing a search operation on the data stored in the memory 200 of Fig. 2 stored list. Fig. Figure 5A illustrates the system 500 in a first phase (e.g., phase 0) of the search process. The system 500 includes a memory 200 that stores a memory as previously described and with reference to Fig. 2, and a control logic 502. The control logic 502 is communicatively coupled to the memory 200. In some examples, the control logic 502 may be implemented in hardware (e.g., registers, comparators, logic gates, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), etc.), such as by a state machine, as described below with reference to Fig. 9. In some examples, the control logic 502 may be implemented by a processing system including a central processing unit (CPU), a processor, or a microprocessor, as described below with reference to Fig. 10 is described.
[0024] The control logic 502 receives a search element and divides the search element into a first section of the search element and a second section of the search element. The control logic 502 is configured to combine the first section of the search element 504 with the first section 102. 0_0 up to 102 N-1_0 each list element 0 to N-1 in each first word 2020 to 202 X-1to compare. In some examples, the control logic 502 may include a first comparator 510 and a second comparator 511 to compare the first portion 504 of the search item simultaneously with the first portion of the list items stored in the first part and the second part of each word to obtain a first result at 520 and a second result at 521, respectively, for each word 2020 to 202X-1. The control logic 502 is configured to, in response to the first portion of the search item matching a first portion in a first word 2020 to 202 X-1matches, to determine that the first word is a matching first word. If it is determined that a first word is a matching first word, the control logic 502 may store the address of the matching first word or another suitable indicator of the matching first word in a register or other suitable storage element. For example, in response to the first portion 504 of the search element matching the first portion 102 2_0 of element 2 in the first word 2021, determines that the first word 2021 is a matching first word, and an indication (e.g., address) of the first word 2021 is retained by the control logic 502. Once each matching first word 2020 to 202 X-1 is determined, the first phase (e.g., phase 0) of the search process is completed. If it is determined that no first words 2020 to 202 X-1matching first words, the search operation is completed and the control logic 502 returns a result “search item not found”.
[0025] Fig. 5B illustrates the system 500 in a second phase (e.g., phase 1) of the search operation. In the second phase of the search operation, the control logic 502 is configured to compare the second portion of the search element 505 with the second portion of each list element 0 through N-1 contained in every other word 202 X until 202 N-1 corresponding to each matching first word determined in the first phase of the search process, as described with reference to Fig. 5A. For example, if the first word 2021 is the only matching first word, only the corresponding second word 202X+1 is searched in the second phase. In some examples, the control logic 502 may include the first comparator 510 and the second comparator 511 to simultaneously compare the second portion 505 of the search item with the second portion of the list items stored in the first part and the second part of each second word that corresponds to a matching first word to obtain a first result at 520 and a second result at 521, respectively. The control logic 502 is configured to determine that the search item matches the list item in response to the second portion of the search item 505 matching a second portion of a list item in a second word that corresponds to a matching first word.For example, in response to the second portion 505 of the search element being associated with the second portion 102. 2_1 of element 2 in the second word 202 X+1 matches, determines that element 2 matches the search element. If no second words 202 X+1 until 202 N-1 that correspond to a matching first word comprise the second portion of the search element 505, the search operation is completed and the control logic 502 outputs a "search element not found" result.
[0026] Accordingly, the first phase of the search process may exclude two items for each word retrieved from memory 200. If the first portion of each list item does not match the first portion of the search item, the search is completed with N / 2 words retrieved from memory 200. This is in contrast to searching memory 100 from Fig. 1, where N words would be retrieved from memory 100 to complete the search. The probability of a partial match (e.g., the first portion of the search item matches a list item, but the second portion of the search item does not match the list item) depends on the width of the portions and the bit distribution. For example, for a width of 16 bits and a random bit distribution, the probability that either the first portion or the second portion of the search item matches a corresponding portion of a list item is 2 / 2^16 = 1 / 32,768. For small lists (e.g., 128 items), the cumulative probability is quite small at 64 / 32,768, or approximately 0.2 percent. Therefore, the search can complete in N / 2 memory fetches approximately 99.8 percent of the time. In addition to a faster search, less power can be consumed to retrieve data from memory.
[0027] Fig. 6 is a block diagram illustrating an example of a system 600 for performing a search operation on the data stored in the memory 300 of Fig. 3 stored list. While Fig. 6 illustrates the system 600 in a first phase (e.g., phase 0) of the search process, it will be appreciated that the system 600 is also applicable to a second phase (e.g., phase 1) and a third phase (e.g., phase 2) of the search process, similar to the second phase of the system 500 of Fig. 5B. The system 600 includes a memory 300 having a memory as previously described and with reference to Fig. 3, and a control logic 602. The control logic 602 is communicatively coupled to the memory 300. In some examples, the control logic 602 may be implemented in hardware (e.g., registers, comparators, logic gates, an ASIC, an FPGA, etc.), such as by a state machine, as described below with reference to Fig. 9. In some examples, the control logic 602 may be implemented by a processing system including a CPU, a processor, or a microprocessor, as described below with reference to Fig. 10 is described.
[0028] The control logic 602 receives a search element and divides the search element into a first section of the search element, a second section of the search element, and a third section of the search element. The control logic 602 is configured to combine the first section of the search element 604 with the first section 102. 0_0 up to 102 N-1_0each list element 0 to N-1 in each first word 3020 to 302 X-1 In some examples, the control logic 602 may include a first comparator 610, a second comparator 611, and a third comparator 612 to compare the first portion 604 of the search item simultaneously with the first portion of the list items included in the first part, the second part, and the third part of each word 3020 to 302 X-1 stored, to obtain a first result at 620, a second result at 621 and a third result at 622 for each word 3020 to 302 X-1 The control logic 602 is configured to determine, in response to the first portion of the search element matching a first portion in a first word, that the first word is a matching first word. For example, in response to the first portion 604 of the search element matching the first portion 1023_0 of element 3 in the first word 3021, determines that the first word 3021 is a matching first word. Once each matching first word 3020 to 302 X-1 is determined, the first phase (e.g., phase 0) of the search process is completed. If it is determined that no first words 3020 to 302 X-1 matching first words, the search process is completed and the control logic 602 returns a result “search element not found”.
[0029] In a second phase (e.g., phase 1) of the search process (not shown), the control logic 602 is configured to compare the second portion of the search element with the second portion of each list element 0 to N-1 contained in every other word 302 X up to 302 Y-1stored that corresponds to each matching first word determined in the first phase of the search process. The control logic 602 is configured to, in response to the second portion of the search element being compared with a second portion in a second word 302 X up to 302 Y-1 that corresponds to a matching first word, to determine that the second word is a matching second word. If it is determined that no second words 302 X up to 302 Y-1 matching second words, the search operation is completed and the control logic 602 returns a result “search item not found”.
[0030] In a third phase (e.g., phase 2) of the search process (not shown), the control logic 602 is configured to compare the third portion of the search element with the third portion of each list element 0 to N-1 contained in every third word 302 Y up to 302N-1 stored that corresponds to each matching second word determined in the second phase of the search process. The control logic 602 is configured to, in response to the third portion of the search element being compared with a third portion in a third word 302 Y up to 302 N-1 that matches a matching second word, to determine that the search item matches the list item. If no third words 302 Y up to 302 N-1 that correspond to a matching second word comprise the third portion of the search item, the search operation is completed and the control logic 602 returns a "search item not found" result.
[0031] Fig. 7 is a block diagram illustrating an example of a system 700 for performing a search operation on the data stored in the memory 400 of Fig. 4 stored list. While Fig. 7 illustrates the system 700 in a first phase (e.g., phase 0) of the search process, it will be appreciated that the system 700 is also applicable to a second phase (e.g., phase 1), a third phase (e.g., phase 2), and a fourth phase (e.g., phase 3) of the search process, similar to the second phase of the system 500 in Fig. 5B. The system 700 includes a memory 400 having a memory as previously described and with reference to Fig. 4, and a control logic 702. The control logic 702 is communicatively coupled to the memory 400. In some examples, the control logic 702 may be implemented in hardware (e.g., registers, comparators, logic gates, an ASIC, an FPGA, etc.), such as by a state machine, as described below with reference to Fig. 9. In some examples, the control logic 702 may be implemented by a processing system including a CPU, a processor, or a microprocessor, as described below with reference to Fig. 10 is described.
[0032] The control logic 702 receives a search element and divides the search element into a first section of the search element, a second section of the search element, a third section of the search element, and a fourth section of the search element. The control logic 702 is configured to combine the first section of the search element 704 with the first section 102. 0_0 up to 102 N-1_0 each list element 0 to N-1 in each first word 4020 to 402 X-1In some examples, the control logic 702 may include a first comparator 710, a second comparator 711, a third comparator 712, and a fourth comparator 713 to compare the first portion 704 of the search item simultaneously with the first portion of the list items included in the first part, the second part, the third part, and the fourth part of each word 4020 to 402 X-1 stored to obtain a first result at 720, a second result at 721, a third result at 722 and a fourth result at 723, respectively, for each word 4020 to 402 X-1 The control logic 702 is configured to determine, in response to the first portion of the search element matching a first portion in a first word, that the first word is a matching first word. For example, in response to the first portion 704 of the search element matching the first portion 1024_0 of element 4 in first word 4021, determines that first word 4021 is a matching first word. Once every matching first word 4020 to 402 X-1 is determined, the first phase (e.g., phase 0) of the search process is completed. If it is determined that no first words 4020 to 402 X-1 matching first words, the search process is completed and the control logic 702 returns a result “search item not found”.
[0033] In a second phase (e.g., phase 1) of the search process (not shown), the control logic 702 is configured to compare the second portion of the search element with the second portion of each list element 0 to N-1 contained in every other word 402 X up to 402 Y-1stored that corresponds to each matching first word determined in the first phase of the search process. The control logic 702 is configured to, in response to the second portion of the search element being compared with a second portion in a second word 402 X up to 402 Y-1 that corresponds to a matching first word, to determine that the second word is a matching second word. If it is determined that no second words 402 X up to 402 Y-1 matching second words, the search operation is completed and the control logic 702 returns a result “search item not found”.
[0034] In a third phase (e.g., phase 2) of the search process (not shown), the control logic 702 is configured to compare the third portion of the search element with the third portion of each list element 0 to N-1 contained in every third word 402 Y up to 402Z-1 stored that corresponds to each matching second word determined in the second phase of the search process. The control logic 702 is configured to, in response to the third portion of the search element being compared with a third portion in a third word 402 Y up to 402 Z-1 that corresponds to a matching second word, to determine that the third word is a matching third word. If it is determined that no third words 402 Y up to 402 Z-1 matching third words, the search operation is completed and the control logic 702 returns a result “search item not found”.
[0035] In a fourth phase (e.g., phase 3) of the search process (not shown), the control logic 702 is configured to compare the fourth portion of the search element with the fourth portion of each list element 0 to N-1 contained in every fourth word 402Z up to 402 N-1 stored that corresponds to each matching third word determined in the third phase of the search process. The control logic 702 is configured, in response to the fourth portion of the search element being compared with a fourth portion in a fourth word 402 Z up to 402 N-1 that matches a matching second word, to determine that the search item matches the list item. If no fourth words 402 Z up to 402 N-1 that correspond to a matching third word comprise the fourth portion of the search item, the search operation is completed and the control logic 702 returns a "search item not found" result.
[0036] Fig. 8A-8C are flowcharts illustrating an example of a method 800 for performing a search operation. As in Fig. 8A at 802, the method 800 includes storing a list of elements (e.g., elements 0 through N-1) in at least first words (e.g., 2020 through 202 X- 1 out of Fig. 2, Fig. 3020 to 302 X-1 out of Fig. 3 or Fig. 4020 to 402 X-1 out of Fig. 4) and second words (e.g. 202 X until 202 N-1 out of Fig. 2, Fig. 302 X up to 302 Y-1 out of Fig. 3 or Fig. 402 X up to 402 Y-1 out of Fig. 4) corresponding to the first words in a memory, so that each first word has a first section (e.g. 102 0_0 up to 102 N-1_0 ) stores each of at least two different list elements and each corresponding second word stores a second section (e.g. 102 0_1 up to 102 N-1_1) stores each of the at least two distinct list items. In some examples, the item list comprises an unsorted item list, such as a list of Bluetooth addresses.
[0037] At 804, the method 800 includes receiving a search element. At 806, the method 800 includes splitting the search element into at least a first portion (e.g., 504 of Fig. 5A) and a second section (e.g. 505 from Fig. 5B). At 808, method 800 includes comparing the first portion of the search item to each first portion of each list item in each first word. At 810, in response to the first portion of the search item matching a first portion in a first word, method 800 includes determining that the first word is a matching first word. At 812, method 800 includes comparing the second portion of the search item to each second portion of each list item stored in each second word corresponding to each matching first word. At 814, in response to at least the second portion of the search item matching a second portion of a list item in a second word, method 800 includes determining that the search item matches the list item.
[0038] As in Fig. 8B at 816, the method 800 may further comprise storing the item list in at least first words, second words corresponding to the first words, and third words (e.g., 302 Y up to 302 N-1 out of Fig. 3 or Fig. 402 Y up to 402 Z-1 out of Fig. 4) corresponding to the second words in the memory, such that each first word stores the first portion of each of at least three different list items, each corresponding second word stores the second portion of each of the at least three different list items, and each corresponding third word stores a third portion (e.g., 102 0_2 up to 102 N-1_2) stores each of the at least three different list items. At 818, the method 800 may further comprise splitting the search item into at least the first portion, the second portion, and a third portion. At 820, the method 800 may further comprise, in response to the second portion of the search item matching a second portion in a second word, determining that the second word is a matching second word. At 822, the method 800 may further comprise comparing the third portion of the search item to each third portion of each list item stored in each third word that corresponds to each matching second word.At 824, the method 800 may further comprise, in response to at least the third portion of the search item matching a third portion of a list item in a third word, determining that the search item matches the list item.
[0039] As in Fig. 8C at 826, the method 800 may further comprise storing the item list in at least first words, second words corresponding to the first words, third words corresponding to the second words, and fourth words (e.g., 402 Z up to 402 N-1 out of Fig. 4) corresponding to the third words in the memory, such that each first word stores the first portion of each of at least four different list items, each corresponding second word stores the second portion of each of the at least four different list items, each corresponding third word stores the third portion of each of the at least four different list items, and each corresponding fourth word stores a fourth portion (e.g., 102 0_3 up to 102 N-13) stores each of the at least four different list items. At 828, the method 800 may further comprise splitting the search item into at least the first portion, the second portion, the third portion, and a fourth portion. At 830, the method 800 may further comprise, in response to the third portion of the search item matching a third portion in a third word, determining that the third word is a matching third word. At 832, the method 800 may further comprise comparing the fourth portion of the search item to each fourth portion of each list item stored in each fourth word that corresponds to each matching third word.At 834, the method 800 may further comprise, in response to at least the fourth portion of the search item matching a fourth portion of a list item in a fourth word, determining that the search item matches the list item.
[0040] Fig. 9 is a block diagram illustrating an example of a state machine 900 for performing a search operation such as that shown in Fig. 5A and Fig. 5B. The state machine 900 includes a wait state 902, a split state 904, a phase 0 state 906, a not found state 908, a phase 1 state 910, and a found state 912. In the wait state 902, the state machine 900 waits for a search element to be received. For example, the wait state 902 may wait for a search element to be written to a search element register or other suitable storage element. Once a search element is received, control transfers to the split state 904, which splits the search element into two sections. For example, the split state 904 may split the search element into a first (e.g., lower half) section of the search element and a second (e.g., upper half) section of the search element.In some examples, the first portion of the search element may be stored in a first register or other suitable storage element, and the second portion of the search element may be stored in a second register or other suitable storage element. If the search element is split into two portions, control transfers to phase 0 state 906.
[0041] The phase 0 state 906 searches for the first portion of the search element in a list (e.g., list of elements 0 through N-1 stored in the memory 200 of Fig. 2 is stored). For example, in the phase 0 state 906, the first portion of the search element (e.g., 504 of Fig. 5A) via comparators (e.g. 510 and 511 of Fig. 5A) with the first section of each list item, which in each first word (e.g. 2020 to 202 X-1 from Fig. 5A) of memory. If the first portion of the search element is not found in the list, control transfers to the not found state 908, which returns a "search element not found" result. Control then returns to the wait state 902. In response to finding the first portion of the search element in the list (e.g., in a first word of memory), the phase 0 state 906 indicates the row(s) of the list that match(es) the first portion of the search element. For example, the address or other suitable indicator of each row of the list that match(es) the first portion of the search element may be stored in a register or other suitable storage element. Control then transfers to the phase 1 state 910.
[0042] The phase 1 state 910 searches for the second portion of the search element in rows of the list that correspond to rows of the list that match the first portion of the search element (e.g., as indicated in the phase 0 state 906). For example, in the phase 1 state 910, the second portion of the search element (e.g., 505 of Fig. 5B) via comparators (e.g. 510 and 511 of Fig. 5B) with the second section of each list item, which appears in every second word (e.g. 202 X until 202 N-1 from Fig. 5B) of memory corresponding to a matching first word from the Phase 0 state 906. If the second portion of the search item is not found in the list, control transfers to the Not Found state 908, which returns a "Search Item Not Found" result. Control then returns to the Wait state 902. In response to finding the second portion of the search item in the list (e.g., in a corresponding second word of memory), the Phase 1 state 910 indicates that the second portion of the search item has been found, and control transfers to the Found state 912. The Found state 912 returns a "Search Item Found" result. Control then returns to the Wait state 902 to wait to search for another search item.
[0043] It is obvious that the state machine 900 can be extended to implement the method described with reference to Fig. 6 or Fig. 7 or the method 800 from Fig. 8A-8C by adding additional phase states (e.g., a phase 2 state, a phase 3 state).
[0044] Fig. 10 is a block diagram illustrating an example of a processing system 1000 for performing a search operation. In some examples, the processing system 1000 may implement the method described with reference to Fig. 5A-5B, Fig. 6 or Fig. 7 or the method 800 from Fig. 8A-8C. The processing system 1000 includes a processor 1002 and a machine-readable storage medium 1006. The processor 1002 is communicatively coupled to the machine-readable storage medium 1006 via a communication path 1004. Although the following description refers to a single processor and a single machine-readable storage medium, the description may also apply to a system having multiple processors and multiple machine-readable storage media. In such examples, the data and instructions may be distributed (e.g., stored) across multiple machine-readable storage media, and the instructions may be distributed (e.g., executed by) multiple processors.
[0045] The processor 1002 includes one (i.e., a single) central processing unit (CPU) or microprocessor, or more than one (i.e., multiple) CPUs or microprocessors and / or other suitable hardware devices for retrieving and executing instructions stored in the machine-readable storage medium 1006. The machine-readable storage medium 1006 may include a data store 1008 and an instruction store 1012. The data store 1008 may store an item list 1010, as previously described with reference to Fig. 2, Fig. 3 or Fig. 4. Processor 1002 may fetch, decode, and execute instructions 1014-1024 to perform a search of element list 1010.
[0046] Processor 1002 may fetch, decode, and execute instructions 1014 to receive a search item. Processor 1002 may fetch, decode, and execute instructions 1016 to split the search item. For example, processor 1002 may split the search item into two sections, as described with reference to Fig. 5A and Fig. 5B, three sections as described with reference to Fig. 6, or four sections as described with reference to Fig. 7, depending on how the element list 1010 is stored in the data memory 1008.
[0047] The processor 1002 may retrieve, decode, and execute instructions 1018 to search the item list for the first portion in a first phase (i.e., phase 0) of the search. For example, the processor 1002 may search for the first portion of the search item in first words of the item list 1010 (where the first portion of at least two items of the list are stored in each first word) and determine which first words (if any) comprise a matching first portion of the search item. The processor 1002 may retrieve, decode, and execute instructions 1020 to search the item list for the second portion of the search item in a second phase (i.e., phase 1) of the search.For example, the processor 1002 may search for the second portion of the search item in second words of the item list 1010 (where the second portion of at least two items of the list are stored in every other word) that correspond to matching first words, and determine which second words (if any) comprise a matching second portion of the search item.
[0048] If the elements in the element list 1010 stored in the memory 1008 are divided into two sections (e.g. Fig. 2), instructions 1022 are excluded. If the elements in the element list 1010 stored in the memory 1008 are divided into three sections (e.g. Fig. 3) or four sections (e.g. Fig.4), the processor 1002 may fetch, decode, and execute further instructions 1022 to search the item list for additional portion(s) of the search item in additional phase(s) (i.e., Phase 2, Phase 3). For example, in a Phase 2, in response to the search item being split into three portions, the processor 1002 may search for the third portion of the search item in third words of the item list 1010 (where the third portion of at least three items of the list are stored in every third word) that correspond to matching second words, and determine which third words (if any) comprise a matching third portion of the search item.In response to the search item being divided into four portions, in a phase 3, the processor 1002 may further search for the fourth portion of the search item in fourth words of the item list 1010 (where the fourth portion of at least four items of the list are stored in every fourth word) that correspond to matching third words, and determine which fourth words (if any) comprise a matching fourth portion of the search item.
[0049] Processor 1002 may fetch, decode, and execute instructions 1024 to return a result. For example, in response to the first portion of the search item not matching a first word in phase 0, processor 1002 returns a "search item not found" result. In response to the second portion of the search item not matching a second word in phase 1, processor 1002 returns a "search item not found" result. In response to the search item being split into two portions and in response to the second portion of the search item matching a second word in phase 1, processor 1002 returns a "search item found" result.In response to the search item being split into three sections and in response to the third section of the search item not matching a third word in phase 2, processor 1002 outputs a "search item not found" result. In response to the search item being split into three sections and in response to the third section of the search item matching a third word in phase 2, processor 1002 outputs a "search item found" result. In response to the search item being split into four sections and in response to the fourth section of the search item not matching a fourth word in phase 3, processor 1002 outputs a "search item not found" result.In response to the search item being split into four sections, and in response to the fourth section of the search item matching a fourth word in phase 3, processor 1002 outputs a "search item found" result.
[0050] Alternatively, or in addition to fetching and executing instructions, the processor 1002 may include one (i.e., a single) electronic circuit or more than one (i.e., multiple) electronic circuits comprising a number of electronic components for performing the functionality of one or more of the instructions in the instruction memory 1012 of the machine-readable storage medium 1006. With respect to the representations of executable instructions (e.g., fields) described and illustrated herein, it should be understood that some or all of the executable instructions and / or electronic circuits included in one field may, in alternative examples, be included in a different field illustrated in the drawings or in a different field not shown.
[0051] The machine-readable storage medium 1006 is a non-transitory storage medium and may be any suitable electronic, magnetic, optical, or other physical storage device that stores executable instructions. Thus, the machine-readable storage medium 1006 may be, for example, random access memory (RAM), electrically erasable programmable read-only memory (EEPROM), a storage drive, an optical disk, and the like. The machine-readable storage medium 1006 may be disposed within an electronic device (e.g., computer, smartphone, tablet, smart device, etc.). In this case, the executable instructions may be installed on the electronic device.Alternatively, the machine-readable storage medium 1006 may be a portable, external, or remote storage medium that allows the electronic device to download the instructions from the portable / external / remote storage medium. In this case, the executable instructions may be part of an installation package.
[0052] It is understood that the features of the various exemplary embodiments described herein may be combined with one another unless expressly stated otherwise.
[0053] Although specific examples have been illustrated and described herein, the specific examples shown and described may be replaced with a variety of alternative and / or equivalent implementations without departing from the scope of the present disclosure. This application is intended to cover any adaptations or variations of the specific examples discussed herein. Therefore, this disclosure is intended to be limited only by the claims and their equivalents. QUOTES CONTAINED IN THE DESCRIPTION
[0000] This list of documents submitted by the applicant was generated automatically and is included solely for the convenience of the reader. This list is not part of the German patent or utility model application. The DPMA assumes no liability for any errors or omissions. Cited patent literature
[0000] US 63 / 585,185
[0001]
Claims
[1] A system that includes: a memory that stores an item list in first words and second words corresponding to the first words, such that each first word stores a first portion of each of two different list items and each corresponding second word stores a second portion of each of the two different list items; and control logic communicatively coupled to the memory, the control logic configured to: Comparing a first portion of a search item with the first portion of each list item in each first word; in response to the first portion of the search item matching a first portion in a first word, determining that the first word is a matching first word; Comparing a second portion of the search item with the second portion of each list item stored in every second word corresponding to each matching first word; and in response to the second portion of the search item matching a second portion of a list item in a second word, determining that the search item matches the list item. [2] The system of claim 1, wherein the first portion of each list item includes a lower half of each list item and the second portion of each list item includes an upper half of each list item. [3] The system of claim 1, wherein the second words are stored in the memory immediately after the first words. [4] The system of claim 1, wherein the item list includes an unsorted item list. [5] The system of claim 1, wherein the control logic includes a processor. [6] The system of claim 1, wherein the control logic includes two comparators. [7] The system of claim 1, wherein the item list includes a list of Bluetooth addresses. [8] A system that includes: a memory storing a list of items in at least first words and second words corresponding to the first words, such that each first word stores a first portion of each of at least two different list items and each corresponding second word stores a second portion of each of the at least two different list items; and control logic communicatively coupled to the memory, the control logic configured to: Receiving a search item; Dividing the search element into at least a first section and a second section; Comparing the first portion of the search item with each first portion of each list item in each first word; in response to the first portion of the search item matching a first portion in a first word, determining that the first word is a matching first word; Comparing the second portion of the search item with every second portion of each list item stored in every second word corresponding to each matching first word; and in response to at least the second portion of the search item matching a second portion of a list item in a second word, determining that the search item matches the list item. [9] The system of claim 8, wherein the memory stores the item list in at least first words, second words corresponding to the first words, and third words corresponding to the second words, such that each first word stores the first portion of each of at least three different list items, each corresponding second word stores the second portion of each of the at least three different list items, and each corresponding third word stores a third portion of each of the at least three different list items, and wherein the control logic is further configured to: Dividing the search element into at least the first section, the second section and a third section; in response to the second portion of the search item matching a second portion in a second word, determining that the second word is a matching second word; Comparing the third portion of the search item with every third portion of each list item stored in every third word corresponding to each matching second word; and in response to at least the third portion of the search item matching a third portion of a list item in a third word, determining that the search item matches the list item. [10] The system of claim 9, wherein the memory stores the item list in at least first words, second words corresponding to the first words, third words corresponding to the second words, and fourth words corresponding to the third words, such that each first word stores the first portion of each of at least four different list items, each corresponding second word stores the second portion of each of the at least four different list items, each corresponding third word stores a third portion of each of the at least four different list items, and each corresponding fourth word stores a fourth portion of each of the at least four different list items, and wherein the control logic is further configured to: Dividing the search element into at least the first section, the second section, the third section and a fourth section; in response to the third portion of the search item matching a third portion in a third word, determining that the third word is a matching third word; Comparing the fourth portion of the search item with every fourth portion of each list item stored in every fourth word corresponding to each matching third word; and in response to at least the fourth portion of the search item matching a fourth portion of a list item in a fourth word, determining that the search item matches the list item. [11] The system of claim 8, wherein the second words are stored in the memory immediately after the first words. [12] The system of claim 8, wherein the item list includes an unsorted item list. [13] The system of claim 8, wherein the control logic includes a processor. [14] The system of claim 8, wherein the control logic includes at least two comparators. [15] The system of claim 8, wherein the item list includes a list of Bluetooth addresses. [16] A procedure that includes: Storing a list of items in at least first words and second words corresponding to the first words in a memory such that each first word stores a first portion of each of at least two different list items and each corresponding second word stores a second portion of each of the at least two different list items; Receiving a search item; Dividing the search element into at least a first section and a second section; Comparing the first portion of the search item with each first portion of each list item in each first word; in response to the first portion of the search item matching a first portion in a first word, determining that the first word is a matching first word; Comparing the second portion of the search item with every second portion of each list item stored in every second word corresponding to each matching first word; and in response to at least the second portion of the search item matching a second portion of a list item in a second word, determining that the search item matches the list item. [17] The method of claim 16, wherein storing the list of items includes storing the list of items in the memory in at least first words, second words corresponding to the first words, and third words corresponding to the second words, such that each first word stores the first portion of each of at least three different list items, each corresponding second word stores the second portion of each of the at least three different list items, and each corresponding third word stores a third portion of each of the at least three different list items, and wherein splitting the search item includes splitting the search item into at least the first portion, the second portion, and a third portion, the method further comprising: in response to the second portion of the search item matching a second portion in a second word, determining that the second word is a matching second word; Comparing the third portion of the search item with every third portion of each list item stored in every third word corresponding to each matching second word; and in response to at least the third portion of the search item matching a third portion of a list item in a third word, determining that the search item matches the list item. [18] The method of claim 17, wherein storing the list of items includes storing the list of items in the memory in at least first words, second words corresponding to the first words, third words corresponding to the second words, and fourth words corresponding to the third words, such that each first word stores the first portion of each of at least four different list items, each corresponding second word stores the second portion of each of the at least four different list items, each corresponding third word stores the third portion of each of the at least four different list items, and each corresponding fourth word stores a fourth portion of each of the at least four different list items, and wherein splitting the search item includes splitting the search item into at least the first portion, the second portion, the third portion, and a fourth portion,the method further comprising: in response to the third portion of the search item matching a third portion in a third word, determining that the third word is a matching third word; Comparing the fourth portion of the search item with every fourth portion of each list item stored in every fourth word corresponding to each matching third word; and in response to at least the fourth portion of the search item matching a fourth portion of a list item in a fourth word, determining that the search item matches the list item. [19] The method of claim 16, wherein the item list includes an unsorted item list. [20] The method of claim 16, wherein the item list includes a list of Bluetooth addresses.
Citation Information
Patent Citations
63/585,185