A TCAM fast update method and system architecture applied to satellite routing

By partitioning and reordering the TCAM, the problems of long TCAM update time and the influence of cosmic radiation in onboard routing are solved, and efficient TCAM update and table lookup are achieved.

CN119520372BActive Publication Date: 2025-10-10CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411625641.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-10-10
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

In onboard routing applications, the TCAM-based LPM update time is too long and the efficiency is not high enough, and cosmic radiation affects the TCAM stored information.

Method used

The TCAM is split into Nsub partitions, the sub-table entry width W is calculated, the update table entries and their masks are reordered and divided to obtain multiple sub-table entries and their sub-table entry masks, and their storage address ranges in the TCAM partitions are calculated. The sub-table entries are written to the corresponding partitions and stored using the BRAM resources in the FPGA.

Benefits of technology

The update efficiency of TCAM is improved, the update time is reduced, and the processing flow is simplified through preprocessing of filters and pre-diversion modules, which improves the table lookup efficiency and avoids the impact of cosmic radiation on data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520372B_ABST
    Figure CN119520372B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of satellite communication, in particular to a TCAM fast updating method and system architecture applied to on-board routing, which comprises the following steps: splitting a TCAM to obtain multiple TCAM partitions; accepting updating table items and their masks; reordering and dividing the updating table items and their masks into multiple sub-table items and their masks, and performing a plus one operation on the sub-table items and their masks to obtain final sub-table items and their masks; calculating the storage address range of the corresponding sub-table items in the corresponding TCAM partition according to the final sub-table item masks, and writing the sub-table items into the storage address range of the corresponding TCAM partition; the updating table items and their masks are reordered and divided to obtain multiple sub-table items and their masks, and the storage address range of the sub-table items in the TCAM partition is obtained according to the sub-table item masks, so that the updating efficiency of the TCAM is improved, and the updating time of the TCAM is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of satellite communication technology, and in particular to a TCAM fast updating method and system architecture applied to satellite-borne routing. Background Art

[0002] Low Earth Orbit (LEO) satellite networks are an ambitious technology that can provide high-quality consumer-grade Internet access worldwide. Satellite networking also plays a significant role in the wave of information globalization. As the scale of satellites continues to expand, the difficulty of communication and management coordination between nodes has greatly increased. Introducing the control concept of SDN and separating the data domain and control domain of the satellite network can improve the scalability and flexibility of the network. The data domain is responsible for key information extraction, storage, classification, table lookup, etc.; the control domain performs refined management and protocol operation to ensure service quality.

[0003] Field-programmable gate arrays (FPGAs) have been recognized as suitable for space applications due to their high performance and reconfigurability. High-end FPGAs are composed of a large number of logic elements and on-chip RAM memory, which enables them to provide a high level of parallelization, thereby achieving high processing throughput. Obviously, it is impossible to change the hardware on the satellite, while functions implemented on FPGAs can easily modify and upgrade wireless network resources. At the same time, the reconfigurability of FPGAs helps to mitigate single-event and multiple-event interferences (SEU and MEU) caused by critical radiation effects. FPGAs can support protection mechanisms that replace affected modules with correct modules. Application-specific integrated circuits (ASICs) may be a better solution in terms of power consumption or speed; however, ASICs lack flexibility because they cannot be remotely reconfigured in space. Therefore, FPGAs have a great advantage because they can be reconfigured when mission objectives change or designs are upgraded.

[0004] In recent years, ternary content-addressable memory (TCAM) has been widely used in SDN flow tables because its ternary representation (0, 1, *) and fast lookup characteristics are well-suited for network address matching. TCAM-based flow tables can be viewed as ordered arrays with parallel search capabilities. With the increasing demand for onboard services, it is imperative that TCAMs can handle high-speed searches. Longest prefix match (LPM), commonly used in network forwarding, enables fast lookups of variable length and is typically implemented in TCAM on field-programmable gate arrays (FPGAs).

[0005] However, for onboard routing applications, the TCAM-based LPM update time is too long and the efficiency is not high enough, and cosmic radiation will affect the TCAM stored information. Summary of the Invention

[0006] To solve the above-mentioned problems in the prior art, the present invention adopts a TCAM fast update method applied to satellite-based routing, comprising:

[0007] S1. Split TCAM to get N sub TCAM partitions;

