Accuracy-driven fault detection in result logic and status codes for fast, accurate substring matching

The processor unit with an M×M comparator matrix and fault detection logic addresses the challenge of accurate substring matching and fault detection in SIMD engines, ensuring efficient and reliable substring search operations.

JP7578363B2Active Publication Date: 2024-11-06INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2022514178
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-09-11
Filing Date
2020-08-07
Publication Date
2024-11-06
Estimated Expiration
2040-08-07

AI Technical Summary

Technical Problem

Existing substring search methods in digital computer systems face challenges in accurately detecting faults and distinguishing between full and partial matches, particularly in the context of Single Instruction Multiple Data (SIMD) substring search engines, which are resource-intensive or expensive, and existing fault detection techniques are inadequate for substring search operations.

Method used

A processor unit with an M×M matrix of comparators is used to generate a result bit vector indicating full and partial matches, combined with fault detection logic to accurately identify substring matches and detect errors, utilizing vector registers and correction masks to distinguish between match types.

Benefits of technology

The solution enables fast and accurate substring matching with fault detection, eliminating the need for re-evaluation and reducing resource overhead, while effectively identifying and correcting errors in substring search operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007578363000002
    Figure 0007578363000002
  • Figure 0007578363000003
    Figure 0007578363000003
  • Figure 0007578363000004
    Figure 0007578363000004
Patent Text Reader

Abstract

To provide a method for fault detection in substring search operations. The present invention provides a processor unit that provides an M x M matrix of comparators for character-wise comparison of elements of a reference string stored in a first one of vector registers, each of M vector elements, with a target string stored in a second one of the vector registers. The vector elements are n bits for character encoding. A result bit vector is generated using the comparisons performed by the M x M matrix. The result bit vector indicates characters in the target string that fully match the reference string and indicates characters in the target string that partially match the reference string. Fault detection in the substring search operation is performed by using the result bit vector.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the field of digital computer systems, and more particularly to accuracy-driven fault detection and status codes in result logic for fast, accurate substring matches using a processor unit for substring search. [Background technology]

[0002] Digital text representations are encoded and stored as binary-encoded character strings. Widely accepted character encoding standards for computers include American Standard Code for Information Interchange (ASCII) and Unicode Transformation Format (UTF). The most common text processing task on a computer is the substring search or substring match to identify character occurrences of a reference string within a larger set of characters of a target string. Summary of the Invention

[0003] An embodiment of the present invention is directed to a method for detecting faults in a substring search operation. A non-limiting example of the method provides for the use of a processor unit including vector registers of M vector elements each, an M×M matrix of comparators for character-wise comparison of elements of a reference string stored in a first one of the vector registers and a target string stored in a second one of the vector registers. The vector elements are n-bit elements for character encoding. A result bit vector is generated using the comparisons performed by the M×M matrix. The result bit vector indicates characters of the target string that match the reference string completely and indicates characters of the target string that match the reference string partially. Fault detection in the substring search operation is performed by using the result bit vector.

[0004] An embodiment of the present invention is directed to a processor unit for detecting faults in a substring search operation. The processor unit includes a plurality of vector registers, each of M vector elements. The vector elements are n-bit elements for encoding a character. A non-limiting example of the processor includes an M×M matrix of comparators for character-wise comparison of elements of a first register of the plurality of vector registers storing a reference string and a second register of the plurality of vector registers storing a target string. The M×M matrix is ​​configured to generate a bit vector indicating at least one character of the target string that matches the reference string completely and a character of the target string that partially matches the reference string. The processor also includes result generation logic for using the result bit vector to generate an index of a substring of the target string that matches a portion of the reference string. The index is a start of the substring and a substring length. The processor further includes fault detection logic for performing fault detection in the substring search operation by using the result bit vector.

[0005] An embodiment of the present invention is directed to a computer program product for detecting faults in a substring search operation. The computer program product includes a computer readable storage medium having program instructions embodied therein. The program instructions are executable by a processor to cause the processor to perform a method. A non-limiting example of the method of the present invention provides the use of a processor unit including vector registers each including M vector elements, and an M×M matrix of comparators for character-wise comparison of elements of a first register of the plurality of vector registers storing a reference string and a second register of the plurality of vector registers storing a target string. The vector elements are n-bit elements for encoding characters. A result bit vector is generated using the comparison performed by the M×M matrix. The result bit vector indicates at least one character of the target string that is a perfect match with the reference string and indicates characters of the target string that are partially matched with the reference string. Fault detection in the substring search operation is performed by using the result bit vector.

[0006] Additional technical features and advantages are realized through the techniques of the present invention. Embodiments and features of the present invention are described in detail herein and are considered part of the subject matter of the claims. For a better understanding, refer to the detailed description and drawings.

[0007] The features of the exclusive rights set forth herein are particularly pointed out and distinctly claimed in the accompanying claims. These and other features and advantages of embodiments of the invention will become apparent from the following detailed description taken in conjunction with the accompanying drawings. [Brief description of the drawings]

[0008] [Figure 1] FIG. 1 is an exemplary structure of a processor according to an embodiment of the present invention. [Diagram 2]FIG. 2 is a diagram of an exemplary configuration of a processing unit, in accordance with an embodiment of the present invention. [Diagram 3] FIG. 3 is a diagram of exemplary logic for fault detection by comparing a result bit vector to a first row of a comparison matrix in accordance with an embodiment of the present invention. [Figure 4] FIG. 4 is a diagram of exemplary logic for fault detection by comparison of a result bit vector to a zero-detect vector associated with a target string, in accordance with an embodiment of the present invention. [Diagram 5] FIG. 5 is a diagram of exemplary logic for fault detection by comparison of a reported match type with a result bit vector and a matchable region in accordance with an embodiment of the present invention. [Figure 6] FIG. 6 is a diagram of exemplary logic for fault detection by comparison of result bit vectors to element sizes in accordance with an embodiment of the present invention. [Figure 7A] FIG. 7A is a diagram of exemplary logic for fault detection by certainty checking of multiple reported status codes in accordance with an embodiment of the present invention. [Figure 7B] FIG. 7B is a diagram of exemplary logic for fault detection by certainty checking of multiple reported status codes, in accordance with an embodiment of the present invention. [Figure 7C] FIG. 7C is a diagram of exemplary logic for fault detection by certainty checking of multiple reported status codes in accordance with an embodiment of the present invention. [Figure 7D] FIG. 7D is a diagram of exemplary logic for fault detection by certainty checking of multiple reported status codes in accordance with an embodiment of the present invention. [Figure 8] FIG. 8 is a flowchart of a method for fault detection in a substring search operation by checking the accuracy of a result bit vector and a reported status code in accordance with an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] The diagrams illustrated herein are exemplary. Many modifications to the diagrams or operations described herein are possible without departing from the scope of the invention. For example, operations can be performed in a different order, and operations can be added, deleted, or modified. Also, the term "coupled" and variations thereof describe having a communication path between two elements, and do not imply a direct connection between the elements without any intervening elements / connections between them. All of these modifications are considered part of this specification.

