Error Detection Method in Ternary Content Addressable Memory

By using data and mask entries at the same address location in TCAM and RAM and performing real-time checksum recovery operations, the problem of error detection and repair in TCAM is solved, and efficient and reliable error detection and repair is achieved, avoiding Requirements for hardware modification.

CN112447254BActive Publication Date: 2025-02-14TTTECH COMPUTERTECHNIK AG
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202010885331.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-08-30
Filing Date
2020-08-28
Publication Date
2025-02-14
Estimated Expiration
2040-08-28

AI Technical Summary

Technical Problem

The prior art is difficult to effectively detect and repair data integrity errors, addressing errors and search errors in ternary content addressable memory (TCAM), especially without hardware modifications.

Method used

Ensure data by placing corresponding data and mask entries in the same address location in TCAM and additional random access memory (RAM), and verifying in the read operation, detecting errors and performing data recovery and refresh operations. Completeness and search accuracy.

Benefits of technology

It realizes real-time and reliable detection and repair of errors in TCAM, improves data integrity and search accuracy, and does not require hardware modification of TCAM circuits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112447254B_ABST
    Figure CN112447254B_ABST
Patent Text Reader

Abstract

Error detection method in a ternary content addressable memory. The invention relates to a method for performing error detection in a ternary content addressable memory TCAM, preferably in real time, wherein the error detection is initiated by a read operation at a specified input address (200), an additional random access memory RAM is provided, the RAM has the same number of locations as the TCAM, and corresponding read data entries (210) each consisting of free data and a mask are placed at the same address location. The invention relates to a method for performing error detection in a ternary content addressable memory TCAM, preferably in real time, wherein the error detection is triggered by the discovery of a searched input keyword (400) and starts with a read operation at a specified memory address (410), wherein an additional random access memory RAM is provided, the RAM has the same number of locations as the TCAM, and corresponding read data entries (420) each consisting of free data and a mask are placed at the same address location.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for performing error detection in a ternary content addressable memory TCAM, preferably in real time, wherein the error detection is initiated using a read operation at a specified input address.

[0002] Furthermore, the invention relates to a method for error detection in a ternary content addressable memory TCAM, preferably in real time.

[0003] The present invention relates generally to computing and device networking. More particularly, the present invention relates to a real-time error detection mechanism in a ternary content addressable memory (TCAM). Background Art

[0004] Ternary content addressable memory (TCAM) is a specialized content addressable memory (CAM) designed for fast table lookups that search on the longest match, such as IP routing tables organized by IP prefixes. TCAM, as a type of CAM memory, has bits stored in data entries and can have three different bit values ​​for the purpose of matching with input words ("1", "0" and "don't care"). Each TCAM entry has three entities: value, mask and result. The value is the pattern to be matched (for example, IP / MAC address). The mask consists of mask bits (0, 1 and "don't care") associated with the value pattern and represents a prefix. In the case where the search finds the pattern and mask, the result is a positive result. During the search operation, the TCAM compares the input data with all valid data entries stored in the TCAM, gives a list of multiple matches, and determines the first address that provides a match for the compared data. More precisely, in one clock cycle, the input data is compared with each valid data stored in the TCAM. When all bits match the stored data, a positive match result for the TCAM entry is obtained. No matter which value the input data bit has, the "don't care" data bit stored in the TCAM will provide a match when compared to the input data bit.

[0005] Considering data integrity errors in TCAM, such errors are usually introduced by cosmic ray emission and ionizing radiation. These types of errors are characterized as so-called soft errors. In addition to these soft errors, there is another type of error called search error. Due to the fact that the input to the TCAM search is the search keyword and the output is the first address that provides a match for the compared keyword, search errors may be introduced. Search errors may cause: false matches (false hits), when the search keyword hits the wrong entry, that is, a lower priority entry or an entry that should not provide a match for the search keyword; or an entry rejects the search keyword (false miss), although it should match.

[0006] Soft errors in TCAM are more destructive than soft errors in RAM. While soft errors in RAM cause only a single lookup failure, soft errors in TCAM may cause many different lookups to fail due to first match semantics. This occurs because the lookup result for a search key is the index of the first entry that the key matches. Soft errors cause the highest failure rates of many known reliability mechanisms used in TCAM.