[0008] S2. Accept update data, which includes: update table entries and their masks;

[0009] S3, according to N sub Calculate the sub-item width W based on N sub Reorder the update table entries and their masks by summing the width W to obtain reordered update table entries and their masks;

[0010] S4. Divide the reordered update entry and its mask according to width W to obtain multiple sub-entries and their sub-entry masks, and add one to the sub-entry and its sub-entry mask to obtain a final sub-entry and its sub-entry mask; each sub-entry corresponds to a TCAM partition.

[0011] S5. Calculate the storage address range of the corresponding sub-entry in the corresponding TCAM partition according to the final sub-entry mask, and write the sub-entry into the storage address range of the corresponding TCAM partition.

[0012] Calculating the sub-entry width W includes: obtaining the total length L of the update entry, dividing the total length of the update entry by the number of TCAM partitions N sub , get the width W of the sub-item.

[0013] Reordering the update table entries and their masks includes:

[0014] S31, initialize the sub-item width index w=0 and the sub-item number index i=0;

[0015] S32, determine whether w=W. If so, obtain the reordered update entry and its mask; otherwise, execute step S33;

[0016] S33, determine i=N sub Is it true? If so, set i=0, w=w+1 and return to step S32; otherwise, execute step S34;

[0017] S34 . Update the update entry and its mask according to the index w of the sub-entry width and the index i of the number of sub-entries, set i=i+1, and return to step S33 .

[0018] Updating the update entry and its mask includes:

[0019] Re_Entry[i×W+w]=Entry[w×N sub +i]

[0020] Re_Mask[i×W+w]=Mask[w×N sub +i]

[0021] Among them, Mask[w×N sub +i]、Entry[w×N sub +i] indicates the w×Nth update entry and its mask sub +i bit, Re_Entry[i×W+w] and Re_Mask[i×W+w] represent the i×W+w-th bit of the reordered update entry and its mask, respectively.

[0022] The operation of adding one to a sub-item and its sub-item mask includes:

[0023] Sub_Entry i [k] = Re_Entry i [k+1]

[0024] Sub_Mask i [k] = Re_Mask i [k+1]

[0025] Among them, Sub_Entry i [k], Sub_Mask i [k] represents the final i-th sub-entry and the k-th bit of its sub-entry mask, respectively. i [k+1]、Re_Mask i [k+1] represents the i-th sub-item and the k-th bit of its sub-item mask, respectively.

[0026] The storage address range of the calculation sub-table entry in the corresponding TCAM partition is:

[0027] Addr_begin i =Sub_Entry i &~Sub_Mask i

[0028] Addr_End i =Sub_Entry i |Sub_Mask i

[0029] Among them, Addr_begin i The starting address of the sub-table entry of the i-th TCAM partition, Addr_End iSub_Entry is the end address of the sub-entry of the i-th TCAM partition. i 、Sub_Mask i They represent the final i-th sub-table item and its sub-table item mask respectively, & represents logical AND, ~ represents negation, and | represents logical OR.

[0030] A TCAM system architecture based on the TCAM fast update method applied to onboard routing includes: a TCAM lookup module, a reordering and update information distribution module, and a CPU;

[0031] The CPU is used to send update data; the reordering and update information shunting module receives the update data sent by the CPU and writes the update data into the TCAM search module using the TCAM fast update method; the update data includes: update table entries and masks.

[0032] The TCAM system architecture also includes a filter and pre-diversion module. The filter and pre-diversion module receives input data and diverts the input data into two groups of data. One group of data is uploaded to the CPU for parsing, and the other group of data is sent to the TCAM search module. The TCAM search module accurately matches the data sent by the filter and pre-diversion module to obtain the search results.

[0033] The TCAM system architecture also includes a re-encoding module, which re-encodes the search result output by the TCAM search module and outputs the best matching result.

[0034] The TCAM lookup module includes multiple TCAM partitions. The mapping rule for each TCAM partition is:

[0035]

[0036] Among them, K i is the mapping result of the i-th TCAM partition, L n The nth byte of the table entry with length L.

[0037] Beneficial effects:

[0038] 1. All internal storage of the TCAM of the present invention uses BRAM resources based on FPGA, which can avoid the impact of radiation from the onboard environment on data; 2. The present invention simplifies the processing flow through preprocessing of filters and pre-diversion modules, reduces the data sent to the TCAM search module, meets the needs of data packet classification and table lookup, and improves table lookup efficiency; 3. To address the problem of long table update time of TCAM, the present invention receives update table items and their masks sent by the CPU, reorders and divides the update table items and their masks to obtain multiple sub-table items and their sub-table item masks, obtains the storage address range of the corresponding sub-table item in the corresponding TCAM partition based on the sub-table item mask, and writes the sub-table item into the storage address range of the corresponding TCAM partition, thereby improving the update efficiency of the TCAM and reducing the update time of the TCAM. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A flowchart of a TCAM fast update method for satellite-based routing provided by an embodiment of the present invention;

[0040] Figure 2 A structural diagram of a TCAM system architecture for onboard routing provided by an embodiment of the present invention;

[0041] Figure 3 A schematic diagram of the internal structure of a TCAM according to an embodiment of the present invention;

[0042] Figure 4 The internal architecture of the reordering and update information diversion module provided in the embodiment of the present invention;

[0043] Figure 5 A schematic diagram of a TCAM fast update method for satellite-based routing provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0045] like Figure 1 As shown, the present invention adopts a TCAM fast update method applied to satellite-borne routing, comprising:

[0046] S1. Split TCAM to get N sub TCAM partitions; wherein TCAM is a ternary content addressable memory;

[0047] S2. Accept update data, which includes: update table entries and their masks;

[0048] S3, according to N sub Calculate the sub-item width W based on N sub Reorder the update table entries and their masks by summing the width W to obtain reordered update table entries and their masks;

[0049] N sub Indicates the number of TCAM partitions, W indicates the width of the sub-entry, and L indicates the total length of the update entry. The calculation formula for the width of the sub-entry is:

[0050]

[0051] like Figure 5 As shown, reordering the update table entries and their masks includes:

[0052] S31, initialize the sub-item width index w=0 and the sub-item number index i=0;

[0053] S32, determine whether w=W is true, if so, obtain the reordered update table entry and its mask; otherwise, execute step S33;

[0054] S33, determine i=N sub Is it true? If so, set i=0, w=w+1 and return to step S32; otherwise, execute step S34;

[0055] S34 . Update the update entry and its mask according to the index w of the sub-entry width and the index i of the number of sub-entries, set i=i+1, and return to step S33 .

[0056] Updating the update entry and its mask includes:

[0057] Re_Entry[i×W+w]=Entry[w×N sub +i]

[0058] Re_Mask[i×W+w]=Mask[w×N sub +i]

[0059] Among them, Mask[w×N sub +i]、Entry[w×N sub +i] indicates the w×Nth update entry and its mask sub +i bit, Re_Entry[i×W+w] and Re_Mask[i×W+w] represent the i×W+w-th bit of the reordered update entry and its mask, respectively.

[0060] S4. Divide the reordered update entry and its mask according to width W to obtain multiple sub-entries and their sub-entry masks, and add one to the sub-entry and its sub-entry mask to obtain a final sub-entry and its sub-entry mask; each sub-entry corresponds to a TCAM partition.

[0061] Sub_Entry i [k] = Re_Entry i [k+1]

[0062] Sub_Mask i [k] = Re_Mask i [k+1]

[0063] Among them, Sub_Entry i [k], Sub_Mask i [k] represents the final i-th sub-entry and the k-th bit of its sub-entry mask, respectively. i [k+1]、Re_Mask i [k+1] represents the i-th sub-item and the k-th bit of its sub-item mask respectively.

[0064] S5. Calculate the storage address range of the corresponding sub-entry in the corresponding TCAM partition according to the final sub-entry mask, and write the sub-entry into the storage address range of the corresponding TCAM partition.

[0065] The TCAM of the present invention uses BRAM memory resources. When performing an update operation, address calculation is required. The storage address is defined as a continuous BRAM address segment. The storage address range of the corresponding sub-table entry in the corresponding TCAM partition is calculated as:

[0066] Addr_begin i =Sub_Entry i &~Sub_Mask i

[0067] Addr_End i =Sub_Entry i |Sub_Mask i

[0068] Among them, Addr_begin i The starting address of the sub-table entry of the i-th TCAM partition, Addr_End i is the end address of the sub-table entry of the i-th TCAM partition, & represents logical AND, ~ represents negation, and | represents logical OR.