[0010] In the accompanying drawings and the following detailed description of the disclosed embodiments, the various elements shown in the drawings are labeled with two or three digit reference numbers. With few exceptions, the left-most digit(s) of each reference number corresponds to the drawing in which the element is first illustrated.

[0011] As previously explained, one of the most common text processing tasks on a computer is substring search or substring match to identify occurrences of characters of a reference string within a larger set of characters of a target string. The target string can be generated based on speech input using, for example, a speech recording process. In general, the length of the reference string can be specified either implicitly (zero terminator) or explicitly with a special operand. Similarly, the target string can be limited by a zero terminator, which marks the end of the string (EOS). With an ever-increasing pool of information, especially unstructured human readable information, faster extraction of text information and consequently faster methods to solve the substring match problem are needed. Furthermore, additional logic is needed to perform internal signals and cross-checks of intermediate results for certainty. An embodiment of the present invention provides logic that allows for certainty-driven cross-checks of the results of the substring search and for a reported status code that indicates the type of match found. In contrast to conventional fault detection techniques, the method presented here focuses on preliminary error detection in the results and status codes of a SIMD (Single Instruction Multiple Data) sub-string search engine.

[0012] A vector SIMD engine with dedicated instructions for substring search allows for the comparison of several characters simultaneously with a single instruction, as opposed to a byte-by-byte comparison, resulting in a speedup. In an exemplary vector SIMD implementation, a vector register has a fixed number of bits (e.g., K bits) that can be held in a single vector. A vector register can contain M vector elements, each of size n (e.g., each vector element occupies n bits). A vector register contains M vector elements of size n. The width of a register refers to the number of vector elements in the register.

[0013] The number of characters L is less than M. An embodiment of the present invention includes a substring search of L characters that completely occupies a vector register (e.g., M x n bits). The string of L characters can be referred to as a reference string.

[0014] The upper triangular part of the comparator matrix is ​​the main diagonal elements of the matrix plus several additional upper diagonal elements. The lower triangular part of the comparator matrix is ​​the main diagonal elements of the matrix plus several additional lower diagonal elements.

[0015] The term "full match" refers to a substring of L characters of the target string that matches the reference string exactly. The term "partial match" refers to one or more substrings of the target string that partially match the reference string. Using the upper diagonal portion allows for the identification of a substring of one or more characters at the end of the target string. Using the lower diagonal portion allows for the identification of a substring of one or more characters at the beginning of the target string.

[0016] One or more embodiments of the fast, accurate substring match described herein allow for accurate identification of both full matches anywhere within a target string, and partial matches at the end or beginning of a target string. The method does not require re-evaluation (e.g., substring matches in short strings of instructions known today may require re-evaluation, including additional shifting of the operands to be searched, to find a partial match). For short strings that fit within a vector register, the fast, accurate substring match method described herein allows for identification of the substring in a single operation. This eliminates the re-evaluation phase upon the occurrence of either a full match or a partial match.

[0017] Many processor designs, especially when targeting servers or mainframes, also require addressing and adding RAS (reliability, availability, and serviceability) features. For example, in this context, it may be important to detect and handle physical faults (permanent, transient, or intermittent).

[0018] An error is defined as a deviation from precision or accuracy that is a symptom of a fault. The failure of a memory cell to capture successive data bits due to an unexpected value generated as a result of a delay fault or loss of operator priority are both examples of errors.

[0019] Like faults, errors can be classified into two types: detected or latent errors. When applying error detection techniques, an error is called latent unless it is recognized. As an example, an error in a single memory of a cache entry due to a positive charge and the kinetic energy of an alpha particle is known as a single event upset (SEU) fault and can be either latent or detected. If the processor recognizes the SEU fault, it is detected, otherwise it retains the latent status. In addition, a latent error can disappear or be overwritten before it is detected. However, most of the errors are propagated and eventually generate more errors or are passed through the system resulting in single or more errors. If an SEU occurs in a latch or flip-flop, it can cause a change of state. The impact of an SEU is significant because a substring search usually affects the control flow (state in an if statement). As a non-limiting example, a false positive in a database search due to an SEU can induce improper allocation or transfer of resources, property, etc.

[0020] Conventional fault detection techniques have many limitations in the context of a string search engine for SIMD. One conventional technique is so expensive that resource duplication is prohibitive for SIMD architectures. Another fault prevention technique, commercial radiation-hardened processors, is also extremely expensive in terms of both area and computational power required. Still other fault detection techniques are applicable for some operations but not others. For example, residual checking techniques only work for numerical computations, while parity decisions are limited to single or odd bit errors and protect only data but not computations.

[0021] 1 is an exemplary structure of a processor 101. For example, one or more levels of cache 103 are used to buffer memory data to improve processor performance. Cache 103 is a high speed buffer that holds cache lines of memory data that are likely to be used. A typical cache line is 64, 128, or 256 bytes of memory data. Cache 103 caches data for higher tiered storage in main memory storage 105.

[0022] A program counter (instruction counter) 107 keeps track of the address of the current instruction to be executed. Program counters in z / OS architecture processors are 64-bit and are truncated to 31 or 24-bit to support prior addressing limits. The program counter is typically implemented in the computer's program status word (PSW) and therefore persists across context switches. Thus, an ongoing program with a program counter value can be interrupted, for example, by the operating system (context switch from the program environment to the operating system environment). The program's PSW holds the program counter value while the program is not active and the operating system's program counter (in the PSW) is used while the operating system is running. Typically the program counter is incremented by an amount equal to the number of bytes in the current instruction. The program counter 107 is modified, for example, by either a context switch operation or a branch-take operation of a branch instruction. In a context switch operation, the current program counter value is stored in the program status word along with other state information about the program to be executed (such as a status code) and a new program counter value is loaded, pointing to the instruction of the new program module to be executed. A branch take operation is performed to allow the program to make decisions or loops within a program by loading the result of a branch instruction into the program counter 107.

[0023] Typically, the instruction fetch unit 109 is used to fetch instructions on behalf of the processor 010. The fetch unit 109 fetches the "next instruction," which is the target instruction of a branch taken instruction or the first instruction of a program following a context switch. Implementations of the instruction fetch unit often use prefetching techniques to speculatively prefetch instructions based on the likelihood that the prefetched instruction will be used. For example, the fetch unit may fetch a 16-byte instruction, including the next instruction and an additional byte of the following instruction.