[0007] Data stored in TCAM cannot be easily protected. TCAM data error protection has been considered a complex process because it requires reading and matching TCAM entries before detecting errors. These operations consume integrated circuit bandwidth and power. Protecting TCAM data is desirable because TCAM can be used to store network routing and other information. TCAM-based devices can perform high-speed packet classification used in many networking applications. To support packet classification, TCAM performs millions of keyword search operations per second and consumes a lot of power. In addition, TCAM has poor flexibility in word length changes.

[0008] There are many publications that consider the context of error detection in TCAM. US 8,473,832 B2 describes a method for performing a mutually exclusive sharing function on multiple entered words in a TCAM in order to detect data corruption using word comparison and parity error checking. Patent application US2016 / 0283317 A1 also discloses a method for error detection in a TCAM, the method comparing a calculated TCAM word checksum with a stored value of a checksum of a matching query retrieved from a RAM. The method for error detection during a TCAM search proposed in US 9,170,880 B1 includes generating and storing an error correction code (ECC) and data in the TCAM, generating an ECC for a search keyword, and detecting any errors in the stored data by using the search keyword with the accompanying ECC.

[0009] Traditional methods such as error correction codes are difficult to apply to TCAM. That is, most TCAM error detection and correction schemes require hardware modifications to the TCAM circuits. A software approach that does not require hardware changes to the TCAM circuits to detect and correct errors during the search process is the solution proposed in the paper "TCAMChecker: A Software Approach to the Error Detection and Correction of TCAM-Based Networking Systems" (Journal of Network and Systems Management, 21(3), September 2013, DOI: 10.1007 / s10922-012-9238-0). Summary of the invention

[0010] The object of the present invention is to provide a method for detecting errors, in particular data integrity errors and / or addressing errors and / or search errors that may occur in a TCAM.

[0011] The object is achieved by means of a method for error detection in a ternary content addressable memory TCAM, preferably in real time, wherein the error detection is initiated by means of a read operation at a specified input address, wherein according to the invention an additional random access memory RAM is provided, wherein said RAM has the same number of locations as the TCAM, wherein in both memories TCAM and RAM corresponding read data entries each consisting of data and a mask are placed at the same address location, and wherein data and mask read operations from the TCAM and the RAM are performed at the location pointed to by the input address, and in a first verification phase said data and mask read from the TCAM at the location pointed to by the input address are compared with data and mask read from the RAM at the location pointed to by the same input address, and if the result of the first verification phase is correct, a TCAM search phase is performed, otherwise a data recovery verification is performed, which is followed by a data refresh of the data stored in both the TCAM and the RAM. a second read of the data entry at said input address and a second verification phase is performed, wherein the second phase performs a comparison of the data read from both the TCAM and the RAM and the mask, and wherein the TCAM search phase uses the data read from the RAM as input search key and returns a TCAM match vector and / or a single TCAM address as output, and wherein the TCAM match check verifies whether the result of the TCAM search (i.e. the flag pointed to by the address from the TCAM match vector) is binary 1 in case of a TCAM match vector, or verifies the TCAM single address verified in the TCAM address check in case of a non-match (false), and if the TCAM address is a lower address than said input address, a TCAM read at said TCAM address is performed, and if in the TCAM search verification, the TCAM data read at the TCAM address is the same as the data read at the RAM, and wherein preferably, the method moves to the next input address provided by a scrubbing mechanism and the entire proposed error detection method can be repeated.

[0012] Preferably, a checksum stage of the TCAM and RAM low memory bandwidth requirement process using data entry checksum comparison may be provided.

[0013] Preferably, a checksum stage of the TCAM and RAM high memory bandwidth demand process using a data entry checksum comparison, including an error correction code or a hashing algorithm, may be provided.

[0014] If the check result is false, a data recovery check may be provided which raises a data integrity error flag.

[0015] If the check result is false, a second check phase may be provided which raises a data integrity error flag.

[0016] A TCAM match check may be performed, which completes error detection if the result of the check is a binary 1, otherwise it raises a search error flag.

[0017] A TCAM search verification may be performed that raises a search error flag if a comparison result of the data read at the TCAM address does not provide a match in the RAM.

