# US 2012/0233415 A1 · Method and apparatus for searching for data in memory, and memory

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2012/0233415 A1
- Document ID: US20120233415A1
- Status: Published application
- Kind: A1
- Application number: 13/403,478
- Filed: 2012-02-23
- Published: 2012-09-13
- Earliest claimed: 2011-02-23
- Assignees: Huawei Technologies Co., Ltd.
- Inventors: Bingwu JI; Tanfu ZHAO; Yunming ZHOU; Jiarong LI; Wei LIN
- Web page: https://patentgrep.com/patent/US20120233415A1

## CPC

- G06F 16/90339: {by using parallel associative memories or content-addressable memories}
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- 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

## Abstract

The invention provides a method and apparatus for searching for data in a memory. The memory includes at least two storage areas, each storage area includes at least two storage blocks, and storage blocks in each storage area are corresponding to each other. The method includes: determining whether a hit storage block that matches with data to be searched for exists in a current storage area; and if it is determined that the hit storage block exists, searching for a storage block corresponding to the hit storage block in a next storage area, so as to determine whether a hit storage block further exists. Accordingly, a storage block corresponding to a missed storage block may execute no operation, thus reducing power consumption.

## Claims

### Claim 1

A method for searching for data in a memory, wherein the memory comprises at least two storage areas, each storage area comprises at least two storage blocks, and each storage block in a current storage area has a corresponding storage block in a next storage area, and the method comprises:
determining whether a hit storage block exists in the current storage area, wherein the hit storage block comprises data which matches with the data to be searched for;
if the hit storage block exists, searching the corresponding storage block of the hit storage block in the next storage area, for the data which matches with the data to be searched for.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the searching the corresponding storage block of the hit storage block in the next storage area consists of:
searching only the corresponding storage block of the hit storage block in the next storage area.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the searching the corresponding storage block of the hit storage block in the next storage area comprises:
determining a priority of the hit storage block;
determining a low-priority storage block whose priority is not higher than the priority of the hit storage block; and
searching the corresponding storage block of the hit storage block and corresponding storage block of the low-priority storage block for the data which matches the data to be searched for.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the priority of the hit storage block is the highest among priorities of the hit storage block.

### Claim 5

An apparatus for searching for data in a memory, wherein the memory comprises at least two storage areas, each storage area comprises at least two storage blocks, and each storage block in a current storage area has a corresponding storage block in a next storage area, and the apparatus comprises:
a determining module, configured to determine whether a hit storage block exists in the current storage area, wherein the hit storage block comprises data which matches with the data to be searched for; and
a searching module, configured to search the corresponding storage block of the hit storage block in the next storage area, for the data which matches with the data to be searched for, when the hit storage block exists.

### Claim 6 (depends on 5)

The apparatus according to claim 5, wherein the searching module is configured to search only the corresponding storage block of the hit storage block in the next storage area, for the data which matches with the data to be searched for, when the hit storage block exists.

### Claim 7 (depends on 5)

The apparatus according to claim 5, wherein the searching module comprises:
a priority determining unit, configured to determine a priority of the hit storage block;
a block determining unit, configured to determine a low-priority storage block whose priority is not higher than the priority of the hit storage block; and
a block searching unit, configured to search the corresponding storage block of the hit storage block and corresponding storage block of the low-priority storage block for the data which matches the data to be searched for.

### Claim 8 (depends on 7)

The apparatus according to claim 7, wherein the priority of the hit storage block is the highest among priorities of the hit storage block.

### Claim 9 (depends on 5)

The apparatus according to claim 5, wherein the determining module and the searching module comprise at least one control circuit, wherein each control circuit is connected between two adjacent storage areas, and is configured to
determine whether the hit storage block that matches data to be searched for exists in a former storage area of the two adjacent storage areas, and
control a storage block corresponding to the hit storage block in a latter storage area of the two adjacent storage areas to perform a data matching operation if it is determined that the hit storage block exists.

### Claim 10 (depends on 9)

The apparatus according to claim 9, wherein the control circuit comprises:
at least two hit determining sub-circuits, corresponding to a storage area in the former storage block, and configured to determine whether a corresponding storage block is hit; and
a control generation sub-circuit, configured to, if the at least two hit determining sub-circuits determine that the corresponding storage block is hit, control a storage block corresponding to the hit storage block in the latter storage area to perform the data matching operation.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein the control generation sub-circuit comprises an OR gate and an AND gate, wherein the OR gate is configured to determine a priority of the storage block, and the AND gate is configured to receive data input from an input line of the data to be searched for and an output from the OR gate, so as to control whether the received data is input to the storage block.