[0024] The fetched instructions are then executed by the processor 101. For example, the fetched instruction(s) are passed to a dispatch unit 111 of the fetch unit 109. The dispatch unit 111 decodes the instruction(s) and forwards information about the decoded instruction(s) to the appropriate units 113, 115, 117. The execution unit 113 can receive information about the decoded computational instruction information, typically from the instruction fetch unit 109, and can perform computational operations on operands according to the opcode of the instruction. The operands are provided to the execution unit 113, preferably from the memory 105, from the vector registers 119, or from the immediate field of the instruction to be executed. The results of the execution, if stored, are stored in the memory 105, the vector registers 119, or other mechanical hardware (control registers, PSW registers, etc.).

[0025] 1, vector registers 119 can have the same size K, where K=M×n, where n is the number of bits that encode a single character (e.g., n=8 bits). For example, each of vector registers 119 can store K bits, where M is the width of the register.

[0026] The data stored in vector registers 119 can be processed using parallel vector processing techniques, such as using Single Instruction Multiple Data (SIMD) hardware, e.g., vector registers 119 can hold data for vector processing performed by SIMD instructions.

[0027] For example, fixed size chunks of bytes known as words can be transferred from memory 105 to vector register 119. The number of bits in a word can be equal to or less than the size K of register 119. For example, vector load / store instructions provide the ability to take words stored in memory 105 and pack them into a contiguous vector / stream to be placed in vector register 119. For example, memory 105 can be configured to contain 256-bit memory words. The 256-bit memory words can be partitioned into K-bit chunks. During processing, each K-bit chunk (containing M characters) is loaded into register 119.

[0028] 2 is a diagram illustrating components of a processing unit 200 in accordance with one or more embodiments of the present invention. Processing unit 200 can be configured to operate on an entire vector in a single instruction. Processing unit 200 is part of execution unit 113 of FIG. 1.

[0029] The processing unit 200 includes a comparator matrix 214. The comparator matrix 214 is a hardware comparator matrix. The comparator matrix 214 can be configured to compare individual characters. The comparator matrix 214 includes a character-wise equivalence comparator. Additionally or alternatively for equivalence comparison, the comparator can be configured to perform a combination of '>' and '<' operators, for example, operation NOT((r>t) OR (r<t)) = (r==t).

[0030] The comparator matrix 214 can operate on two operands a and b. The operand a202 can be, for example, the reference string to be searched, and the operand b204 can be the target string for which it is checked whether it contains all or part of the operand a202 or both. The reference string contains L characters, and the target string can contain M characters that can completely occupy the vector register 119. The target and reference strings are compared character-by-character (character-wise). A third operand, the operand c208, is used by the zero detection logic 212 to generate a zero detection vector that is applied by the logic 224 to the result of the comparator matrix 214. The operand c (explicit length) 208 can specifically have 5 bits, 59 - 63. Specifically, the search for the reference string "noon" with an explicit length of the reference string equal to 4 (c = 4) within the target string "abhighnoonoonnoo" returns a result = 000001001000100. Starting from the left, the multiple '1's at the 7th and 10th bits are due to a complete match, while the '1' at the 3rd bit counted from the right is due to a partial match.

[0031] Specifically, element size control 206, which has three bits 0-2, specifies the element size. Element size control 206 specifies the size of the elements in the vector register operand. In one embodiment, element size control 206 specifies a byte, a halfword (e.g., 2 bytes), or a word (e.g., 4 bytes). Specifically, 0 indicates a byte; 1 indicates a halfword; and 2 indicates a word, also known as a full word. Each element can contain encoded data in a UTF-8 (1 byte / character), UTF-16 (2 bytes / character), or UTF-32 (4 bytes / character) stream.

[0032] Because the width of the vector register, M=16, is greater than the number of characters L=4 in the reference string “noon”, the vector register storing the reference string may contain empty elements. Specifically, the first four characters in the reference string 202 may represent the word “noon”, while the last 4-12 characters are empty, which may be represented in the character encoding by 0X00. The first zero detection logic 210 and the second zero detection logic 212 may be configured to generate a first zero detection vector 211 and a second zero detection vector 213, respectively. The first zero detection vector 211 is a value indicative of an empty element of the target string and a non-empty element of the target string, and the second zero detection vector 213 is a value indicative of an empty element of the reference string and a non-empty element of the reference string.

[0033] In one embodiment, the output of the comparator matrix 214 may include an equivalence matrix 215. The equivalence matrix 215 includes equivalence relationships between the characters being compared. As shown in Figure 2, the first zero detection vector 211, the second zero detection vector 213, and the equivalence matrix 215 may be input to corresponding flip-flops 216a, 216b, and 216c, respectively.

[0034] According to an embodiment of the present invention, the processing unit 200 may further include a fault detection logic. The fault detection logic includes a register for storing the predicted intermediate result vector 230, a register containing a correction mask 228, a register containing a target separation mask 226, and logic for performing an AND operation between corresponding elements of the registers. In one embodiment, the three registers may not be part of the fault detection logic. The use of the correction logic 222 to generate the correction mask 228 allows a simple way to suppress the identification of partial matches or the identification of full matches in the predicted intermediate result vector 230. In contrast to the prior art, the processing unit 200 distinguishes between full matches and partial matches at the hardware level. This is achieved by applying the correction mask 228 generated by the correction logic 222 to the predicted intermediate result vector 230 that may contain a partial match at the end of the string fragment. The predicted intermediate result vector 230 cannot distinguish between full matches and partial matches. For example, if operand b contains operand a and a portion of operand a, intermediate result vector 230 contains one bit value at a bit position that marks the start of a substring of operand b that operand a matches exactly, and another bit value at another position that marks the start of a substring of operand b that partially matches operand a.

[0035] The fault detection logic may also include a first AND gate 234 for performing an AND operation between the correction mask 228 and the intermediate result vector 230. An output of the AND gate 234 may be used as an input of the second AND gate 232. The target isolation mask 226 may be generated using the target isolation logic 220 and may be used as another input of the second AND gate 232. The fault detection logic may further include a third AND gate 236 for performing an AND operation between the intermediate result vector 230 and the target isolation mask 226.

[0036] In accordance with an embodiment of the present invention, the result generation logic is realized, specifically, by an OR-tree 238 across the output bits of the second AND gate 232. The output of the OR-tree 238 provides an identification of an all-match result 240. As described herein, an all-match refers to a substring of L characters of the target string that all matches the string. The output of the third AND gate 236 is provided to a leading zero counter 242. The leading zero counter 242 returns a result index 244 by determining the number of leading zeros in the result bit vector. The result index 244 indicates the index of the first match. Thus, for example, a search for the reference string "noon" in the target string "abhighnoonoonnoo" returns a result index value equal to 6 (because the sixth bit of the target string is the first match). The result index 244 is stored in a flip-flop 246.