[0018] Furthermore, the object is achieved by means of a method for performing error detection in a ternary content addressable memory TCAM, preferably in real time, wherein according to the invention, an additional random access memory RAM is provided, wherein the RAM has the same number of locations as the TCAM, wherein in the two memories TCAM and the RAM, corresponding read data entries each consisting of data and a mask are placed at the same address location, and wherein error detection is initiated by a received input address output from a TCAM_SEARCH command, wherein a memory read reads the data and mask at the input address stored in the TCAM and / or RAM, and wherein a check checks the integrity of the data and mask, and if no error is found, a keyword match check is performed, wherein an input search keyword is compared with the data and mask located at the address in the TCAM and / or RAM memory.

[0019] Preferably, the reading of the data values ​​and the mask is performed at the RAM, in particular in case of low available bandwidth of the TCAM, or the memory read is performed at the TCAM, in particular if the available bandwidth of the TCAM is high.

[0020] Data and mask integrity checks can be performed.

[0021] A key match check may be performed and if there is no match between the search key entered and the data read from the address and mask, a search error will be indicated.

[0022] According to the present invention, an additional RAM having the same number of entries as the TCAM is used, wherein the additional RAM implements a scrubbing mechanism, in particular a scrubbing mechanism performed during runtime. In addition, a runtime data integrity check mechanism and a runtime search integrity check mechanism are implemented, wherein the runtime data integrity check mechanism can signal the integrity of the data stored in the TCAM when reading the data.

[0023] The present invention describes a method that can be used to detect soft errors and search errors that may appear in a TCAM during runtime. The proposed method can detect errors more reliably than previously known techniques. The method according to the present invention is characterized by three main features: detection of both data integrity and search type errors; consideration of different search mechanism outputs; and applicability in TCAMs with different memory bandwidths. In addition, the present invention uses an additional RAM memory. The RAM memory needs to have the same number of locations as the main TCAM memory. In the two memories, TCAM and RAM, corresponding entries consisting of data and mask are placed at the same address location. Each read operation from the TCAM memory automatically triggers a read from the same address in the RAM and a data integrity check mechanism based on the additional data stored in the RAM.

[0024] In order to achieve the above mentioned objectives, the proposed TCAM error detection method provides several implementations depending on: the TCAM available bandwidth; the main TCAM command executed, i.e. read or search command; and the search output considered, i.e. search vector and / or single address. In the first two embodiments of the invention, the processes that can be activated during scrubbing by the TCAM main read command are represented, considering the different outputs of the internal search operation of the process separately, i.e. search vector or single address. The third embodiment represents an implementation of the invention activated by the TCAM main search command.

[0025] The first embodiment of the invention presented represents a real-time TCAM error detection method, which is initiated by a given input address and is characterized by a match vector that is the result of the internal TCAM search phase of the method. It uses an additional RAM and reads data entries at the same input address in both memories, and then compares them using different data integrity check processes depending on the TCAM available bandwidth. If necessary, data recovery is performed, which includes data integrity checks of data refreshed and read again from both memories. The method continues with a TCAM search phase, which uses the data previously read from the RAM or TCAM as input search keywords, and it returns a TCAM match vector as output. Then, if the value of the flag from the output TCAM match vector indexed by the given input address is found to be "1", the method is completed, otherwise it raises the search error flag.

[0026] In the second embodiment of the invention presented, a real-time TCAM error detection method is described, which is initiated by a given input address and is characterized by a single address as a result of the internal TCAM search phase of the method. It uses an additional RAM and performs the same phases as described with respect to the previous embodiment - which include reading data entries in two memories, comparing them using different data integrity checks, data recovery and repeated data integrity checks (if it is needed). The method continues with a TCAM search phase, which uses the data read from the RAM as an input search key and it returns a single address. Then, the given input address is compared with the output of the TCAM search phase, and in the case of a false match, it is checked whether the TCAM address is a higher address in the TCAM than the input address. If the result of this check is true, the method raises the search error flag. Otherwise, a TCAM read at this address is performed, and if the data read at the TCAM address provides a match for the previously searched key, the method moves to the next input address provided by the scrubbing mechanism, and the entire proposed error detection method can be repeated. If the result of the previous TCAM_Search check was false, or the result of the TCAM data check for data read from RAM was false, the method raises a search error flag.

[0027] A third embodiment of the invention describes a method for performing error detection in real time in a TCAM, the method being initiated by an input address output received from a TCAM master search command, the TCAM master search command reading the data and mask at the input address stored in the TCAM and / or RAM, depending on the memory bandwidth available to the TCAM, and checking the integrity of the data and mask. The integrity check uses a simple or more complex scheme, depending on the memory bandwidth available to the TCAM, and if no errors are found, the method performs a comparison of the input search key of the TCAM master search command with the entry read in the process.