[0069] Write the final sub-table entry into the TCAM partition by incrementing the write address pointer;

[0070] Wr_en=1

[0071] Wr_addr=Wr_addr+1

[0072] Among them, Wr_en represents write enable, Wr_addr represents write address, & represents logical AND, ~ represents negation, | represents logical OR, and the wildcard bit is represented by 1. Therefore, the exact match bit needs to be negated to calculate the starting address, and the exact match bit needs to be ORed to calculate the ending address.

[0073] like Figure 2 As shown, the present invention provides a TCAM architecture that adopts the above-mentioned TCAM fast update method for satellite routing. First, the overall architecture adopts an SDN structure, and the CPU part performs table entry distribution and emergency processing. Specifically, it includes: a filter and pre-distribution module (Filter & Shunt), a TCAM search module, a reorder and update information distribution module (Reorder & Updata), a CPU, and a re-encoding module (Encoder);

[0074] like Figure 4 As shown, the reordering and update information diversion module receives the update data sent by the CPU, and uses the TCAM fast update method to reorder the update data and write the processed update data (Sub_1, Sub_2, ..., Sub_m) into the TCAM lookup module; the update data includes: update table entry (Entry) and mask (Mask).

[0075] The filter and pre-diversion module adopts a Bloom filter structure, which can reduce the text segments sent to the second stage. Specifically, the Bloom filter first receives the input data (Data_in) and searches the input data to determine that a match will definitely not occur at certain byte positions, but a match may occur at other positions, that is, the data that misses the local storage information and the data that hits the local storage information are obtained. The data that misses the local storage information is uploaded to the CPU for parsing, and the data that hits the local storage information (Sub_1, Sub_2, ..., Sub_n) is sent to the TCAM search module. Although it will not produce accurate results, it will significantly reduce the data traffic to the next stage. For each table entry to be stored in the filter, k hash functions are constructed, with k representing the number of hash functions. The formula for calculating the k value is: Here, n represents the size of the bit array, and m represents the number of entries to be inserted.

[0076] The probability of each entry being found is:

[0077] The probability of hashing all k hash functions and Bloom filters is:

[0078] The TCAM search module performs an accurate match on the data that hits the locally stored information to obtain the search result;

[0079] like Figure 3 As shown, all internal storage in the TCAM is simulated using BRAM resources within the FPGA to mitigate the effects of cosmic rays and radiation in satellite environments. Within the FPGA, the BRAM is constrained to be a true dual-port RAM (BRAM True-Dual-Port), meaning that physically, the two subblocks are a single 46KB BRAM. Since the FPGA does not have the concept of an 'x' state, all indeterminate states are converted to 0s and 1s for storage, respectively. The final storage entry, Entry_tcam, is:

[0080] Entry_tcam=entry&~mask

[0081] The partitioning concept used in the TCAM internal storage architecture can save BRAM resources. The TCAM is split horizontally and vertically to obtain different partitions. Different bits in the same table entry are stored in different areas, and the address is mapped into a one-hot code. Taking an m*n TCAM as an example, it is divided into 4 TCAM partitioning;

[0082] The TCAM partition mapping rules are:

[0083]

[0084] Among them, K i is the mapping result of the i-th TCAM partition, L n The nth byte of the entry with length L.

[0085] In one embodiment, when new data enters the TCAM lookup module for table entry matching, it is first determined whether the module is in the update process. The BRAM-based TCAM sub-block cannot perform search and update at the same time. When the module is not in the update state, it can be queried. This decouples the table lookup and update, so that the sub-modules do not affect each other, and at a macro level, enables the TCAM to perform search and update in parallel.

[0086] Because the longest match is required, the TCAM search module generates multiple search results. The recoding module recodes these results, comparing them and outputting the best match and an address result (Match_addr) for searching the BRAM. Based on the address result, a search is performed in a BRAM to obtain the final specific instruction (Out_con), such as upload or discard.