[0037] According to an embodiment of the present invention, the result generation logic further returns a status code 250 along with the result index 244. Exemplary status codes are shown in the table below.

[0038] [Table 1]

[0039] In one embodiment, the condition code 250 may be generated by the condition code generator 248 based on a combination of the following inputs: an identification of the full match result 240, a target separation mask 226, a correction mask 228, and a predicted intermediate result. In one embodiment, the condition code generator 248 may include a decoder. The generated condition code 250 may be stored in a corresponding flip-flop 252. As shown in FIG. 2, the SEU fault 128, 254 may affect any of the fault detection flip-flops 216a, 216b, 216c and any of the result generation logic flip-flops 246, 252.

[0040] FIG. 3 illustrates logic for fault detection by comparison of a result bit vector with a first row of a comparator matrix according to an embodiment of the present invention. As described herein, the comparator matrix 305 operates on two operands a 202 and b 204. The first row 308 of the comparator matrix 305 will contain bit values ​​that are set to 1 at positions where a first character of a reference string matches one of the characters of a target string. The fault detection logic 300 is configured to detect an error when the result bit vector 310 identifies a match at a particular position, but the first characters of the target string and the reference string, respectively, do not match at that particular position. The fault detection logic 300 may further generate a zero detection vector 306.

[0041] The comparator matrix 305 is configured to compare individual characters of each of the operands 302, 304. The comparator matrix 305 includes comparators such as character-wise equality comparison. The result bit vector 310 indicates the result of the performed substring search and includes bit values ​​that are set to 1 at positions where the reference string matches a sequence of characters in the target string. The result bit vector 310 identifies full matches, partial matches, and any overlapping matches. The flip-flop 312 stores the result bit vector 310. At some point, the flip-flop 312 experiences an SEU event 316, for example, as a result of exposure to radiation including alpha particles or neutrons. As a result, the output 318 of the flip-flop 312 may have at least one bit inversion (e.g., the bit at position q6).

[0042] As shown in FIG. 3, another flip-flop 314 stores the first row 308 of the comparator matrix 305. The fault detection logic 300 includes an AND gate 320. All bits stored in the flip-flop 314 are inverted and fed to the AND gate 320. The other input of the AND gate 320 is the output of the flip-flop 312. The output of the AND gate 320 is connected to an OR tree 322. It should be noted that the OR tree 322 produces a value of 1 only if the result bit vector 310 is not a subset of the first row 308 of the comparator matrix 305. In this case, since the bit at position q6 of the output 318 is set to 1, the value at the corresponding position of the first row 308 is set to 0, identifying no match for the first character, which is inverted to 1 at the input of the AND gate 320. The second input of AND gate 320 (the value of element q6 of the result bit vector) is also 1, and OR tree 322 outputs a 1, indicating a fault 324. Fault detection logic 300 checks the accuracy of result bit vector 310 and detects a fault if result bit vector 310 differs from the subset of first row 308 of comparator matrix 305.

[0043] FIG. 4 illustrates logic for fault detection by comparison of a result bit vector with a zero detection vector associated with a target string, according to an embodiment of the present invention. According to an embodiment of the present invention, the first zero detection logic 309 processes information contained in operand a 302 to generate a first zero detection vector 306 associated with a reference string. In the illustrated case, all bits of the first zero detection vector 306 starting from the fifth position are set to 1. The second zero detection logic 404 processes information contained in operand b 304 to generate a second zero detection vector 406 associated with a target string. In the illustrated case, the target string contained in operand b 304 is implicitly terminated (including the end of string character 402), and all bits of the second zero detection vector 406 starting from a position corresponding to the end of string character 402 are set to 1. A flip-flop 408 stores the second zero detection vector 406.

[0044] The substring search logic 408 is configured to compare individual characters of each of the respective operands 302 and 304 using the first zero detect vector 306 and the second zero detect vector 406. The substring search logic 408 generates a result bit vector 310 that is stored in a flip-flop 312. At some point, the flip-flop 312 experiences an SEU event 316 as a result of exposure to radiation, including, for example, alpha particles or neutrons. As a result of the SEU event 316 occurring, the output 318 of the flip-flop 312 may have at least one bit flip. As shown, the last bit of the output 318 is flipped. The flipped bit indicates that it is beyond the end of the target string, as indicated by the end of the string character 402.

[0045] The fault detection logic 400 includes an AND gate 410. The contents of the flip-flop 408 are provided as one of the inputs to the AND gate 410. The SEU affected output 318 is another input to the AND gate 410. The fault detection logic 400 further includes an OR tree 412 for examining the output of the AND gate 410. In this case, the OR tree 412 generates a value of 1 only if the bit position in the result bit vector of the bit indicating a match is greater than the bit position in the zero detection vector of the bit indicating the end element (EOS element) of the target string. In this case, since the last bit of the SEU affected output 318 is set to 1 and the last bit of the second zero detection vector 406 is set to 1, the value generated by the OR tree 412 is 1, indicating a fault 414. The fault detection logic 400 is configured to check the accuracy of the result bit vector 310 and detect a fault if the result bit vector output 318 indicates a match beyond the implicit or explicit end of the target string.

[0046] FIG. 5 illustrates logic 500 for detecting faults by comparing a result bit vector with a matchable region associated with a target string, according to an embodiment of the present invention. According to an embodiment of the present invention, the zero detection logic processes information contained in an operand to generate a zero detection vector 306 associated with a reference string. In the illustrated case, all bits starting from the fifth position of the first zero detection vector 306 are set to 1 because the string contained in operand A 202 contains four characters. According to an embodiment of the present invention, the logic 500 may further include correction logic 502. The correction logic 502 includes logic for generating a correction mask 228. The correction mask 228 is stored in a flip-flop 510. The use of the correction mask 228 allows a simple method for suppressing the identification of partial matches or the identification of full matches in the result bit vector 310. As described herein, the predicted intermediate result 505 cannot distinguish between full and partial matches. To suppress partial matches from the predicted intermediate results 505, the correction mask 228 is applied 506 to the predicted intermediate results 505 that may contain partial matches at the ends of the string fragment. In the illustrated case, the correction mask 228 shows a matchable region. As used herein, the term "matchable region" refers to a region in which a full match is possible. All bits of the matchable region in the correction mask 228 are set to 1. In the illustrated case, the reference string contains four characters, so the matchable region contains all bits except the last three.