[0028] The present invention also relates to a memory device for use in the above method, wherein the memory device comprises a preferably real-time ternary content addressable memory TCAM and an additional random access memory RAM, wherein the RAM has the same number of locations as the TCAM, wherein in the two memories TCAM and RAM, corresponding read data entries each consisting of data and a mask can be placed at the same address location.

[0029] Furthermore, the present invention relates to a device, such as a networking device, in particular a high-speed networking device such as a router or a switch, or a TCAM-based high-speed search engine comprising such a memory device. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In the following, in order to further illustrate the present invention, illustrative and non-limiting embodiments are discussed as shown in the accompanying drawings, which show:

[0031] Figure 1 Shows a schematic general principle of the search process and the additional RAM used in the integrity checking process.

[0032] Figure 2 A graphical illustration of a first embodiment of the invention is shown when the result of the internal search operation is a match vector.

[0033] Figure 3 A diagrammatic illustration showing a second embodiment of the present invention when the result of the internal search operation is an address.

[0034] Figure 4 A diagrammatic illustration showing the third embodiment of the present invention when a TCAM_SEARCH command is requested. DETAILED DESCRIPTION

[0035] The present invention describes a method that can be used to detect errors that may occur in TCAM memories during runtime. The method is characterized by three aspects: detection of both data integrity and search errors; consideration of different search mechanism outputs; and applicability to various available memory bandwidths. According to the first feature, there are two types of errors that the proposed method can detect: data integrity errors, which refer to integrity and addressing errors of the stored data; and search errors. In addition to these types of errors, the proposed method distinguishes two cases of search output: in the first case, multiple hits of the search key found in the TCAM memory array are delivered, while in the second case, the output of the search mechanism is a single address. In the first case, priority rules are used to encode the final output address. Finally, the third feature relates to the implementation of the proposed method, which supports an optimized solution for the available memory bandwidth. Under conditions of low available memory bandwidth, the method can implement a simple direct comparison of data and addresses supported by checksum / parity bit operations, while under conditions of high memory bandwidth, the proposed method can implement more complex schemes such as hashing or error correction code (ECC) algorithms.

[0036] In addition to these three aspects of the present invention, the method also requires the involvement of additional RAM memory. The RAM memory needs to have the same number of locations as the main TCAM memory. In both TCAM and RAM memory, corresponding entries consisting of data and mask are placed at the same address location.

[0037] The following TCAM and RAM commands employed in the proposed error detection method are explained:

[0038] The TCAM_DATA_READ(address) command will return the "data" stored in the TCAM memory at the location pointed to by "address". The output of this command is "tcam_data".

[0039] The TCAM_MASK_READ(address) command will return the "mask" stored in the TCAM memory at the location pointed to by "address". The output of this command is "tcam_mask".

[0040] The TCAM_DATA_READ and TCAM_MASK_READ commands can be considered atomic operations and can be recorded as TCAM_READ, and its output is recorded as "tcam_data&mask". It does not make sense to read only the value of "data" or only the value of "mask" from the TCAM, because having one without the other does not provide information about the TCAM bit value unless there is no case where a bit with value "X" is stored in the TCAM.

[0041] The TCAM_DATA_WRITE(address) command will store the "data" in the TCAM memory at the location pointed to by "address".

[0042] The TCAM_MASK_WRITE(address) command will store "mask" in the TCAM memory at the location pointed to by "address".

[0043] The TCAM_DATA_WRITE and TCAM_MASK_WRITE commands can be considered as atomic operations and are recorded as TCAM_WRITE because it does not make sense to write "data" in the TCAM memory without also writing the "mask". This is because the search mechanism cannot work correctly if the "data" and their corresponding "masks" are inconsistent.

[0044] Only 3 combinations are allowed for TCAM bits out of the 4 combinations that Data and Mask can take. TCAM bits can only take on 3 values, 0, 1, and X. If the TCAM bit value is X, then a comparison of the corresponding bit with the corresponding bit of Key will return a match, even if the Key bit is 0 or 1.

[0045] "Data" "Mask" TCAM bit value

[0046] 0 0 X (does not matter) 0 1 0 1 0 1

[0049] 1 1 Not allowed