[0087] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation plans of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made to the present invention within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A TCAM fast update method for onboard routing, characterized in that: include: S1. Split TCAM to get N sub TCAM partitions; wherein TCAM is a ternary content addressable memory; S2. Accept update data, which includes: update table entries and their masks; S3, according to N sub Calculate the sub-item width W based on N sub Reorder the update table entries and their masks by summing the width W to obtain reordered update table entries and their masks; S4. Divide the reordered update entry and its mask according to width W to obtain multiple sub-entries and their sub-entry masks, and add one to the sub-entry and its sub-entry mask to obtain a final sub-entry and its sub-entry mask; each sub-entry corresponds to a TCAM partition. S5. Calculate the storage address range of the corresponding sub-entry in the corresponding TCAM partition according to the final sub-entry mask, and write the sub-entry into the storage address range of the corresponding TCAM partition.

2. The TCAM fast update method for onboard routing according to claim 1, wherein: Calculating the sub-entry width W includes: obtaining the total length L of the update entry, dividing the total length of the update entry by the number of TCAM partitions N sub , get the width W of the sub-item.

3. The TCAM fast update method for onboard routing according to claim 1, wherein: Reordering the update table entries and their masks includes: S31, initialize the sub-item width index w=0 and the sub-item number index i=0; S32, determine whether w=W. If so, obtain the reordered update entry and its mask; otherwise, execute step S33; S33, determine i=N sub Is it true? If so, set i=0, w=w+1 and return to step S32; otherwise, execute step S34; S34 . Update the update entry and its mask according to the index w of the sub-entry width and the index i of the number of sub-entries, set i=i+1, and return to step S33 .

4. The TCAM fast update method for onboard routing according to claim 3, wherein: Updating the update entry and its mask includes: Re_Entry[i×W+w]=Entry[w×N sub +i] Re_Mask+[i×W+w]=Mask[w×N sub +i] Among them, Mask[w×N sub +i]、Entry[w×N sub +i] indicates the w×Nth update entry and its mask sub +i bit, Re_Entry[i×W+w] and Re_Mask[i×W+w] represent the i×W+w-th bit of the reordered update entry and its mask, respectively.

5. The TCAM fast update method for onboard routing according to claim 1, wherein: The operation of adding one to a sub-item and its sub-item mask includes: Sub_Entry i [k]=Re_Entry i [k+1] Sub_Mask i [k]=Re_Mask i [k+1] Among them, Sub_Entry i [k], Sub_Mask i [k] represents the final i-th sub-entry and the k-th bit of its sub-entry mask, respectively. i [k+1]、Re_Mask i [k+1] represents the i-th sub-item and the k-th bit of its sub-item mask respectively.

6. The TCAM fast update method for onboard routing according to claim 1, characterized in that: The storage address range of the calculation sub-table entry in the corresponding TCAM partition is: Addr_begin i =Sub_Entry i &~Sub_Mask i Addr_End i =Sub_Entry i |Sub_Mask i Among them, Addr_begin i The starting address of the sub-table entry of the i-th TCAM partition, Addr_End i Sub_Entry is the end address of the sub-entry of the i-th TCAM partition. i 、Sub_Mask i They represent the final i-th sub-table item and its sub-table item mask respectively, & represents logical AND, ~ represents negation, and | represents logical OR.

7. A TCAM system architecture based on the TCAM fast update method for satellite-based routing according to any one of claims 1 to 6, characterized in that: Includes: TCAM search module, reordering and update information diversion module and CPU; The CPU is used to send update data; The reordering and update information shunting module receives the update data sent by the CPU and writes the update data into the TCAM search module using the TCAM fast update method according to any one of claims 1 to 6; the update data includes: update table entries and masks.

8. The TCAM system architecture for onboard routing according to claim 7, characterized in that: The TCAM system architecture also includes a filter and pre-diversion module. The filter and pre-diversion module receives input data and diverts the input data into two groups of data. One group of data is uploaded to the CPU for parsing, and the other group of data is sent to the TCAM search module. The TCAM search module accurately matches the data sent by the filter and pre-diversion module to obtain the search results.

9. The TCAM system architecture for onboard routing according to claim 7, wherein: The TCAM system architecture also includes a re-encoding module, which re-encodes the search result output by the TCAM search module and outputs the best matching result.

10. The TCAM system architecture for onboard routing according to claim 7, wherein: The TCAM lookup module includes multiple TCAM partitions. The mapping rule for each TCAM partition is: Among them, K i is the mapping result of the i-th TCAM partition, L n The nth byte of the entry with length L.

Citation Information

Patent Citations

  • Data packet content name coding compression method in NDN / CCN

    CN103457700A

  • TCAM fast query system based on FPGA

    CN117453733A