[0047] After the correction mask 228 is applied 506 on the predicted intermediate result 505, the result bit vector 310 contains only identities of full matches. In the illustrated case, the predicted intermediate result 505 contains only partial matches indicated by bit s7 set to 1, so the applied bit mask 228 sets all bits of the result bit vector 310 to 1.

[0048] The result bit vector 310 is stored in a flip-flop 512. At some point, the flip-flop 512 may experience an SEU event 514. As a result of the SEU event 514 occurring, the output 516 of the flip-flop 512 may have at least one bit inversion. In the illustrated embodiment, the third to last bit of the output 516 is inverted. Note that the inverted bit lies outside the matchable region.

[0049] The fault detection logic 500 includes an AND gate 524. The contents of the flip-flop 510 are provided as one of the inputs to the AND gate 524. The SEU affected output 516 comprises another input to the AND gate 524. The fault detection logic 500 further includes a first OR tree 526 across the bits of the output of the AND gate 524. The OR tree 526 produces a value of 1 only if the bit position indicating a match in the result bit vector is within a matchable region. In this case, the output of the AND gate 524 is 0, so the value produced by the OR tree 526 is also 0.

[0050] As shown in FIG. 5, the fault detection logic 500 further includes a second OR tree 518 across the bits of the output 516 of the flip-flop 512. Since bit 5 of the output 516 of the flip-flop 512 is set to 1, the output of the second OR tree 518 is also 1, and includes an all-match indicator 522. The all-match indicator 522 is also fed to another AND gate 528. The output of the first OR tree 526 is inverted and used as another input of the AND gate 528. The output of the AND gate 528 indicates a fault 530. The fault detection logic 500 is configured to check the accuracy of the output 516 of the flip-flop 512 and detect a fault if this output indicates a all-match, and at the same time all bits of the matchable region in the output 516 of the flip-flop 512 are set to 0.

[0051] FIG. 6 illustrates misalignment detection logic 600, including logic to detect a fault if the result bit vector is not aligned to the element size, according to an embodiment of the present invention. For illustrative purposes only, assume that the characters are encoded using the URF-16 encoding scheme, which is a non-ASCII transparent byte serialization encoding scheme that may therefore be either big-endian (BE) or little-endian (LE) that specifies the ordering of the bytes within the encoding scheme. Each character is encoded using two bytes. In this example, the third byte of the exemplary result bit vector 310 is set to 1, and all remaining bytes are set to 0. A flip-flop 601 stores the result bit vector 310. At some point, the flip-flop 601 may experience an SEU event 603. A misalignment of the result bit vector 310 occurs when at least one byte other than the first byte of each element is set to 1.

[0052] To detect this misalignment between the result bit vector 310 and the corresponding element size, the misalignment detection logic 600 includes circuit elements having an element size of at least a word or halfword for detecting the misalignment. The misalignment detection logic 600 is configured to process the output 605 of a flip-flop 601 that stores the result bit vector 310. To process the output 605 of the flip-flop 601 having halfword elements 604, the misalignment detection logic 600 includes a first OR tree 608 across the second byte of each of the halfwords. Only the first byte of each word is destined to have the value 1. The output of the first OR tree 608 is connected to an input of an AND gate 614. Another input of the AND gate 614 is an element size indicator 616. The element size indicator 616 includes a value indicating that each element of the result bit vector has two bytes. The output of AND gate 614 indicates whether there is any misalignment for the elements of result bit vector 310, where each element has a half-word size. In this case, the second byte of first half-word element 604 is set to 1 due to an error, so the output of OR tree 608 is set to 1. As a result, AND gate 614 also produces a 1, which indicates a misalignment 618 of the result bit vector with half-word elements.

[0053] The misalignment detection logic 600 may also include circuitry for processing the output 605 of the flip-flop 601 that stores the result bit vector 310 when each element of the vector 605 is a word (4 bytes). The misalignment detection logic 600 includes a second OR tree 606 that spans the second through fourth bytes of each word. The output of the second OR tree 606 is connected to an element size indicator 612. Another input of the second AND gate 610 receives the element size indicator 612. The element size indicator 612 includes a value that indicates that each element of the result bit vector 310 is 4 bytes long. The output of the second AND gate 610 indicates whether there is any misalignment with respect to the elements of the result bit vector 310 when each element has the size of a word. In this case, the output of the second OR tree 606 is 1 because both the second and third bytes of the first word 602 are set to 1. As a result, the second AND gate 610 also produces a 1, indicating a misalignment 620 of the result bit vector with word elements 310. An OR gate 622 compares the outputs of the AND gates 610 and 614 to identify a corresponding misalignment error 624 if at least one of the AND gates 610 and 614 produces a 1.

[0054] 7A-7D are diagrams illustrating logic for fault detection by checking the accuracy of a reported status code according to an embodiment of the present invention. According to an embodiment of the present invention, the result generation logic can generate one of the status codes along with a result index indicating the index of the first match. Thus, for example, a search for the reference string "noon" in the target string "abhighnoonoonnoo" returns a result index value equal to 6 (because the sixth bit of the target string is the first match). Exemplary values ​​of the status codes are repeated here again: CC0 - no full match, no partial match, and no EOS found; CC1 - no full match, no partial match, but an implicit EOS end was found; CC2 - full match found; CC3 - partial match but no full match found.

[0055] 7A shows logic 700 that detects errors by checking the accuracy of a reported status code 706 of CC0 by comparing the reported status code with a result index 702 and a zero detect vector 406. The value of status code CC0 706 is stored in a flip-flop 708. At some point, flip-flop 708 may experience an SEU event 710. As a result of the SEU event 710 occurring, the output 712 of flip-flop 708 may flip. In the illustrated case, a flipped value of 1 indicates no full match, no partial match, and no EOS detected.

[0056] As shown in FIG. 7A, the fault detection logic 700 further includes an OR gate 704 for processing the result index 702 and the value of the zero detection vector 406 associated with the target string. For vector sizes that are powers of two, it is sufficient to examine the most significant bit (MSB) of the result index. This bit is 0 if a match is found and 1 if a match is not found. The MSB of the result index 702 is fed to an OR gate 704, where the value of the MSB of the result index 702 is inverted. In this case, the value of the MSB of the result index 702 is inverted to 1 and the output of the OR gate 704 is 1. A second input of the OR gate 704 is connected to the least significant bit (LSB) of the zero detection vector 406. This LSB is set to 1 if an EOS is detected. Thus, in both cases, either a match is found or an EOS is found, the output of the OR gate 704 is 1. The output of the OR gate 704 is connected to one input of an AND gate 714. The SEU affected output 712 of flip-flop 708 is used as another input to AND gate 714. The output of AND gate 714 indicates a fault 716. The fault detection logic 700 is configured to check the accuracy of the reported CC0 status code 706 and detect a fault if the result generation logic reports a CC0 code despite finding a match or EOS.