[0050] The TCAM_SEARCH(keyword) command shall return a "tcam_address" pointing to the first location starting from 0 for which the bits of the "keyword" indicated by the "mask" stored at the corresponding location match the bits of the "data" stored at the corresponding location indicated by the "mask" stored at the corresponding location.

[0051] The TCAM_SEARCH (keyword) command may also return a vector "tcam_match" having a width equal to the number of locations of the TCAM. Each bit of the "tcam_match" vector may be considered as a flag indicating that the corresponding TCAM location provided a hit in response to the search operation.

[0052] For RAM, there are 2 commands that can be addressed:

[0053] The RAM_READ(address) command will return the "data" and "mask" stored in the additional RAM memory at the location pointed to by "address". The output of this operation is recorded as "ram_data&mask".

[0054] The RAM_WRITE(address) command will store the "data" and corresponding "mask" in the additional RAM memory at the location pointed to by "address".

[0055] Additionally, two complex commands for invalidating and refreshing entries are defined:

[0056] The INVALIDATE (address) command will delete / invalidate the information stored at the location pointed to by "address" in the TCAM and RAM memory in a manner that said location will not be considered during the search process.

[0057] The REFRESH(address) command will restore the information stored in the TCAM and RAM memory at the location pointed to by "address" so that this location will be considered during the search process.

[0058] The TCAM_SEARCH (keyword) command mentioned above is characterized by the general TCAM search mechanism rules. The main characteristics of the TCAM search process are explained in more detail in the following text.

[0059] Figure 1 An overall scheme of the RAM and TCAM memory arrays is shown, along with the main components involved in the TCAM search process. Each location in the TCAM memory 110 has a corresponding location in the RAM memory 115 that can be accessed using the same address 105.

[0060] The term "memory array" can generally refer to TCAM or RAM. Each memory (TCAM, RAM) can be seen as an array of addressable locations. Each location can store data with a fixed width. TCAM_SEARCH refers to a search operation in the TCAM. The term "memory array search" refers to a search operation in any memory.

[0061] Figure 1 A TCAM search 270 mechanism is shown. The input data to the TCAM search mechanism is given by a search key 100. The TCAM search 270 mechanism is initiated by applying the search key 100 against a table of stored data in the TCAM memory 110. The purpose of the data search is to determine if any data in the memory 110 array exactly matches the search key 100, and to return the address 150 of the data that matches the search key 100.

[0062] The storage data table in the TCAM memory 110 contains data TCAM data 1, TCAM data 2, ..., TCAM data m stored at different addresses. In the TCAM memory array, the entry (data) with the lowest address has the highest priority.

[0063] The TCAM memory 110 represents a word array consisting of stored data entries. Each stored data has an associated match line 130, which indicates whether the search key 100 is the same as the stored data TCAM data 1, TCAM data 2, ..., TCAM data m (match case) or different (mismatch case). The match line 130 is coupled to the corresponding bit in the match register 120. If there is a match, a binary 1 will be placed in the match register 120, or a binary 0 in the case of a mismatch. The match line 130 is fed to the encoder 140, which generates a match position corresponding to the match line 130 in the matching state.

[0064] The encoder 140 is used in a TCAM memory 110 implementation in which a single match is expected in the match register 120. More specifically, the TCAM search 270 mechanism performed for the search key 100 will return a TCAM address 150 that is the first position, starting from address zero in the TCAM memory array, for which the bits of the search key 100 match the data bits stored at the same corresponding address location and indicated by the mask stored at the corresponding location in the TCAM 110.

[0065] In a TCAM memory array implementation where the TCAM search 270 mechanism generates multiple matches (i.e., a search-match vector), a priority encoder 140 may be used. The purpose of such a priority encoder 140 is to parse multiple matches and encode the best match from the search-match vector 135. In this case, a binary 1 will be placed in the match register 120 for each data match in the TCAM 110. Once the TCAM memory array is searched, the priority encoder 140 determines the highest priority match from the match vector 135 and encodes its address 150 location into a binary format. As previously described, the TCAM search mechanism returns a vector TCAM match having a width equal to the length of the TCAM 110. Each bit of the TCAM match vector may be considered a flag indicating that the corresponding TCAM location provided a hit in response to the search operation.

[0066] In the presence of a priority encoder 140, if there is no match, the TCAM search 270 mechanism will indicate that no input key was found.

