Unlock instant, AI-driven research and patent intelligence for your innovation.

A method and system for sharing RAM based on HASH search mode

A look-up table and base address technology, applied in the field of computer communication, can solve the problems of not having the function of adjusting the size of entries, complicated design and use, etc.

Active Publication Date: 2018-12-18
FENGHUO COMM SCI & TECH CO LTD +1
View PDF12 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Some of the current switching chips do not have the function of adjusting the item size; some of them realize item sharing through the allocation of RAM blocks according to the configuration, and the design will include a large number of small blocks of RAM, which makes the design and use more complicated.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and system for sharing RAM based on HASH search mode
  • A method and system for sharing RAM based on HASH search mode
  • A method and system for sharing RAM based on HASH search mode

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0047] see figure 1 As shown, the embodiment of the present invention provides a method for sharing RAM based on the HASH search method, including the following steps:

[0048] S1, obtain the number of entries and the entry bit width of the lookup entries contained in each lookup table type, determine the required shared RAM bit width according to the entry bit width of each lookup table type, and the shared RAM bit width is not less than the maximum value of the entry bit width; A lookup table type includes multiple lookup entries, and each lookup entry includes an entry effective identifier, a key value and a lookup result.

[0049] S2, according to the shared RAM bit width determined in S1 and the number of entries of each look-up table type, calculate the RAM depth corresponding to each look-up table type, and determine the required shared RAM depth;

[0050] S3, configure the base address of each table lookup type in the shared RAM, the configured base address is any add...

Embodiment 2

[0057] On the basis of embodiment 1, assume that 4 kinds of look-up table types are needed in a certain design requirement: the entry bit width of the first look-up table type is 50, and the number of entries is 256; the entry bit width of the second look-up table type is 65, The number of entries is 2048, the entry bit width of the third lookup table type is 80, the number of entries is 4096, the entry bit width of the fourth lookup table type is 180; the number of entries is 512.

[0058] Step S1 specifically includes the following processes:

[0059] 1. Calculate according to the method of determining the RAM bit width and the number of comparisons required for each search:

[0060] Set the required shared RAM bit width to 200 bits, and continue to calculate the following table based on the shared RAM bit width:

[0061] Each lookup table type

Parallel table lookup times m

Figure out the required RAM depth

1

4

64(256 / 4=64)

2

3

1024...

Embodiment 3

[0072] On the basis of embodiment 1, step S4 is also included after step S3:

[0073] When configuring the lookup entry in the shared RAM, perform HASH calculation based on the keyword value of the lookup entry to be configured, and take the calculation result according to the number of digits of the hash result of the lookup table type to which the lookup entry belongs, plus the lookup The base address of the lookup table type to which the entry belongs is used as the RAM address of the entry to be written in the shared RAM; the keyword value of the lookup entry to be configured and the corresponding table lookup result are configured to the RAM address of the entry to be written in the shared RAM , and configure the entry valid flag of the search entry to be valid.

[0074] The key value of the search entry to be configured and the table lookup result are configured to the RAM address of the entry to be written in the shared RAM, and the configuration entry is effectively ma...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and a system for sharing RAM based on HASH search mode. The invention relates to a computer communication technology, which enables multiple databases to coexist in one RAM or a group of RAM by configuring a base address and a HASH result bit for each lookup table type and reasonably determining the width and depth of a shared RAM according to the entry width of each lookup table type. The invention makes the most economical use of RAM resources, and provides the capability of overcoming HASH collision for non-longest searching entries while supporting longestsearching entries.

Description

technical field [0001] The invention relates to the technical field of computer communication, in particular to a method and system for sharing RAM based on a HASH search mode. Background technique [0002] Currently in the communication field, communication based on Ethernet packets or IP packets occupies a mainstream position. Among them, data communication equipment such as Ethernet switches and routers need to use packet processing chips or FPGAs to process Ethernet packets or IP packets. According to the protocol field information carried in the data frame header, the input port and output port of the data packet, Processing with configuration information involves a lot of table lookup processing. For example: Ingress VLAN (Virtual Local Access Network) processing needs to perform a table lookup according to the input port and the VLAN_ID (VLAN Identification) of the data frame to obtain the behavior of VLAN processing. To check the table to determine the forwarding b...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): H04L12/741H04L12/743G06F17/30H04L45/74
CPCH04L45/745H04L45/7453
Inventor 杨彦波张艳张伟
Owner FENGHUO COMM SCI & TECH CO LTD