[0057] 7B shows logic 717 for checking the accuracy of CC1 status code 718 to detect errors by comparing the reported status code with result index 702 and zero detect vector 406. The value of status code CC1 718 is stored in flip-flop 709. At some point, flip-flop 709 may experience an SEU event 711. As a result of the SEU event 711 occurring, the output 720 of flip-flop 709 may flip. In the illustrated case, a flipped value of 1 indicates that no full match, no partial match, and an explicit EOS end has been detected.

[0058] As shown in FIG. 7B, the fault detection logic 717 further includes an OR gate 724 for processing the result index 702 and the value of the zero detection vector 406 associated with the target string. For vector sizes that are powers of two, it is sufficient to check the most significant bit (MSB) of the result index. This bit is 0 if a match is found and 1 if no match is found. The value of the MSB of the result index 702 is fed to an OR gate 724 where it is inverted. In this case, the value of the MSB of the result index 702 is inverted to 1 and the output of the OR gate 724 is 1. A second inverted input of the OR gate 724 is connected to the least significant bit (LSB) of the zero detection vector 406. This LSB is set to 0 if no EOS is found. Thus, in both cases, either a match is found or no EOS is found, the output of the OR gate 724 is 1. The output of the OR gate 724 is connected to one input of an AND gate 726. The SEU affected output 720 of flip-flop 709 is used as the other output of AND gate 726. The output of AND gate 726 indicates a fault 728. Fault detection logic 717 is configured to check the accuracy of the reported CC1 status code 718 and detect a fault if the result generation logic finds a match or reports a CC1 code despite not finding an EOS.

[0059] 7C shows logic 729 for checking the accuracy of the CC2 status code 732 by comparing the reported status code with the result index 702 and the match type indicator to detect errors. The value of the CC2 status code 732 is stored in a flip-flop 713. At some point, the flip-flop 713 may experience an SEU event 715. As a result of the SEU event 715 occurring, the output 734 of the flip-flop 713 may flip. In the illustrated case, a flipped value of 1 indicates that a full match was found.

[0060] As shown in FIG. 7C, the fault detection logic 729 further includes an OR gate 736 for processing the values ​​of the result index 702 and the match type indicator 730. In this embodiment, a match type indicator of value 1 indicates that a full match was found. The MSB of the result index 702 and the value of the match type indicator 730 are provided to an OR gate 736, where the value of the match type indicator 730 is inverted. In this case, the output of the OR gate 736 is 1 since both inputs have non-zero values. The OR gate 736 output is connected to one input of an AND gate 738. The SEU affected output 734 of the flip-flop 713 is used as the other input of the AND gate 738. The output of the AND gate 738 indicates a fault 740. The fault detection logic 729 is configured to check the accuracy of the reported CC2 status code 732 and detect a fault when the result generation logic reports a CC2 code despite finding only a partial match or no match at all.

[0061] 7D shows logic 741 for detecting errors by checking the accuracy of a CC3 status code 742 by comparing the reported status code with the result index 702 and match type indicator. The value of the CC3 status code 742 is stored in a flip-flop 719. At some point, the flip-flop 719 may experience an SEU event 721. As a result of the SEU event 721 occurring, the output 744 of the flip-flop 719 may flip. In the illustrated case, a flipped value of 1 indicates a partial match, but not a full match was found.

[0062] As shown in FIG. 7D, the fault detection logic 741 further includes an OR gate 746 for processing the values of the result index 702 and the match type indicator 730. In this embodiment, a match type indicator with a value of 1 indicates that a full match has been detected. The MSB of the result index 702 and the value of the match type indicator 730 are supplied to the OR gate 746. In this case, since both inputs have non-zero values, the output of the OR gate 746 is 1. The output of the OR gate 746 is connected to one input of the AND gate 748. The output 744 affected by the SEU of the flip-flop 719 is used as the other input of the AND gate 748. The output of the AND gate 748 indicates a fault 750. The fault detection logic 741 is configured to check the accuracy of the reported status code 742 of CC3 and to detect a fault when the result generation logic reports a CC3 code when it has detected a full match or has found no match at all.

[0063] FIG. 8 is a flowchart of a method 800 for fault detection in a substring search operation according to an embodiment of the present invention, using a processor unit 200 that includes vector registers for M vector elements respectively. The vector elements are n-bit elements for encoding characters. L<M indicates that a substring search for L characters is performed.

[0064] In block 802, a reference string can be loaded into the first register of register 119, a target string can be loaded into the second register of register 119, and a comparison matrix 214 can be provided. The target string can be checked using the comparison matrix 214 if it contains all or only part of the reference string or both.

[0065] At block 804, a result bit vector is generated. The result bit vector includes bit values ​​at bit positions that mark the start of substrings of the target string that match the string completely, and another bit value at another bit position that marks the start of substrings of the target string that partially match the string. The result bit vector may include identification of both full and partial matches that occur at the end of the target string. To generate the result bit vector, a combination of predicted intermediate results that cannot distinguish between full and partial matches and a correction mask that masks the most significant L-1 bits is performed to suppress partial matches from the result bit vector.

[0066] At block 806, a result index for the first match is generated. In one embodiment, the result index is derived from the generated result bit vector. For example, a search for the reference string "noon" in the target string "abhighnoonoonnoo" returns a result index value equal to 6 (because the sixth bit of the target string is the first match).

[0067] At block 808, a condition code is generated. In one embodiment, the condition code may be generated by a condition code generator 248 (shown in FIG. 2) based on a combination of the following inputs: a target separation mask 226, a correction mask 228, and a predicted intermediate result based on indicating a full match result 240. In one embodiment, the condition code generator 248 may include a decoder. The generated condition code 250 may be stored in a corresponding flip-flop 252.

[0068] At block 810, fault detection is performed by determining the accuracy of the result bit vector using the fault detection logic 300, 400, 500 and misalignment detection logic 600 described herein. In accordance with an embodiment of the present invention, the fault detection logic 300 is configured to check the accuracy of the result bit vector and detect a fault if the starting subset of the result bit vector is different from the first row of the comparator matrix. Additionally, the fault detection logic 400 is configured to check the accuracy of the result bit vector and detect a fault if the output of the result bit vector indicates a match beyond the implicit end of the target string. Furthermore, the fault detection logic 500 is configured to check the accuracy of the result bit vector and detect a fault if the result bit vector indicates a full match but at the same time the matchable region in the result bit vector is set to 0. The misalignment detection logic 600 is configured to detect a misalignment if the result bit vector does not align to the element size.