[0067] Based on the above detailed description of how the search in the TCAM memory works, three embodiments of the proposed TCAM error detection method are described in the following, describing the main stages of the presented invention.

[0068] Figure 2 A first embodiment of a method according to the invention is described. In particular, Figure 2 A state diagram of the proposed TCAM error detection method is shown, which considers the case where the result of the TCAM_SEARCH stage 270 is a match vector output. The method uses an additional RAM memory array, which has the same number of locations as the TCAM memory array. In both memories, TCAM and RAM, corresponding entries consisting of data and its corresponding mask are placed at the same address location.

[0069] The detection method starts with the TCAM_READ and RAM_READ 210 commands, according to which read operations are performed at the specified input addresses 200 of the TCAM and the additional RAM memory. These read operations involve three operations, preferably performed in an atomic manner, namely the operations TCAM_MASK_READ, TCAM_DATA_READ and RAM_READ. After reading the data and the mask from both memories, a verification 220 phase follows. In this verification phase 220, the data and the mask read from the TCAM at the location pointed to by the input address 200 are compared with the data and the mask read from the RAM at the location pointed to by the same input address 200.

[0070] This simple verification phase 220 may include a parity bit or a checksum check, which is preferably performed in the case when only low-bandwidth TCAM and RAM are available. However, if the available TCAM bandwidth is high, in order to save RAM resources, it is appropriate to implement additional, more complex data verification methods (such as error correction code (ECC) algorithms or hash algorithms) in the verification phase 220, which are capable of detecting and discovering errors during runtime (e.g., during runtime of an IP core using the TCAM). If the result of the verification operation 220 is positive ("yes"), the method continues with TCAM_SEARCH 270, otherwise ("no"), a recovery check 230 is performed.

[0071] In the event that the restore check 230 produces a false comparison result, the data integrity error flag 265 is raised. Otherwise, a data REFRESH operation 240 is performed where the recovery is completed. For example, data stored in a TCAM is restored in the event that it is affected by a SEU (single event upset), which causes one or more bits of data to change their value. The refresh operation 240 is implemented in two memories.

[0072] Depending on the implementation, a comparison between the data and mask stored in the TCAM and the data and mask stored in the RAM may be performed. Alternatively, for example, when the data and mask are written to the TCAM, a comparison between the ECC / parity / CRC applied to the data and mask read from the TCAM and the ECC / parity / CRC values ​​stored in the RAM may be performed.

[0073] Then, the method again performs TCAM_READ and RAM_READ operations 250 of the TCAM and RAM at the specified address 200. In a verify operation 260, the data read from the TCAM and RAM at the location pointed to by the input address 200 is compared with the mask. If the result of the verify operation 260 is negative ("No"), the data integrity error flag 265 is raised, otherwise, the method continues with TCAM_SEARCH 270. The two types of integrity errors in stage 265 refer to integrity and addressing errors of the stored data. The verification is completed in the same manner as in stage 220.

[0074] If the result in stage 260 is correct ("yes"), the method with data from RAM or TCAM memory goes to stage 270 where TCAM_SEARCH is performed. Figure 1In the TCAM_SEARCH 270 described in the foregoing, a TCAM memory array search is performed based on a key consisting of data read from a RAM or TCAM memory and a key obtained after a verify operation 220 or 260. This embodiment considers the case where a TCAM match vector 275 is received as a result of the TCAM_SEARCH 270. TCAM_match 280 checks whether the result of the TCAM_SEARCH 270 (i.e., the flag pointed to by the address 200 from the TCAM_match vector 275) is binary 1, and if it is binary 1, the method moves to the next input address 286 provided by the scrubbing mechanism and the entire proposed error detection method can be repeated, otherwise, the search error flag 285 is raised.

[0075] Figure 3 A state diagram showing a second embodiment of the present invention discloses the case where the output of the TCAM_SEARCH 270 stage is a single TCAM address 300 .

[0076] As in accordance with Figure 2 As described in the previous embodiments of , corresponding entries are placed at the same address locations in the TCAM and RAM memories. The detection method reads the data and mask at the input address 200 from the two memories, which is followed by a check 220 phase to compare the data and mask read from the TCAM memory and the RAM memory. The read in the TCAM and RAM 210 involves three atomic operations, namely the operations TCAM_MASK_READ, TCAM_DATA_READ and RAM_READ. When the TCAM and RAM low memory bandwidth is available, this simple check 220 phase including parity bits or checksum checks is applied. However, if the available TCAM and RAM bandwidth is high, then in order to save RAM resources, a more complex data check method (such as ECC or hash algorithm) can be implemented in the check phase 220, which is able to detect and find errors during runtime.

