EP0352279A1 - Parallel string processor and method for a minicomputer - Google Patents
Parallel string processor and method for a minicomputerInfo
- Publication number
- EP0352279A1 EP0352279A1 EP88902641A EP88902641A EP0352279A1 EP 0352279 A1 EP0352279 A1 EP 0352279A1 EP 88902641 A EP88902641 A EP 88902641A EP 88902641 A EP88902641 A EP 88902641A EP 0352279 A1 EP0352279 A1 EP 0352279A1
- Authority
- EP
- European Patent Office
- Prior art keywords
- register
- string
- shift register
- bit
- byte
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/30007—Arrangements for executing specific machine instructions to perform operations on data operands
- G06F9/30021—Compare instructions, e.g. Greater-Than, Equal-To, MINMAX
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/90335—Query processing
- G06F16/90344—Query processing by using string matching techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/02—Comparing digital values
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2207/00—Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F2207/02—Indexing scheme relating to groups G06F7/02 - G06F7/026
- G06F2207/025—String search, i.e. pattern matching, e.g. find identical word or best match in a string
Definitions
- the present invention relates generally to computer systems for processing strings of data, and also to a parallel string processor for a minicomputer and a method of searching strings of bits and bytes for the presence of a desired keyword.
- Prior art computers and microprocessors process data strings one byte at a time.
- One of the most frequently occurring processing tasks is to attempt to locate one or more control characters in a data string.
- Prior art systems compare the data one byte at a time to the control or reference characters which are loaded into a CPU (central processing unit) register. After a byte is compared, the data string is rotated one byte so that the next byte in the data string is compared, continuing until all bytes are compared.
- search and replace operations are also used in connection with automatic spelling check programs that are offered by many commercially available word processing programs.
- each letter of the alphabet as well as each symbol such as an asterisk or hyphen is represented as a unique string of eight 1 or 0 logic bits, also known as a byte.
- the corresponding bits in each byte are compared to determine whether they are the same. If all of the bits in the two byte strings are identical, the two byte strings represent the same word.
- a portion of text can be thought of and is represented as a long, continuous string of bytes, one byte for each letter appearing in the portion of text. To determin whether a particular word, or "keyword,” appears in portion of text, current string processors typically
- the keyword does not usually appear as th first word in the portion of text being searched. Consequently, one of the bytes of the keyword will not matc one of the bytes in the character string (the keyword is not the first word in the portion of text) .
- the character string is shifted one byte relative to the keyword so that the first byte of the keyword is compared "to the second byte of the character string. If these two bytes match, then the second byte of the keyword is compared to the third byte of the character string, and so on. If one of the pairs of bytes do not match, then the character string is again shifted one byte relative to the keyword so that the first byte of the keyword is now compared to the third byte of the character string. This general process repeats, usually until all occurrences of the keyword in the portion of text have been found.
- these encryption and decryption algorithms may perform similar search and replace operations as described above in connection with word processing programs.
- Processors such as those described above in connection with word processing programs do not even have this capability since they shift strings of bits eight bits, or one byte, at a time. Even if such processors had the capability to shift strings of data one bit at a time, their use as described above on strings of bits would be even slower due to the large number of comparisons that would be necessary.
- the bit string "11001110011011" is to be searched for the presence of the keyword "1101." Initially, as described above, the first bit of the keyword would be compared to the first bit in the bit string as set forth below:
- the processor would need to make four comparisons before it could determine that the four bits in the keyword do not match the first four bits in the bit string. Again, as described above, the processor would then shift the bit string relative to the keyword string as set forth below and compare the respective bits again:
- bit string the "4" above the first "1" in the bit string means that four comparisons were required in order to determine that the keyword did not match. After the keyword was shifted as shown above, two comparisons would be required to test the next portion of the bit string. As shown below, 22 comparisons would be needed to find the portion of the bit string that matched the keyword.
- the present invention comprises a portion of a computer system for comparing a number of bytes simultaneously.
- the parallel processor of the present invention includes a first register for receiving bytes of data, a second register for storing a number of copies of a byte representing a selectable control or reference character and a comparison circuit for simultaneously comparing the data in the two registers to determine whether any of the bytes in the first register are equal to the bytes representing the control character in the second register, and generating control bits which are in a first state if the corresponding byte in the first register is equal to the control character in the second register, and in a second state when the corresponding byte in the first register is not equal to the control character in said second register.
- the parallel byte processor has the ability to branch to a predetermined memory location if any of the byte pairs being simultaneously compared are equal. If any byte of data in the first register is equal to the bytes comprising the control characters in the second register, the microcode instruction branches or proceeds to a predetermined memory location.
- the instruction branches or proceeds to a second predetermined memory location.
- a number of bytes may be moved and checked for control characters with a single instruction, thereby substantially reducing the processing time.
- eight bytes of data are simultaneously compared.
- Another aspect of the invention is directed towards a novel parallel bit and byte string processor for a minicomputer.
- the processor In its byte mode, stores a portion of a string of bytes that is to be tested for the presence of a desired keyword in a first register location and stores the keyword in a second register location. Instead of testing the portion of the byte string one byt at a time, the processor simultaneously tests each byte i the keyword with a respective byte in the byte string Thus only -a single comparison is required to determin whether the keyword is present in any portion of the byt string. If the keyword is not present in the portion of th byte string tested, then the processor shifts the byt string with respect to the keyword and then makes a singl comparison of the keyword with the new portion of the byt string.
- This single-compare-and-test process continue until either the keyword is found or the end of the byt string is reached.
- the processing time is kept to an absolute minimum.
- the processor stores portion of a bit string that is to be tested for th presence of a desired string of bytes in a first registe location and the desired keyword in a second registe location.
- the processor simultaneously tests each bit i the keyword with a respective bit in the bit string. As result of this simultaneous testing, only one comparison i needed to determine whether the keyword is present in th portion of the bit string being tested.
- the bit string is shifted one bit relative t the keyword and a single comparison of the keyword with th new portion of the bit string is made. This proces continues until the keyword is found or until the end of th bit string is reached. Because each bit in the keyword i simultaneously tested with a respective bit in the bi string, only a single comparison is required to determin whether the keyword matches a portion of the bit string, an as a result, processing time is minimized.
- Another feature of the invention is the capability o the processor to automatically function either as a paralle bit processor or as a parallel byte processor.
- the processo When th processor is given a first control signal, the processo functions as a parallel byte processor, and when th processor is given a second control signal, the processo functions as a parallel bit processor.
- tw separate processors are not required, thus resulting in cos saving that a separate processor would otherwise entail.
- FIG. 1 and 2 are block diagrams of two registers of the parallel byte comparison processor
- Fig. 3 is a circuit diagram of the comparison circuit of the parallel byte comparison processor
- Fig. 4 is a representative instruction sequence of the parallel byte comparison processor
- Fig. 5 is a schematic circuit diagram of a parallel string processor in accordance with the invention
- Fig. 6 is a detailed circuit diagram of a portion of one embodiment of a shift register in accordance with the invention.
- Fig. 7 is a detailed circuit diagram of a portion of the parallel string processor of Fig. 5;
- Fig. 8 is a detailed flowchart of the operation of the parallel processor of Fig. 5 in its byte mode of operation;
- Fig. 9 is a detailed flowchart of the operation of the parallel processor of Fig. 5 in its bit mode of operation.
- a selected control character such as "EOS" (end of sector)
- EOS end of sector
- a selected control character such as "EOS" (end of sector)
- an 8-byte (64 bit) data string is loaded into a Register B and compared to the "EOS" reference characters in Register A in order to determine whether there are any "EOS” characters in any byte of the data string in the Register A.
- the results of the comparison whether any particular byte of Register A matches the corresponding byte in Register B, is stored in a Processor Status Register 100 (also referred to as the "hit register") .
- any number of bytes may be simultaneously compared, the number depending on the particular computer system utilized.
- the computer is a 64-bit machine; therefore, 8 bytes are simultaneously compared to determine whether they contain a control character.
- Fig. 3 is a functional diagram to illustrate the invention. In the actual embodiment, an arithmetic logic unit (ALU) is utilized to perform the exclusive-OR function as shown in Fig. 5 and discussed in further detail hereinafter.
- ALU arithmetic logic unit
- the components of the exclusive-NOR circuit 109 ar also shown in Fig. 3 as comprising first and second AN gates 110 and 111, first and second inverters 112 and 113, and OR gate 114.
- the bit pairs for example, A77 and B77, are input to the AND gate 110.
- the bits A77 and B77 are also inverted by inverters 112 and 113, respectively, and are input into the second AND gate 111 of the exclusive-NOR circuit.
- the output of the first AND gate 110 and the output of the second AND gate 111 are input to the OR gate 114.
- the output of each OR gate is provided as an input to one of eight 8-input NAND gates 115-122 (the NAND gates 116- 121 are not shown) .
- the output of any of the 8-input NAND gates 204-210 will be low or logical "0" only when all eight bits being compared are equal and thus will indicate that the particular byte pair is equal to each other (e.g., when all the bits A00-A07 of the Register A are equal to the corresponding bits B00-B07 of the Register B, the output of the 8-input NAND gate 115 will be low) .
- An instruction causes the system to branch or proceed to a predetermined memory location when any of the bits in the Processor Status Register 100 indicate that any of the eight bytes being compared are equal. Alternatively, if there are no bits in the Processor Status Register 100, indicating that no byte pairs match and no control character was found, the system proceeds to execute the instruction found in the next sequential memory location in the control memory of the processor. If a hit occurs, the location of the particular bytes which do match can be determined by looking at which bits of the Processor Status Register 100 indicate a match. For example, if byte 3 of the Register A is equal to byte 3 of the Register B, bit 3 in the Processor Status Register will be zero, indicating that the byte 3 pair matches.
- Fig. 4 shows a representative instruction sequence.
- the left column corresponds to the line number in the control program of the processor.
- the instruction at line 80 causes the control character being compared to be loaded into the Register A.
- the instruction at line 82 causes the loading of Register B with the first eight bytes of data (data word 1, indicated as "DATAl” in Fig. 4) .
- the instruction at line 84 performs the multibyte "exclusive- NOR" operation of the present invention on the data in the Register B and the Register A.
- the instruction at line 86 causes the system to branch to a memory location 400 if any of the bits in the Processor Status Register 100 (Fig. 2) are zero indicating that a match was found between the Registers A and B.
- At memory location 400 which is executed if a hit is found, is the beginning of a routine which examines the bits of the Processor Status Register 100 to determine the location of the characters within data word 1 which match the control character "EOS" for example.
- Register A is loaded with a second control character and at line 90 the exclusive-NOR operation is performed to determine whether the second control character is present in any of the eight bytes of data in DATAl. If the second control character is found in DATAl, then at line 92 the program branches to memory location 400.
- the instruction at line 94 is executed and the data in Register B is stored in a buffer. Thereafter, the system proceeds to execute the instruction at line 80 and the process described above repeats. Thus, eight bytes are checked for two different control characters with only two compare cycles in contrast to the 16 compare cycles require in prior art machines.
- a "branch on no-hits” may be utilized as an undose "branch on any hit" instruction, which branches to memory location if none of the bytes in the data wor contain the control character.
- the Register A When the data is checked for more than one set o characters, the Register A may be reloaded with th characters for each compare sequence. However, to increas the execution speed, reloading the register may be avoide by various methods known to those skilled in the art.
- An n to-1 multiplexer may be substituted for the Register A, where n is the number of character sets to be searched fo in the data. For example, if the data is to be searched fo two sets of characters, "EOS" and "CR,” a 2-to-l multiplexe may be utilized, with the registers containing "EOS" and
- the architecture of the CPU permits the selection of the desired register for input to the exclusive-NOR circuit. Instructions cause the CPU to route the contents of the selected register to the exclusive-NOR circuit. Alternatively, tri-state devices may be utilized.
- an arithmetic logic unit (ALU) is utilized to perform the exclusive-OR function.
- the End of Sector (EOS) or other control characters are loaded into the A register file.
- the data which is to be searched for the End of Sector flag is loaded in register B via the B bus 172.
- the EOS flag is input to the ALU through the A latch 142 and the data to be compared to determine whether it contains "EOS" characters is input to the ALU through B latch 144.
- the ALU compares each bit of input from the A register to the corresponding bit of input from the B register. For each matching bit pair, the ALU will generate a zero on the respective output line.
- the output of the ALU is input to the zero detect circuit (which comprises 8-input NOR gates) via the F bus 148.
- the zero detect circuit determines whether all of the bits within a byte are zero.
- a one is generated by the zero detect circuit indicating that a particular byte from the register matches the byte from the B register.
- the foregoing embodiment utilizes inverse logic from th illustrative circuit shown in Fig. 3. In the circuit show in Fig. 3, a zero is generated when the byte pairs match.
- a parallel string processor in accordance with anothe aspect of the invention is shown in Fig. 5.
- the processo includes a dual register file 120 comprising an A registe file and a B register file. Although only nine registers are shown in each register file, each register file includes 1024 registers, and may include more if desired. In this embodiment, the processor of Fig.
- the register file is shown to include an address register 122, a length register 124, a bit mask register 126, a byte mas register 128, and a test register 130.
- the address registe 122 is used to store the address of a data string, either a bit string or a character string, that is to be searched by the processor for a particular keyword.
- the length register 124 is used to store the length of the portion of the data string that remains to be tested.
- the bit mask register 126 is used to store a desired pattern of bits that is used to mask the keyword.
- bit mask register 126 might be used to ignore capital letters so that the processor would consider the letter "a” to be equivalent to the letter "A.”
- the byte mask register 128 contains a desired pattern of bytes used to mask the keyword. For example, the byte mask register 128 might be used to ignore the second letter of a word so that the processor woul equate the word "string” with "spring.”
- the test register 130 contains the desired keyword after it has been maske with the desired byte mask.
- the B register file contains a bit count register 13 and a byte count register 134 which, as is explained in mor detail hereinafter, determine when the next portion of th data string being tested for the presence of the keywor needs to be fetched from memory.
- a keyword register 136 contains the binary data string corresponding to the desire keyword, and the end-of-string (END) flag register 138 contains a flag that indicates whether or not a data strin has been completely searched for the presence of a desired keyword.
- the A and B register files are connected to an arithmetic logic unit (ALU) 140 through an A latch 142 and a B latch 144, respectively.
- the ALU 140 is a conventional arithmetic logic unit, which in this embodiment may include SN54LS381A ('381), SN54LS382 (*382), or similar integrated circuit chips commercially available from Texas Instruments of Dallas, Texas.
- the arithmetic logic unit 140 performs various operations on the data supplied to its dual data inputs, depending upon the combination of binary signals supplied to its control inputs by an ALU function select circuit 146. For example, when the ALU 140 receives a particular combination of control inputs, the ALU 140 adds its two data inputs. In response to a different combination of its control inputs, the ALU 140 performs an exclusive-or operation on its data inputs.
- the A and B register files are designed so that at any time, the binary information stored in each register is equal to the binary information stored in its adjacent register so that the A register file is a copy of the B register file, and vice-versa.
- This register organization speeds up the operation of the processor. In order to perform an operation on two operands, one operand must be transmitted to the A latch 142 and the other to the B latch 144. If there were only an A register file, the processor would require an extra cycle to perform any given ALU operation.
- the output of the ALU 140 is connected via an 64-bit- wide F-bus 148 to a zero-detect circuit 150 which detects 5 when all the outputs of the ALU 140 are zero.
- the ALU 140, ALU function select circuit 146, and zero detect circuit 150 are shown in detail in Fig. 7.
- the ALU function selec circuit 146 is shown functionally (in dotted lines) fo purposes of explaining the invention. In reality, th
- function select circuit 146 is implemented with programmabl array logic integrated circuits commercially available fro Monolithic Memories, Inc. of Santa Clara, California, tha are programmed with many equations that do not facilitat explanation. These equations are, however, included in thi - 15 specification as Appendix 1, and they completely describ the actual embodiment of the ALU function select circui 146.
- the ALU comprises 16 separate, 4-bit "381 integrate circuit chips 152. For purposes of clarity, the data input
- each pair of the chip 152 is connected to a respective multiplexer 154 whic supplies the control inputs for the chips 152.
- multiplexers 154 either supplies a desired 3-bit FUNCTIO signal or a 3-bit CLEAR signal to the control inputs of th pair of chips 152 to which it is connected, depending upo the value of its address signal sent from a register 15 which stores the 8 bits of the byte mask.
- the byte mask causes the processor to ignore certai bytes in the data string being searched so that, fo example, the processor would equate the keyword "string” with the word “spring” in the data string, in which case th second bit of the byte mask would be set to logic "1" s
- the fourth bit of the byte mask would be set to logic "1.
- the multiplexers 154 either supply a specified FUNCTIO signal or a CLEAR .signal to the chips 152, depending upo -whether- the value of the particular bit of the byte mask i the register 156 is logic "1" or "0.” If the bit in the byt mask is logic "0,” the desired 3-bit FUNCTION signal i transmitted, and if the bit in the byte mask is logic "1,” the 3-bit CLEAR signal is sent, which causes the outputs of the ALU chips 152 to which it is connected to be forced to logic "0.”
- the zero detect circuit 150 comprises 16 NOR gates 158 connected to receive the outputs of the ALU chips 152.
- the outputs of the NOR gates 158 are connected to eight AND gates 160, which in turn are connected to a pair of NAND gates 162 which are connected to a NOR gate 164.
- the particular logic gates used in the zero detect circuit 150 are not important to the invention since other circuits could be easily designed to detect that all outputs of the ALU chips were logic "0," such as, for example, a single 64-bit NOR gate.
- the F-bus 148 is connected to an A-bus 168 via a buffer 170 and a B-bus 172 via another buffer 174.
- the zero-detect circuit 150 is coupled to the B-bus 172 through a buffer 176.
- a memory 178 is connected to the bus 180 that connects the output of the A latch 142 to the ALU 140 through a buffer 182 connected to an M-bus 184. Because this embodiment is for a 64 bit minicomputer, the A-bus 168, the B-bus 172, and the M-bus 184 are also 64 bits wide.
- a pair of serially connected 64-bit shift registers comprising a J shift register 186 and a K shift register 188 are connected to the B-bus 172.
- a mask register 190 is connected to the J shift register 186 via a mask bus 192. As is explained in more detail below, these shift registers are used to store portions of the data string to be tested for the presence of a desired keyword.
- a trio of control signals is supplied to each of the two shift registers 186, 188.
- a LOAD signal causes the register to which it is attached to be parallel-loaded with a portion of a data string.
- the data is loaded into the registers 186, 188 from the memory 178 through a data route consisting of the ALU 140, the F-bus 148, the buffer 174, and the B-bus 172.
- a second signal Si causes its respective shift register to be shifted left one bit
- a third signal S8 causes its respective shift register to be shifted left eight bits, or one byte.
- Fig. 6 is a portion of a substantially functional equivalent of the J shift register 186 used for purposes of explaining the invention.
- the actual embodiment of the J and K shift registers 186, 188 comprises specially programmed conventional programmable array logic integrated circuits commercially available from Monolithic Memories, Inc. of Santa Clara, California, and the equations used to program these integrated circuits are included in this specification as Appendix 2 and completely describe the actual embodiment of the J and K shift registers 186, 188.
- a portion of the J shift register 186 consisting of logic gates and flip-flops 196 is shown. Although only six flip-flops 196 are shown, the J shift register 186 is 64 bits wide and thus includes 64 serially connected flip-flops 196. In Fig. 6 the flip-flops 196 are numerically ordered, with the rightmost flip-flop being the Nth flip-flop, the flip-flop to the left of the Nth flip-flop being the (N+l)st flip-flop, etc. Each of the flip-flops 196 has a data input D connected to the output of a logic circuit 198 and a clock input C connected to receive a CLOCK signal that controls the speed of operation of the shift registers 186, 188.
- the logic circuits 198 control the loading and shifting operations of the flip-flops 196.
- Each of the logic circuits 198 comprises a three-input OR gate 200 and three two-input AND gates 202.
- One of the AND gates 202a has a first input connected to one of the 64 lines of the B-bus 172 and its second input connected to the LOAD signal.
- This AND gate 202a in each of the logic circuits 198 causes the flip-flop to which it is connected to be loaded with the binary value of the B-bus 172 when the LOAD signal is activated, which occurs when the LOAD signal is logic "1."
- the output of the AND gate 202a which equals the binary value of the B-bus input, is supplied to its respective flip-flop 196 through its OR gate 200.
- the outputs of the other two AND gates 202b, 202c do not interfere with this loading process since the SI and S8 signals are forced to logic "0" when the LOAD signal is activated.
- the portion is periodically shifted either one bit or eight bits at a time, depending on whether the processor is performing a bit-by-bit comparison or a byte-by-byte comparison. If bit comparisons are being performed, the SI signal is activated to logic "1" while the LOAD and S8 signals remain at logic
- Each AND gate 202c to which the Si signal is supplied has its other input connected to the output of the first upstream flip-flop, "upstream” meaning the direction from which data is being shifted.
- upstream meaning the direction from which data is being shifted.
- the first "upstream” flip-flop is the first flip-flop to the right of the circuit element
- the first "downstream” flip-flop is the first flip-flop to the left of the circuit element.
- the activation of the SI signal causes the shift registers 186, 188 to perform a one- bit logical left shift on the portion of the data string stored therein.
- the activation of the S8 signal causes an eight-bit, or one-byte, logical left shift to be performed by the shift registers 186, 188.
- Each AND gate 202b to which the S8 signal is connected has its other input connected to the output of the eighth upstream flip-flop so that when the S8 signal is logic "1," the output of each of the flip-flops 196 is passed to the eighth respective downstream flip-flop so that the portion of the data string is shifted eight bits to the left.
- Another portion of the J shift register 186 performs a bit mask operation so that any desired bits of the string being searched may be ignored. For example, as described above, it might be desirable to ignore capital letters so that the processor would consider the letter "a" to be equivalent to the letter "A.”
- the output of each of the flip-flops 196 is supplied to one input of a two-input AND gate 204 having its other input connected to receive the output of a NAND gate 206.
- One input of the NAND gate 206 is connected to receive a respective bit of the bit mask from the mask register 190 connected to the J shift register via the mask bus 192.
- the NAND gate 206 is also connected to receive a BIT MASK ENABLE signal that selectively activates or deactivates the bit mask operation.
- each of these logic "0"s causes a forced match when the masked portion of the data string is compared to the keyword string by the processor.
- the output of each of the AND gates 204 is connected to the B-bus 172 so that the masked or unmasked portion of the data string stored in the shift registers may be supplied to the ALU 140 for comparison to the keyword string.
- the particular logic used for the masking functions is not important, and alternative logic could be used.
- bit mask enable signal would be activated when logic "0" instead of logic "1.”
- the functional circuit diagram of the K shift register 188 is substantially identical to the diagram of the J shift register shown in Fig. 6, except that the AND gates 204 and the NAND gates 206 used in connection with the bit mask and the BIT MASK ENABLE signal are not required since only the output of the J shift 186 register is sent to the ALU 140 for comparison to the keyword, as is explained in more detail below.
- the processor compares a selected string of bytes to determine the presence of a selected keyword. Both the byte string and the keyword ar selectable by the user of the processor.
- the basic process by which the processor tests for the presence of a selecte keyword string within a selected data string includes initially loading the J and K shift registers 186, 188 with the first portion of the data string to be tested.
- the entire contents of the J shift register 186 are simultaneously compared with the keyword stored in the test register 130. If there is a match, the presence of a matc is indicated by the processor. Then, the contents of the and K registers 186, 188 are shifted left one byte and th contents of the J register 186 are again compared with th contents of the test register 130. Any match is indicated, and the process is repeated. Periodically, the K registe 188 will become empty since its contents are graduall shifted into the J register 186, and so the K register wil be periodically reloaded with the next portion of the dat string to be tested. In this manner, the entire keyword is simultaneously compared with a corresponding portion of th data string.
- this particular example required 14 comparisons to find the keyword "the” in the character string "that time is the essence” in contrast to the 21 comparisons that were required by a conventional data string processor as show above. This reduction results from the entire keywor -23- simultaneously being compared with a portion of the dat string, instead of being compared one byte at a time.
- Fig. 8 is a flowchart of the microcode that controls th operation of the processor shown in Fig. 5, and Table 1 includes a software program that is substantiall functionally equivalent to the microcode actually used. The operation is explained with reference to Table 1 and not the actual microcode used because the actual microcode would be incomprehensible since it is merely a collection of "l"s and "0"s.
- the binary representation of the keyword is stored in the keyword register 136 in the B register file and the binary representation of the data string is stored in the memory 178.
- the desired bit mask is stored in the bit mask register 126 and in the mask register 190
- the desired byte mask is stored in the byte mask register 128 and in the register 156
- the address of the byte string in memory 178 to be searched is stored in the address register 122
- the length in bytes of the byte string being searched is stored in the length register 124.
- the value of the end-of-string (END) flag indicates whether or not the data string has been completely searched for the presence of the keyword.
- th value of the END flag is reset to indicate that the end o the string has not yet been reached.
- th keyword is masked with the bit mask to ensure that th piocessor ignores any bits in any desired byte as selecte by the user.
- This step is carried out by instructions 2-5 of Table 1. Instructions 2 and 3 supply the bit mask to one data input of the ALU 140 and the keyword to the other data input. Instruction 4 causes the appropriate control signal to be supplied to the ALU so that its two data inputs are logically "anded" together, and the ALU output, which is the value of the masked keyword, is stored in the test register
- any bits of the keyword which are to be ignored by the processor are masked to logic "0,” and these masked zero bits will force a match with the corresponding bit position in the data string during subsequent comparisons as is explained in more detail below.
- the J shift register 186 is loaded with the first word of the data string to be tested, "word" meaning a block of binary data eight bytes long to correspond to the eight byte width of the J shift register
- step 216 is accomplished by instruction 6 in Table 1 which moves the contents of the memory at the address where the data string is stored to the J shift register 186 through a path including the memory buffer 182, the M-bus
- step 218 the next word, or eight bytes, of the data string are loaded into the K shift register 188 from the memory 178 in a similar manner by instructions 7-11. Specifically, instructions 7-10 cause the address to be incremented by eight so that the incremented address will point to the next eight bytes of the data string in memory 178. Then instruction 11 causes the next eight bytes to be fetched from memory 178 and put into the K shift register 188 via the same data path as described in connection with the loading of the J shift register 186.
- the numeric value eight is stored in the byte count register 134 since there are now eight bytes of string data in the K register 188. Because the contents of the K register 188 are periodically shifted left into the J shift register 186, it is important to know how many bytes of the data string are left in the K register 188 so that the processor will know when to reload the K register with the next portion of the data string.
- step 222 the masked keyword stored in the test register 130 is compared to the portion of the data string stored in the J register 186.
- This step is implemented by the instructions 13-16 of Table 1. Specifically, instruction 13 causes the masked keyword stored in the test register 130 to be sent to the A latch 142. Then, instruction 14 causes the contents of the J shift register 186 to be moved to the B latch 144 via the B- bus 172. If the BIT MASK ENABLE signal is logic "1," then the contents of the J register 186 are logically "anded” with the bit mask by the AND gates 204 prior to being sent to the B latch 144.
- the binary value of the masked keyword is compared to the binary value of the masked portion of the data string by providing the ALU FUNCTION signal with the binary values that cause the ALU 140 to perform a bit-by-bit logical "exclusive-or" of its two data inputs.
- the logical exclusive-or operation which is conventional and well known, is a sum modulo 2 operation.
- a bit-by-bit logical exclusive-or provides a logic "0" output if its two bit inputs are both logic “1” or logic “0,” and hence match, and a logic "1” output if its two bit inputs are different.
- a logic "0" will be produced in the corresponding byte position.
- the processor proceeds to the user's program so that the user program may perform its programmed function, for example, replace the keyword that was located with a different word, whereupon the user program returns control to the processor so that any other occurrences of the keyword can be found.
- the existence of a match is determined by the zero detect circuit at instruction 16.
- Instruction 16 causes the contents of the ALU 140 to be sent to the zero detect circuit 150.
- the zero detect circuit 150 tests each byte of the ALU to determine whether all bytes are zero, in which case all unmasked bytes of the keyword match all unmasked bytes of the data string portion.
- the ALU output corresponding to each masked byte is forced to logic "0," which is the same logical output that the ALU provides in case of a match.
- each logic "1" bit in the byte mask forces a match in its corresponding byte position in the keyword.
- instruction 18 Upon a match, instruction 18 will cause a return to the user's program, and the user program will return control to the processor at instruction 19. If there is no match, instruction 17 will cause instructions 18 and 19 to be skipped.
- the length of the data string will be decremented by one byte since one byte has just been tested and thus there is one less byte in the data string that needs to be tested.
- This step is implemented by instructions 20-23.
- Instruction 20 causes the number one to be moved to the B latch 144, and instruction 21 causes the current data string length to be sent to the A latch 142.
- Instruction 22 causes the ALU 140 to subtract one from the current length, and the new length is stored in the length register 124 by instruction 23.
- step 2208 the new data string length stored in the length register 124 is tested to determine whether all of the bytes in the data string have already been compared to the keyword, which will be the case if the numeric value of the length is zero. This is accomplished at instruction 24 which sends the output of the ALU 140 to the zero detect circuit 150. If the value of length is zero, then step 230 is executed, causing the END flag to be set to logic "1" to indicate that the end of the string has been reached, and control is returned to the user's program. This is accomplished by instructions 26 and 27.
- step 232 the program branches to step 232 at which the contents of the J and K registers 186, 188 are shifted left by one byte. This is accomplished by instruction 28, which causes a logic "1" S8 signal to be sent to the shift registers 186, 188 so that their contents are shifted left one byte as explained above.
- the contents of the byte count register 134 are then decremented by one at step 234 to indicate that there is one less byte in the K shift register 188 since it has just shifted one of its bytes into the J shift register. This step is accomplished by instructions 29-31.
- Step 236 the numeric value of byte count is tested to determine if it is zero, in which case the next eight bytes of the data string need to be moved from the memory 178 into to K shift register 188, and so the program branches back to step 218 so that the K shift register 188 is reloaded. If the byte count is nonzero, the shift register 188 does not need to be reloaded, and the program branches to step 222 so that the current portion of the data string in the J register 186 may be compared to the masked keyword.
- Step 236 is executed by instructions 32-35. Instruction 32 causes the contents of the ALU 140 to be sen to the zero detect circuit 150. If the zero detect circui
- instruction 150 detects a zero, instruction 33 causes a branch t instruction 7.
- Instruction 34 saves the decremented valu of the byte count if it is nonzero, and instruction 35 causes a branch back to instruction 13.
- the bit mode of operation of the processor is generally similar to its byte mode of operation. In its bit mode of operation, the processor compares a selected string of bits to determine the presence of a selected keyword. Both the bit string and the keyword are selectable by the user of the processor.
- the basic process by which the processor tests for the presence of a selected keyword within a selected bit string includes initially loading the J and K shift registers 186, 188 with the first portion of the bit string to be tested. Then, the entire contents of the J shift register 186 are simultaneously compared with the keyword stored in the test register 130. If there is a match, the presence of a match is indicated by the processor.
- the contents of the J and K registers 186, 188 are shifted left one bit and the contents of the J register 186 are again compared with the contents of the test register. Any match is indicated, and the process is repeated.
- the K register 188 will become empty since its contents are gradually shifted into the J register 186, and so the K register 188 will be periodically reloaded with the next portion of the bit string to be tested. In this manner, the entire keyword is simultaneously compared with a corresponding portion of the bit string.
- this particular example required only 10 comparisons to find the keyword "1101" in the bit string "11001110011011” in contrast to the 22 comparisons that were required by a conventional bit string processor as shown above. This reduction results from the entire keyword simultaneously being compared with a portion of the bit string, instead of being compared one bit at a time.
- bit mode of the processor is very similar to the byte mode, and can be understood with reference to Fig. 9 and Table 2 set forth below.
- Fig. 9 which is a flowchart of the microcode that controls the operation of the processor, is very similar to the flowchart of Fig. 8, except that in a number of instances different operations are executed since the processor is in its bit mode of operation and not its byte mode.
- the software implementation set forth in Table 2 is very similar to that of Table 1, so that only the differences need be explained to provide a clear understanding of the detailed operation of the bit mode of operation.
- the contents of the bit count register 132 are set to 64 since the K shift register 188 will be shifted one bit at a time and 64 bits are initially loaded into the K register 188.
- the contents of the J and ⁇ K shift registers 186, 188 are shifted left one bit instead of byte.
- the contents of the bit count register 132 instead of the byte count register 34 are decremented by one.
- the conditional branch occurs when the value of the bit count register 132 has reached zero, and not the byte count register 134.
- the two modes of operation just described are invoked by a user by including appropriate software instructions in the user's program. Specifically, the byte mode of operation is invoked by the instruction "SCANS” and the bit mode of operation is invoked by the instruction "BITSCAN.”
- Two further embodiments of the invention are identical to the embodiment just described, except that they are directed towards 16 and 32 bit parallel processors, respectively.
- the differences between these embodiments include the data width of the buses, buffers, ALU, A and B latches, and registers. Otherwise, the operation of these additional embodiments is the same.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computational Mathematics (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Executing Machine-Instructions (AREA)
Abstract
Un processeur en parallèle de chaînes alphanumériques dans un mini-ordinateur examine des parties de texte ou des chaînes binaires à la recherche de mots ou de chaînes binaires voulus. Le processeur comprend un premier registre (136) dans lequel est enregistrée une chaîne comportant un mot-clé et une paire de registres à décalage interconnectés (186 et 188) dans lesquels est enregistrée la chaîne que l'on doit rechercher afin de retrouver le mot-clé. Une unité logique arithmétique (140) compare le contenu du premier registre avec l'un des registres à décalage afin de déterminer si le mot-clé est présent dans la partie de la chaîne en train d'être examinée. Après cette compression, le contenu des registres à décalage interconnectés est décalé par rapport au mot-clé enregistré dans le premier registre. Lorsque le processeur recherche un mot-clé ayant un nombre prédéterminé d'octets, le contenu des registres à décalage est décalé d'un octet à la fois, et lorsque le processeur recherche un mot-clé ayant un nombre prédéterminé de bits, le contenu des registres à décalage est décalé d'un bit à la fois.A parallel processor of alphanumeric strings in a minicomputer examines parts of text or binary strings for words or binary strings. The processor comprises a first register (136) in which is recorded a chain comprising a keyword and a pair of interconnected shift registers (186 and 188) in which is recorded the chain which must be searched in order to find the word -key. An arithmetic logic unit (140) compares the contents of the first register with one of the shift registers to determine if the keyword is present in the part of the string being examined. After this compression, the content of the interconnected shift registers is shifted with respect to the keyword recorded in the first register. When the processor searches for a keyword having a predetermined number of bytes, the contents of the shift registers are shifted by one byte at a time, and when the processor searches for a keyword having a predetermined number of bits, the content shift registers is shifted one bit at a time.
Description
Claims
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US1283487A | 1987-02-10 | 1987-02-10 | |
US12834 | 1987-02-10 | ||
US8842187A | 1987-08-20 | 1987-08-20 | |
US88421 | 1987-08-20 |
Publications (2)
Publication Number | Publication Date |
---|---|
EP0352279A1 true EP0352279A1 (en) | 1990-01-31 |
EP0352279A4 EP0352279A4 (en) | 1991-10-30 |
Family
ID=26684061
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
EP19880902641 Withdrawn EP0352279A4 (en) | 1987-02-10 | 1988-02-10 | Parallel string processor and method for a minicomputer |
Country Status (4)
Country | Link |
---|---|
EP (1) | EP0352279A4 (en) |
KR (1) | KR890700870A (en) |
AU (1) | AU1486388A (en) |
WO (1) | WO1988006308A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0363175A3 (en) * | 1988-10-07 | 1991-11-21 | International Business Machines Corporation | Comparator apparatus |
WO1990005334A1 (en) * | 1988-11-04 | 1990-05-17 | Davin Computer Corporation | Parallel string processor and method for a minicomputer |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2036390A (en) * | 1978-12-07 | 1980-06-25 | Standard Telephones Cables Ltd | Improvements in or Relating to Telephone Exchanges |
US4560974A (en) * | 1981-09-28 | 1985-12-24 | Hughes Aircraft Company | Real-time ordinal-value filter utilizing reference-function comparison |
Family Cites Families (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US3609703A (en) * | 1969-06-30 | 1971-09-28 | Ibm | Comparison matrix |
FR2293741A1 (en) * | 1974-12-04 | 1976-07-02 | Anvar | METHOD AND SYSTEM FOR ITERATIVE AND SIMULTANEOUS RECONCILIATION OF DATA WITH A SET OF REFERENCE DATA |
US4032885A (en) * | 1976-03-01 | 1977-06-28 | The United States Of America As Represented By The Secretary Of The Navy | Digital correlator |
GB1545117A (en) * | 1976-05-25 | 1979-05-02 | Nat Res Dev | Comparison apparatus eg for use in character recognition |
US4101903A (en) * | 1976-08-02 | 1978-07-18 | Rockwell International Corporation | Method and apparatus for monitoring bcd continuously varying data |
US4097844A (en) * | 1977-04-04 | 1978-06-27 | Hughes Aircraft Company | Output circuit for a digital correlator |
FR2459512A1 (en) * | 1979-06-19 | 1981-01-09 | Vidalin Jacques | METHOD FOR CONTROLLING RECONCILIATION TO BE MADE BETWEEN LOGICAL REFERENCE ENTITIES AND LOGICAL ENTITIES OBTAINED FROM A FILE |
JPS5652441A (en) * | 1979-10-05 | 1981-05-11 | Pioneer Electronic Corp | Programmable bit shift circuit |
US4334284A (en) * | 1979-12-31 | 1982-06-08 | Sperry Corporation | Multiplier decoding using parallel MQ register |
US4467444A (en) * | 1980-08-01 | 1984-08-21 | Advanced Micro Devices, Inc. | Processor unit for microcomputer systems |
JPS592143A (en) * | 1982-06-29 | 1984-01-07 | Hitachi Ltd | Operation controlling system |
JPS59149539A (en) * | 1983-01-28 | 1984-08-27 | Toshiba Corp | Fixed-to-floating point converting device |
US4524345A (en) * | 1983-02-14 | 1985-06-18 | Prime Computer, Inc. | Serial comparison flag detector |
US4550436A (en) * | 1983-07-26 | 1985-10-29 | At&T Bell Laboratories | Parallel text matching methods and apparatus |
-
1988
- 1988-02-10 EP EP19880902641 patent/EP0352279A4/en not_active Withdrawn
- 1988-02-10 WO PCT/US1988/000389 patent/WO1988006308A1/en not_active Application Discontinuation
- 1988-02-10 AU AU14863/88A patent/AU1486388A/en not_active Abandoned
- 1988-10-08 KR KR1019880701248A patent/KR890700870A/en not_active Application Discontinuation
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2036390A (en) * | 1978-12-07 | 1980-06-25 | Standard Telephones Cables Ltd | Improvements in or Relating to Telephone Exchanges |
US4560974A (en) * | 1981-09-28 | 1985-12-24 | Hughes Aircraft Company | Real-time ordinal-value filter utilizing reference-function comparison |
Non-Patent Citations (1)
Title |
---|
See also references of WO8806308A1 * |
Also Published As
Publication number | Publication date |
---|---|
AU1486388A (en) | 1988-09-14 |
KR890700870A (en) | 1989-04-28 |
EP0352279A4 (en) | 1991-10-30 |
WO1988006308A1 (en) | 1988-08-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4896133A (en) | Parallel string processor and method for a minicomputer | |
US5073864A (en) | Parallel string processor and method for a minicomputer | |
US5379420A (en) | High-speed data searching apparatus and method capable of operation in retrospective and dissemination modes | |
US7991987B2 (en) | Comparing text strings | |
US5408626A (en) | One clock address pipelining in segmentation unit | |
JP2668438B2 (en) | Data retrieval device | |
EP1535197B1 (en) | Programmable rule processing apparatus for conducting high speed contextual searches characterizations of patterns in data | |
KR100315407B1 (en) | A first Boolean combination task of the second input task 3 input 2 a logical product of the second boolean combination of the input task 3 input a three input arithmetic logic unit | |
US5132898A (en) | System for processing data having different formats | |
JPS62217321A (en) | Fast search processor | |
US6112288A (en) | Dynamic configurable system of parallel modules comprising chain of chips comprising parallel pipeline chain of processors with master controller feeding command and data | |
GB2263987A (en) | End bit markers for instruction decode. | |
US5117493A (en) | Pipelined register cache | |
JP3183669B2 (en) | Processor for variable length character strings | |
CA1216070A (en) | Enhanced alu test hardware | |
JPH08511640A (en) | Method and apparatus for finding termination characters in strings of varying lengths in a processor | |
US4384343A (en) | Firmware controlled search and verify apparatus and method for a data processing system | |
US4631672A (en) | Arithmetic control apparatus for a pipeline processing system | |
JPS63155336A (en) | Data processor | |
EP0352279A1 (en) | Parallel string processor and method for a minicomputer | |
EP0395636A1 (en) | Parallel string processor and method for a minicomputer | |
EP0441873A1 (en) | Parallel string processor and method for a minicomputer | |
US5724572A (en) | Method and apparatus for processing null terminated character strings | |
US5161230A (en) | Multifield identification circuit and related method of operation | |
US5214598A (en) | Unbiased bit disposal apparatus and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PUAI | Public reference made under article 153(3) epc to a published international application that has entered the european phase |
Free format text: ORIGINAL CODE: 0009012 |
|
17P | Request for examination filed |
Effective date: 19890809 |
|
AK | Designated contracting states |
Kind code of ref document: A1 Designated state(s): AT BE CH DE FR GB IT LI LU NL SE |
|
RIN1 | Information on inventor provided before grant (corrected) |
Inventor name: MCLAGAN, ANGUS Inventor name: PAO, GEI-JON Inventor name: METHVIN, DAVID Inventor name: UN, CHONG, SAM |
|
A4 | Supplementary search report drawn up and despatched |
Effective date: 19910910 |
|
AK | Designated contracting states |
Kind code of ref document: A4 Designated state(s): AT BE CH DE FR GB IT LI LU NL SE |
|
17Q | First examination report despatched |
Effective date: 19930309 |
|
STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: THE APPLICATION IS DEEMED TO BE WITHDRAWN |
|
18D | Application deemed to be withdrawn |
Effective date: 19930720 |