[0069] At block 812, fault detection is performed by determining the accuracy of the status codes using fault detection logic 700, 717, 729, and 741 described herein. According to an embodiment of the present invention, the fault detection logic 700 may be configured to check the accuracy of the reported CC0 and detect a fault if the CC0 code is reported despite finding a match or EOS in the result generation logic. The fault detection logic 717 may be configured to check the accuracy of the reported CC1 and detect a fault if the CC1 code is reported despite finding a match or not finding an EOS in the result generation logic. The fault detection logic 729 may be configured to check the accuracy of the reported CC2 and detect a fault if the CC2 code is reported despite finding only a partial match or no match in the result generation logic. The fault detection logic 741 may be configured to check the accuracy of the reported CC3 and detect a fault if the CC3 code is reported despite finding a full match or no match in the result generation logic.

[0070] The embodiments of the invention described herein have been described with reference to flowchart instructions and / or block diagrams of methods, apparatus (systems), and computer readable recording media and computer programs according to embodiments of the invention. It is understood that any combination of flowchart illustrations and / or block diagrams and / or blocks in flowchart illustrations and / or block diagrams can be implemented by computer readable program instructions.

[0071] The present invention may be a system, a method, or a computer program product, or a combination thereof. The computer program product may include a computer-readable recording medium (or media) having computer-readable program instructions thereon for causing a processor to perform features of the present invention.

[0072] A computer readable recording medium may be a tangible device capable of holding and storing a plurality of instructions for use by an instruction execution device. A computer readable medium may be, for example, but not limited to, an electrical recording device, a magnetic recording device, an optical recording device, an electro-magnetic recording device, a semiconductor recording device, or any suitable combination thereof. More specific examples of computer readable recording media include the following: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CDROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a punch card, or a mechanically encoded device having protruding structures within a groove having instructions recorded therein, and any suitable combination thereof. As used herein, a computer-readable recording medium is not to be construed as a transitory signal per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves such as wave guides or other communications media (e.g., light pulses passing through fiber optic cable), or electrical signals communicated through wires.

[0073] The computer program instructions described herein can be downloaded from a computer readable recording medium into each computing / processing device, or can be downloaded to an external computer or external recording device via a network, such as the Internet, a local area network, a wide area network, or a wireless network, and combinations thereof. The network can include copper communication cables, fiber optic communication, wireless communication routers, firewalls, switches, gateway computers, and edge servers, and combinations thereof. A network adapter card or network interface in each computing / processing device receives the computer readable program instructions from the network and transfers the computer readable program instructions into a computer readable recording medium in each computing / processing device for storage.

[0074] The computer readable program instructions for carrying out the operations of the present invention can be either source code or object code written in any combination of programming languages, including assembler instructions, instruction set architecture (ISA) instructions, machine language instructions, machine dependent instructions, microcode, firmware instructions, state setting data, configuration data for an integrated circuit, or one or more procedural programming languages, such as Smalltalk®, object oriented programming languages ​​such as C++, the “C” programming language, or similar programming languages. The computer readable program instructions can be executed entirely on the user computer, partially on the user computer as a stand-alone software package, partially on the user computer and partially on a remote computer, or entirely on a remote computer or server. In the latter scenario, the remote computer can be connected to the user computer through any type of network, including a local area network (LAN), a wide area network (WAN), or the connection can be to an external computer (e.g., through an Internet service provider). In some embodiments, computer readable program instructions may be executed by electrical circuitry including, for example, a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), and state information of the computer readable program instructions may be used to personalize the electrical circuitry to perform features of the present invention.

[0075] These computer readable program instructions can be provided to a computer processor or other programmable data processing device to create a machine, and the instructions, when executed by the computer processor or other programmable data processing device, generate means for implementing the functions / operations specified in the block or blocks of the flowcharts and block diagrams, or a combination thereof. These computer readable program instructions can also be stored on a computer readable recording medium that directs a computer, programmable data processing device, and other devices, or a combination thereof, to function in a particular manner, and a computer readable recording medium having instructions stored therein constitutes an article of manufacture containing instructions that implement the functional / operational features specified in the block or blocks of the flowcharts and block diagrams, or a combination thereof.

[0076] The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device and cause a computer implemented process to perform a series of operational steps on the computer, other programmable apparatus, or other device to implement the functions / acts specified in the blocks of the flowcharts and block diagrams or in a combination thereof.

[0077] Various embodiments of the present invention are described with reference to the associated drawings. Alternative embodiments of the present invention may be made without departing from the scope of the present invention. Various connections and positional relationships (e.g., above, below, adjacent, etc.) are described between elements in the following description and drawings. The connections or positional relationships, or both, may be direct or indirect unless otherwise specified, and the present invention is not intended to be limited to this feature. Thus, coupling of entities may refer to either direct or indirect coupling, and positional relationships between entities may be direct or indirect positional relationships. Furthermore, various tasks and process steps described herein may be added to a more comprehensive procedure or process having additional steps or functions not described in detail herein.

[0078] The following definitions and abbreviations should be used for interpreting the claims and the specification. As used herein, the terms "comprise," "including," "containing," "including," "containing," "having," "having," "including," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion. For example, a composition, mixture, process, method, product, or device that includes a list of elements need not be limited to only those elements, but can include other elements, mixtures, processes, methods, products, or devices that are not expressly listed or inherent to such composition.

[0079] Additionally, the term "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any embodiment or design described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. The terms "at least one" and "one or more" can be understood to include any integer number greater than or equal to 1, i.e., 1, 2, 3, 4, etc. The term "plurality" can be understood to include any integer number greater than or equal to 1, i.e., 1, 2, 3, 4, etc. The term "connected" can include both indirect and indirect "connections."

[0080] The terms "about," "substantially," "approximately," and variations thereof are intended to include the degree of error associated with the measurement of a particular quantity based on the equipment available at the time of filing this application. For example, "about" can include ±8%, or 5%, or 2% of a given value.

[0081] The description of various embodiments of the present invention is presented for illustrative purposes, but is not intended to be exhaustive or limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terms used in this specification have been selected to best explain the embodiments, principles of technical improvements over the art found in the market, or to enable others skilled in the art to understand.

[0082] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and possible implementation operations of systems, methods, and computer programs according to various embodiments of the present invention. In this respect, the flowcharts or block diagrams may represent modules, segments, or portions of instructions, which include one or more executable instructions for implementing a particular logical function(s). In some alternative implementations, the functions described in the blocks may be performed other than as illustrated. For example, two blocks shown in succession may be performed in a manner that is actually performed as one step, may be performed simultaneously, substantially simultaneously, partially or completely overlapped in time, or the blocks may be performed in reverse order, depending on the functionality involved. Also, the block diagrams and / or flowchart illustrations and / or combinations of the blocks in the block diagrams and flowchart illustrations may be implemented by a special-purpose hardware-based system that performs a particular function or operation or performs a combination of specific-purpose hardware and computer instructions.