[0077] When the result of the check 220 is positive, the method continues with TCAM_SEARCH 270, otherwise the restore check 230 is performed. If the result of the restore check 230 is false, the data integrity error flag 265 is raised. Otherwise, data recovery is performed in the data refresh operation 240. After the recovery process, the method repeats the read 250 of the TCAM and RAM operation at the specified address 200. In the check 260 operation, the data read from the TCAM and RAM memory at the location pointed to by the input address 200 is compared with the mask again, and if the result is negative, the data integrity error flag 265 is raised, otherwise, the method continues with TCAM_SEARCH 270, where the data retrieved from the RAM or TCAM memory is read as the input search key.

[0078] If the result of TCAM_SEARCH 270 - TCAM address 300 - is the same as the given input address 200, then a check 310 directs the method to continue processing the next input address 286 provided by the scrubbing mechanism. If the output of TCAM_SEARCH 270 - TCAM address 300 - represents a higher address in the memory array relative to the given input address 200, then the method indicates a search error 285. Otherwise, a TCAM read operation 330 will be performed on the TCAM address 300. TCAM_SEARCH result verification 340 is checking the condition whether the data and mask found at the TCAM address 300 can provide a match for the RAM or TCAM data 266 used as input to TCAM_SEARCH 270. If the result of this check is "no", then a search error 285 is indicated. Otherwise, the method moves to the next input address 286 provided by the scrubbing mechanism, and the entire proposed error detection method can be repeated.

[0079] Figure 4 , which depicts the details of a simpler implementation of the method according to the invention, which is initiated by a TCAM_SEARCH command 400 with a request having an input keyword 405. The input keyword 405 represents the data to be searched, such as a MAC address, a mode, etc. Figure 4As illustrated in , the error detection process is initiated by a memory address 410 received as an output of the executed TCAM_SEARCH operation 400, and more specifically, it represents the first location in the TCAM memory array that provides a request match between the input keyword 405 and the corresponding TCAM entry. Next, if the input keyword is found in the TCAM, a memory read 420 reads the data and mask located at the memory address 410 from the TCAM and / or from the RAM memory depending on the available TCAM bandwidth. In case of low available bandwidth, the memory read operation 420 is performed at the RAM, otherwise, if the available bandwidth is high, the memory read 420 is performed at the TCAM and RAM. The given process continues with an integrity check 430 of the data and mask. If the available memory bandwidth is high, a more complex data check method, i.e., an error correction code (ECC) algorithm or a hashing algorithm, can be implemented, which is capable of detecting and discovering errors in runtime. If an error in data integrity is found, it will be indicated by a data integrity error 450, otherwise a key match check 440 is performed where the input search key 405 is compared to the data and mask located in the TCAM and / or RAM memory at address 410. If there is no match between the input search key 405 and the data and mask, a search error 460 will be indicated.

[0080] The present invention has been presented in detailed embodiment descriptions and diagrams, which illustrate implementations of specified processes and relationships. The described process can be implemented in high-speed networking devices such as routers for enabling faster address lookups for fast routing and packet classification, or in switches in which it can be used to establish and find MAC address tables. In addition, the presented invention can be used in other TCAM-based high-speed search engines in data compression, pattern matching, and artificial intelligence applications. The representative processes described herein can be implemented on integrated circuits including ASICs, FPGAs, etc. However, the present invention allows for modifications and alternative implementations of the given number of embodiments discussed above. For example, further recombinations or reordering of the operations described in the embodiments do not depart from the scope of the present invention.

Claims

1. A method for performing error detection in a ternary content addressable memory (TCAM), preferably in real time, wherein the error detection is initiated using a read operation at a specified input address (200), characterized in that An additional random access memory RAM is provided, wherein the RAM has the same number of locations as the TCAM, wherein in both memories TCAM and RAM, corresponding read data entries (210) each consisting of data and a mask are placed at the same address location, and wherein performing data and mask read operations from the TCAM and the RAM at a location pointed to by an input address (200), and in a first verification phase (220), comparing the data and mask read from the TCAM at the location pointed to by the input address (200) with the data and mask read from the RAM at the location pointed to by the same input address (200), and If the result of the first verification stage (220) is correct, the TCAM_SEARCH stage (270) is executed. otherwise, performing a data recovery check (230), followed by a data refresh (240), a second read of the data entry (250) stored at said input address (200) in both the TCAM and the RAM, and performing a second check phase (260) in which a comparison of the data read from both the TCAM and the RAM with the mask is performed, and and wherein the TCAM_SEARCH stage (270) uses the data read from the RAM as input to search for a key and returns as output a TCAM match vector and / or a single TCAM address, And wherein the TCAM match check (280) stage checks In the case of a TCAM match vector, is the result of TCAM_SEARCH (270) - i.e., the flag pointed to by address (200) from TCAM match vector (275) - a binary 1, or In case of a non-match, the TCAM single address (300) checked in the TCAM address check (310) And if the TCAM address (300) is a lower address than the input address (200), a TCAM read at the TCAM address (300) is performed, and if in the TCAM search verification (340), the TCAM data read at the TCAM address (300) is the same as the data read at the RAM, and wherein the method moves to the next input address (286) provided by the scrubbing mechanism, and the entire proposed error detection method can be repeated.

2. The method according to claim 1, characterized in that A checksum phase (220, 260) of a TCAM and RAM low memory bandwidth requirement process using data entry checksum comparisons.

3. The method according to claim 1, characterized in that The checksum phase (220, 260) of a TCAM and RAM high memory bandwidth requirement process uses a data entry checksum comparison, which may include an error correction code or a hash algorithm.

4. The method according to any one of claims 1 to 3, wherein: If the result of the check is false, the data recovery check (230) raises the data integrity error flag (265).

5. The method according to any one of claims 1 to 3, wherein: A second check (260) stage is provided which raises a data integrity error flag (265) if the result of the check is false.

6. The method according to any one of claims 1 to 3, wherein: A TCAM match check (280) is performed, if the result of the check is a binary 1, then the TCAM match check (280) completes error detection, otherwise, it raises a search error flag (285).

7. The method according to any one of claims 1 to 3, wherein: A TCAM search verification (340) is performed which raises a search error flag (285) if the comparison result of the data read at the TCAM address (300) does not provide a match in the RAM.

8. A method for performing error detection in a ternary content addressable memory (TCAM), preferably in real time, characterized in that An additional random access memory RAM is provided, wherein the RAM has the same number of locations as the TCAM, wherein in both memories TCAM and RAM corresponding read data entries each consisting of data and a mask are placed at the same address location, and wherein Error detection is initiated by a received input address (410) output from a TCAM_SEARCH command (400), wherein a memory read (420) reads the data and mask at the input address (410) stored in the TCAM and / or RAM, and wherein a check (430) checks the integrity of the data and mask, and if no error is found, a keyword match check (440) is performed, wherein an input search keyword (405) is compared with the data and mask located at the address (410) in the TCAM and / or RAM memory.

9. The method according to claim 8, wherein: The reading of the data value and the mask (420) is performed at the RAM, particularly in case of low available bandwidth of the TCAM, or the memory read (420) is performed at the TCAM, particularly if the available bandwidth of the TCAM is high.

10. The method according to claim 8 or 9, wherein an integrity check (430) of the data and the mask is performed.

11. A method according to claim 8 or 9, wherein a key match check (440) is performed and if there is no match between the input search key (405) and the data read from the address (410) and the mask, a search error (460) is indicated.

12. A memory device for use in a method according to any one of claims 1 to 11, wherein the memory device comprises a ternary content addressable memory TCAM and an additional random access memory RAM, wherein the RAM has the same number of locations as the TCAM, wherein in both memories TCAM and RAM corresponding read data entries (210) each consisting of data and a mask can be placed at the same address location.

13. A networked device for performing a method according to any one of claims 1 to 11, comprising a memory device according to claim 12.

14. A computer network comprising one or more devices according to claim 12 or 13.

Citation Information

Patent Citations

  • Concurrent error detection in a ternary content-addressable memory (TCAM) device

    US20160283317A1

  • Parity error checking and compare using shared logic circuitry in a ternary content addressable memory

    US8473832B2

  • Method and system for data integrity in TCAMS

    US9170880B1

  • Method and system for storing elements of tri-state content addressable memory without ordering

    CN101350771A

  • CAM / TCAM provided with shadow non-volatile memory

    CN101887748A