Claims

1. 1. A method for detecting faults in a substring search operation, the method comprising: providing use of a processor unit including vector registers each for M vector elements, said vector elements being n bits for encoding a character, and an M×M matrix comparator for character-wise comparison of elements of a reference string stored in a first one of said vector registers with a target string stored in a second one of said vector registers; generating a result bit vector using the comparisons performed by the M×M matrix to indicate characters of the target string that fully match the reference string and to indicate characters of the target string that partially match the reference string; and performing fault detection in said substring search operation by using said result bit vector; A method comprising:

2. Generating the result bit vector further includes generating an index of the result bit vector for identifying a first match of the reference string in the target string based on the result bit vector, and generating a status code identifying a type of match found based on the result bit vector. The method of claim 1 , comprising:

3. Performing the fault detection further includes comparing the result bit vector to a first row of the M by M matrix and identifying an error when the result bit vector differs from a subset of the first row of the M by M matrix. The method of claim 2 , comprising:

4. generating a zero-detect vector having a value indicative of a terminal element of the target string; and comparing the result bit vector to the zero-detect vector, the fault detection further comprising identifying an error when a bit indicative of a match in a result bit vector is greater than the bit position in the result bit vector of the bit indicative of the terminal element of the target string. The method of claim 2 , comprising:

5. and performing fault detection further comprising determining a matchable region within the target string and comparing the result bit vector to the matchable region, the performing fault detection further comprising identifying an error when the status code indicates a full match and the matchable region within the target string is set to zero. The method of claim 2 comprising:

6. 3. The method of claim 2, wherein performing the fault detection further comprises identifying an error when the result bit vector is misaligned within a vector element.

7. 7. The method of claim 6, wherein a misalignment is detected if at least one byte of the resulting bit vector that is different from a first byte of the vector element is set to one.

8. the method further comprising: generating a zero-detect vector having a value indicative of a terminal element of the target string; comparing the status code with the generated index; and comparing the status code with the zero-detect vector, wherein the fault detection further comprises: (a) identifying an error when the status code indicates (1) a full string match is not found, (2) a partial match is not found, and (3) a terminal element is not found, or (b) (1) the generated index indicates a first match, or (2) the zero-detect vector has a bit value of 1 indicating the terminal element of the target string. The method of claim 2 , comprising:

9. The fault detection further comprises identifying an error when (a) the status code indicates that a full string match is not found, and a partial match is not found, and the terminal element is found, or (b) the generated index indicates a first match or the zero-detect vector has all bits equal to zero, indicating that there is no terminal element of the target string. The method of claim 8 , comprising:

10. performing fault detection further includes determining a match type based on the result bit vector; comparing the status code to the generated index; and comparing the status code to the determined match type, wherein performing fault detection identifies an error when: (a) the status code indicates that a full string match was found; or (b) (1) the generated index indicates that no match was found; or (2) the result bit vector indicates that a partial match was found. The method of claim 8 , comprising:

11. Performing the fault detection further comprises: (a) identifying an error if the status code indicates that a partial match was found and not a full match was found, or (b) identifying an error if (1) the generated index indicates that no match was found, or (2) the result bit vector indicates that a full match was found.

11. The method of claim 10, comprising:

12. 1. A processor unit for detecting faults in a substring search operation, the processor unit comprising: a plurality of vector registers, each of which is a vector element of M, said vector elements being n bits for encoding a character; an M×M matrix of comparators for character-wise comparing elements of a first register storing reference strings of a plurality of said vector registers with elements of a second register storing target strings of a plurality of said vector registers; a result generating logic for generating a result bit vector indicating characters of the target string that fully match the reference string and indicating characters of the target string that partially match the reference string; fault detection logic for performing fault detection in the substring search operation using the result bit vector; A processor unit including:

13. Generating the result bit vector further includes generating an index of the result bit vector for identifying a first match of the reference string in the target string based on the result bit vector, and generating a status code indicating a type of match found based on the result bit vector.

13. The processor unit of claim 12, comprising:

14. Performing the fault detection further includes comparing the result bit vector with a first row of the M by M matrix and identifying an error if the result bit vector differs from the first row of the M by M matrix.

14. The processor unit of claim 13, comprising:

15. and zero-detect logic for generating a zero-detect vector having a value indicative of a terminal element of the target string, and performing the fault detection further includes identifying an error when a bit position in the result bit vector of a bit indicative of a match is greater than a bit position in the zero-detect vector of a bit indicative of a terminal element of the target string.

14. The processor unit of claim 13.

16. the fault detection logic determining a matchable region in the target string and comparing the result bit vector to the matchable region, and performing the fault detection further includes identifying an error when the status code indicates a full match and the matchable region in the target string is set to zero.

14. The processor unit of claim 13.

17. 14. The processor unit of claim 13, wherein performing the fault detection further comprises identifying an error when the result bit vector is misaligned within a vector element.

18. 20. The processor unit of claim 17, wherein a misalignment is detected when at least one byte of the resulting bit vector that is different from a first byte of the vector element is set to one.

19. The method further includes zero-detection logic for generating a zero-detection vector having a value indicative of a terminal element of the target string, and performing the fault detection includes identifying an error if (a) the status code indicates that a full string match was not found, a partial match was not found, and a terminal element was not found, or (b) (1) the generated index indicates a first match, or (2) the zero-detection vector has a bit value of 1 indicative of the terminal element of the target string.

14. The processor unit of claim 13.

20. 1. A computer program product for detecting faults in a substring search operation, the computer program product causing a computer to: providing use of a processor unit including vector registers each for M vector elements, said vector elements being n bits for encoding a character, and an M×M matrix comparator for character-wise comparison of elements of a reference string stored in a first one of said vector registers with a target string stored in a second one of said vector registers; generating a result bit vector using the comparisons performed by the M×M matrix to indicate characters of the target string that fully match the reference string and to indicate characters of the target string that partially match the reference string; and performing fault detection in said substring search operation by using said result bit vector; A computer program that executes the following:

Citation Information

Patent Citations

  • Kanji word comparing system

    JP1977087940A

  • Electronic mail transfer device

    JP2000010880A

  • Error Correction Method and Apparatus for Low Density Parity Check

    US20070260966A1

  • String dataflow error detection

    US20160210182A1

  • Vector monitor, related method of controlling a transmitter and transmitter employing the same

    US7076698B2